Ejemplo n.º 1
0
        public void Execute(IGameObject gameObject, IGameObject collidedWith)
        {
            ITileInteractable door = (ITileInteractable)collidedWith;

            door.OnInteract();
            Game1.GetLevel().Destroy(gameObject);
            SoundManager.Instance.PlaySong("door");
        }
        public void Execute(IGameObject gameObject, IGameObject collidedWith)
        {
            ITileInteractable door    = (ITileInteractable)collidedWith;
            Missile           missile = (Missile)gameObject;

            door.OnInteract();
            MissileExplosion missileExplosion = new MissileExplosion(missile);

            Game1.GetLevel().Spawn(missileExplosion, missileExplosion.Position);
            Game1.GetLevel().Destroy(gameObject);
            SoundManager.Instance.PlaySong("rocket_door");
        }
        public void Execute(IGameObject gameObject, IGameObject collidedWith)
        {
            ITileInteractable tile = (ITileInteractable)collidedWith;

            Game1.GetLevel().Destroy(tile);
        }