private void Awake() { if (Instance != null && Instance != this) { Destroy(this.gameObject); return; } //DontDestroyOnLoad(this); Instance = this; }
public MainMenu(Entity fader) { var mm = new MainMenuBehavior(fader); AddComponent(mm); AddChild(new ListView <string>(new[] { "PLAY", "OPTIONS", "CREDITS" }, new ListViewConfig <string> { Color = GameColors.Black, SelectedColor = GameColors.DarkRed, Font = "Fonts/Propaganda48", OnChoose = p => mm.Play(), }) ); this.TranslateTo(1335, 400); }