public MovingItemAndMovingItemInteraction(World world, MovingItem movingItem1, MovingItem movingItem2) { if (world == null) throw new ArgumentNullException("world"); if (movingItem1 == null) throw new ArgumentNullException("movingItem1"); if (movingItem2 == null) throw new ArgumentNullException("movingItem2"); if (movingItem1 is Shot) throw new ArgumentOutOfRangeException("movingItem1"); if (movingItem2 is Shot) throw new ArgumentOutOfRangeException("movingItem2"); this._world = world; var items = new[] {movingItem1, movingItem2}; this._player = items.OfType<Player>().SingleOrDefault(); this._boulder = items.OfType<Boulder>().SingleOrDefault(); this._mine = items.OfType<Mine>().SingleOrDefault(); this._monster1 = items.OfType<Monster.Monster>().FirstOrDefault(); this._monster2 = items.OfType<Monster.Monster>().Skip(1).FirstOrDefault(); this._moveableObject = items.FirstOrDefault(item => item.Solidity == ObjectSolidity.Moveable); this._insubstantialObject = items.FirstOrDefault(item => item.Solidity == ObjectSolidity.Insubstantial); }
public CookingState(Mine mine) : base(mine) { this.Mine.Ap.AnimationFinished += CookingFinished; }
public PrimedState(Mine mine) : base(mine) { }
protected MineState(Mine mine) { this.Mine = mine; }
public InactiveState(Mine mine) : base(mine) { this.Mine._countdown = TimeSpan.Zero; }
public FiredState(Mine mine) : base(mine) { this.Mine.World.Game.SoundPlayer.Play(GameSound.MonsterDies); }
public void AddMine(Vector2 position) { var m = new Mine(this, position); this.GameObjects.Add(m); }