Exemplo n.º 1
0
 public FlyingKoopaSprite(FlyingKoopa flyingKoopa)
 {
     this.FlyingKoopa  = flyingKoopa;
     this.Texture      = SpriteHolder.Koopa;
     this.CurrentFrame = SpriteHolder.FlyingKoopaStartFrame;
     this.LastFrame    = SpriteHolder.FlyingKoopaStartFrame + SpriteHolder.FlyingKoopaFrames;
     this.Width        = SpriteHolder.KoopaWidth;
     this.Height       = this.Texture.Height;
 }
 public FlyingKoopaCollisionResponder(FlyingKoopa flyingKoopa)
 {
     this.FlyingKoopa = flyingKoopa;
 }
Exemplo n.º 3
0
        public void SpawnEnemy(Vector2 Position, String s)
        {
            IEnemy e;

            switch (s[1])
            {
            case 'G':
                if (s.Length > 2 && s[2] == 'R')
                {
                    e = new Goomba(Position, true);
                }
                else
                {
                    e = new Goomba(Position, false);
                }
                this.level.Enemies.Add(e);
                break;

            case 'K':
                if (s.Length > 2 && s[2] == 'R')
                {
                    e = new Koopa(Position, true);
                }
                else
                {
                    e = new Koopa(Position, false);
                }
                this.level.Enemies.Add(e);
                break;

            case 'F':
                if (s.Length > 2 && s[2] == 'R')
                {
                    e = new FlyingKoopa(Position, true);
                }
                else
                {
                    e = new FlyingKoopa(Position, false);
                }
                this.level.Enemies.Add(e);
                break;

            case 'S':
                if (s.Length > 2 && s[2] == 'R')
                {
                    e = new Spiny(Position, true);
                }
                else
                {
                    e = new Spiny(Position, false);
                }
                this.level.Enemies.Add(e);
                break;

            case 'L':
                if (s.Length > 2 && s[2] == 'R')
                {
                    e = new Lakitu(Position, this.level);
                }
                else
                {
                    e = new Lakitu(Position, this.level);
                }
                this.level.Enemies.Add(e);
                break;
            }
        }