public override bool Equals(object obj) { GameObjectPlace newObj = obj as GameObjectPlace; if (newObj != null) { return(this.XCoordinate == newObj.XCoordinate && this.YCoordinate == newObj.YCoordinate); } return(false); }
public void AlienShot() { var rand = new Random(); var alien = _scene.Swarm.ElementAt(rand.Next(_scene.Swarm.Count())); GameObjectPlace alienPlace = alien.GameObjectPlace; AlienShipMissileFactory missileFactory = new AlienShipMissileFactory(_gameSettings); GameObject missile = missileFactory.GetGameObject(alienPlace); _scene.AlienShipMissile.Add(missile); }