Beispiel #1
0
        public LakituSprite(Lakitu lakitu)
        {
            this.Lakitu       = lakitu;
            this.CurrentFrame = SpriteHolder.LakituStartFrame;
            this.Texture      = SpriteHolder.Lakitu;

            this.Width  = SpriteHolder.LakituWidth;
            this.Height = this.Texture.Height;
        }
 public LakituCollisionResponder(Lakitu lakitu)
 {
     this.Lakitu = lakitu;
 }
Beispiel #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;
            }
        }