/// <summary>
        /// Resolves the dependencies needed for this instance to work.
        /// </summary>
        protected override void ResolveDependencies()
        {
            base.ResolveDependencies();

            this.hubPanel = EntityManager.Find<HubPanel>("HubPanel");

            this.virtualScreenManager = this.Owner.Scene.VirtualScreenManager;
        }
        protected override void Initialize()
        {
            base.Initialize();

            this.logo = this.EntityManager.Find("Logo");
            this.tap_to_start = this.EntityManager.Find("TapToStart");
            this.game_over = this.EntityManager.Find("GameOver");
            this.bestScores = this.EntityManager.Find<TextBlock>("BestScores");

            this.player = this.EntityManager.Find("Player").FindComponent<PlayerBehavior>();
            this.enemyEmitter = this.EntityManager.Find("EnemyEmitter").FindComponent<EnemyEmitter>();
            this.leftJoystick = this.EntityManager.Find<Joystick>("leftJoystick");
            this.rightJoystick = this.EntityManager.Find<Joystick>("rightJoystick");
            this.hubPanel = this.EntityManager.Find<HubPanel>("HubPanel");

            this.CurrentState = States.Menu;
        }
        private void CreateUI()
        {
            // Left Joystick
            RectangleF leftArea = new RectangleF(0,
                                                  0,
                                                  this.VirtualScreenManager.VirtualWidth / 2f,
                                                  this.VirtualScreenManager.VirtualHeight);
            var leftJoystick = new Joystick("leftJoystick", leftArea);
            EntityManager.Add(leftJoystick);

            // Right Joystick
            RectangleF rightArea = new RectangleF(this.VirtualScreenManager.VirtualWidth / 2,
                                                  0,
                                                  this.VirtualScreenManager.VirtualWidth / 2f,
                                                  this.VirtualScreenManager.VirtualHeight);
            var rightJoystick = new Joystick("rightJoystick", rightArea);
            EntityManager.Add(rightJoystick);

            // BestScores
            var bestScores = new TextBlock("BestScores")
            {
                Width = 300,
                FontPath = WaveContent.Assets.Fonts.Coalition_16_ttf,
                Text = string.Format("BestScores: {0}", 0),
                HorizontalAlignment = HorizontalAlignment.Right,
                VerticalAlignment = VerticalAlignment.Bottom,
                TextAlignment = TextAlignment.Right,
                Margin = new Thickness(10),
            };

            EntityManager.Add(bestScores);

            // CreateHUBUI
            var hubPanel = new HubPanel();
            EntityManager.Add(hubPanel);
        }
        protected override void Initialize()
        {
            base.Initialize();

            this.initialPosition = this.transform.Position;
            this.hubPanel = this.EntityManager.Find<HubPanel>("HubPanel");

            this.Reset();
        }
        /// <summary>
        /// Resolves the dependencies needed for this instance to work.
        /// </summary>
        protected override void ResolveDependencies()
        {
            base.ResolveDependencies();

            this.hubPanel = EntityManager.Find<HubPanel>("HubPanel");
        }