// Use this for initialization void Start() { ui = new UIMakerScript(); control = GameObject.Find("Control Object").GetComponent <ControlStart>(); dateTime = new GameObject("Date Label"); SetupBackgorund(); MakeGameNumber(); MakeScoreText(); MakeMissText(); MakeDateTime(); buttons.Add(MakePlayButton()); buttons.Add(MakeToggleButton()); buttons.Add(MakeShuffleButton()); buttons.Add(MakebackButton()); }
/********************************************************** * NAME: GameOverSceen * DESCRIPTION: Creates a UI interface to tell the * player that he won or lost and asked * them if they want to play again. * * ********************************************************/ private void GameOverScreen(string message) { UIMakerScript menuMaker = new UIMakerScript (); GameObject canvas = menuMaker.CreateCanvas(this.transform); menuMaker.CreateEventSystem(canvas.transform); GameObject panel = menuMaker.CreatePanel(canvas.transform); menuMaker.CreateText(panel.transform, new Vector2(-20, 50), new Vector2(160, 50), "headerText",message, 14); menuMaker.CreateButton(panel.transform, new Vector2(0, -30), new Vector2(75, 25), "ExitButton","No", delegate{Exit();}); menuMaker.CreateButton(panel.transform, new Vector2(0, 05), new Vector2(75, 25), "RestartButton","Yes", delegate{ResetScene();}); }