Example #1
0
        protected override void CreateScene()
        {
            this.Load(WaveContent.Scenes.GamePlayScene);

            this.EntityManager.Find("defaultCamera2D").FindComponent <Camera2D>().CenterScreen();

            //Backscene
            this.backScene = WaveServices.ScreenContextManager.FindContextByName("BackContext")
                             .FindScene <BackgroundScene>();
        }
        protected override void CreateScene()
        {
            this.Load(WaveContent.Scenes.GamePlayScene);
            
            this.EntityManager.Find("defaultCamera2D").FindComponent<Camera2D>().CenterScreen();

            //Backscene 
            this.backScene = WaveServices.ScreenContextManager.FindContextByName("BackContext")
                                                              .FindScene<BackgroundScene>();

            this.CreateUI();
        }
        protected override void Initialize()
        {
            base.Initialize();

            this.scorePanel = this.EntityManager.Find<ScorePanel>("ScorePanel");

            //Backscene 
            var backContext = WaveServices.ScreenContextManager.FindContextByName("BackContext");
            if (backContext != null)
            {
                this.backScene = backContext.FindScene<BackgroundScene>();
            }

            this.blockBuilder = this.EntityManager.Find("BlockBuilder").FindComponent<BlockBuilderBehavior>();

            this.squid = this.EntityManager.Find("Squid").FindComponent<SquidBehavior>();
        }