Example #1
0
        /// <summary>
        /// Creates the UI elements.
        /// </summary>
        private void CreateUI()
        {
            var logo = EntitiesFactory.CreateLogo();

            this.EntityManager.Add(logo);

            var button = EntitiesFactory.CreatePlayButton(404, 384);

            button.Click += (o, e) =>
            {
                WaveServices.ScreenContextManager.Pop();

                var scene = WaveServices.ScreenContextManager.FindContextByName("GameBackContext").FindScene <GameScene>();
                scene.SetState(GameScene.GameSceneStates.Gameplay);
            };
            this.EntityManager.Add(button);

            var bestScoreText = EntitiesFactory.CreateBestScore(620, this.gameStorage.BestScore);

            this.EntityManager.Add(bestScoreText);
        }