Skip to content

Instantly share code, notes, and snippets.

@onmyway133
Last active June 21, 2018 13:09
Show Gist options
  • Save onmyway133/862ce9cd10104b847974d6b503ee8280 to your computer and use it in GitHub Desktop.
Save onmyway133/862ce9cd10104b847974d6b503ee8280 to your computer and use it in GitHub Desktop.
public class MenuScript : MonoBehaviour {
// Use this for initialization
void Start () {
setup();
}
// Update is called once per frame
void Update () {
}
private void setup() {
Sugar sugar = new Sugar();
GameObject canvasObject = sugar.makeCanvas();
GameObject eventSystemObject = sugar.makeEventSystem();
GameObject backgroundObject = sugar.makeBackground(canvasObject);
GameObject startButton = sugar.makeButton("Start", canvasObject);
GameObject highScoresButton = sugar.makeButton("High Scores", canvasObject);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment