示例#1
0
 public MaruMariState(MaruMari maruMari)
 {
     _maruMari      = maruMari;
     Sprite         = ItemSpriteFactory.Instance.CreateMaruMariSprite();
     Sprite.X       = (int)maruMari.Position.X;
     Sprite.Y       = (int)maruMari.Position.Y;
     Sprite.Visible = true;
 }
        public void Execute(IGameObject gameObject, IGameObject collidedWith)
        {
            MaruMari maruMari = (MaruMari)gameObject;

            maruMari.Obtain();
            foreach (var player in _currentLevel.Players)
            {
                var samus = (Samus)player;
                samus.HasBallForm = true;
            }
            SoundManager.Instance.PlaySong("obtainItem");
            SoundManager.Instance.PauseSong("brinstarLevel");
            Game1.GetLevel().SetWorldState(Util.WorldUtil.WorldState.Paused);
        }