Exemple #1
0
        public void TakeDamageTransition(Goomba goomba)
        {
            var state = new DeadGoombaState();

            goomba.Sprite     = GoombaSpriteFactory.Instance.FactoryMethod(goomba.Content, goomba, goomba.GraphicsDevice);
            goomba.EnemyState = state;
        }
Exemple #2
0
        public void TakeDamageTransition(Goomba goomba)
        {
            sound = goomba.Content.Load <SoundEffect>("Sound Effects/Stomp");
            sound.Play();
            var state = new DeadGoombaState();

            goomba.EnemyState = state;
            goomba.Sprite     = GoombaSpriteFactory.Instance.FactoryMethod(goomba.Content, goomba, goomba.GraphicsDevice);
        }