public override void Initialize() { base.Initialize(); m_SettingsManager = Game.Services.GetService<ISettingsManager>(); m_InvadersInRow += m_SettingsManager.GetGameLevelSettings().AdditionalInvadersColumns; constructInvaders(); initializeInvaders(); m_GridBounds = calculateBounds(); }
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; }