コード例 #1
0
        public override void Initialize()
        {
            base.Initialize();
            m_SettingsManager = Game.Services.GetService<ISettingsManager>();

            m_InvadersInRow += m_SettingsManager.GetGameLevelSettings().AdditionalInvadersColumns;
            constructInvaders();
            initializeInvaders();
            m_GridBounds = calculateBounds();
        }
コード例 #2
0
        public override void Initialize()
        {
            base.Initialize();
            m_RangeToMove = (float)Bounds.Width / 4;
            RightBarrier = (int)(Bounds.Right + Bounds.Width + m_RangeToMove);
            LeftBarrier = (int)(Bounds.Left - m_RangeToMove);
            m_SoundManager = Game.Services.GetService<ISoundManager>();
            m_SettingsManager = Game.Services.GetService<ISettingsManager>();

            if (!m_SettingsManager.GetGameLevelSettings().BarrierShouldMove)
            {
                Velocity = Vector2.Zero;
            }

            Velocity += m_SettingsManager.GetGameLevelSettings().AdditionalBarrierSpeedPercent * Velocity;
        }