public MotherShip(string i_AssetName, GameScreen i_GameScreen) : base(i_AssetName, i_GameScreen) { r_RandomBehavior = this.Game.Services.GetService(typeof(IRandomBehavior)) as IRandomBehavior; r_MaxLives = Lives; this.MoveDirection = Sprite.Right; this.Visible = false; }
public EnemyManager(GameScreen i_GameScreen) : base(i_GameScreen.Game) { r_AliveEnemyIndices = new List <KeyValuePair <int, int> >(); r_GameScreen = i_GameScreen; r_EnemyMatrix = new List <List <Enemy> >(k_MatrixRows); r_RandomBehavior = this.Game.Services.GetService(typeof(IRandomBehavior)) as IRandomBehavior; r_SoundManager = this.Game.Services.GetService(typeof(SoundManager)) as ISoundManager; r_MotherShip = new RedMotherShip(r_GameScreen); this.DrawOrder = this.UpdateOrder = 5; r_GameScreen.Add(this); }
public Bullet(Color i_TintColor, GameScreen i_GameScreen) : base(k_GraphicPath, i_GameScreen) { r_RandomBehavior = this.Game.Services.GetService(typeof(IRandomBehavior)) as IRandomBehavior; this.Width = 6; this.Height = 16; this.Enabled = false; this.Visible = false; this.TintColor = i_TintColor; this.Velocity = new Vector2(k_XVelocity, k_YVelocity); }
private void CreateBehaviors() { randomBehavior = (randomBehavior == null) ? ContainerConfig.GetInstance <IRandomBehavior>() : randomBehavior; targetedBehavior = (targetedBehavior == null) ? ContainerConfig.GetInstance <ITargetedBehavior>() : targetedBehavior; }