public SpinySprite(Spiny spiny) { this.Spiny = spiny; this.CurrentFrame = SpriteHolder.SpinyStartFrame; this.TotalFrames = SpriteHolder.SpinyFrames; this.Texture = SpriteHolder.Spiny; this.Width = SpriteHolder.SpinyWidth; this.Height = this.Texture.Height; }
public SpinyCollisionResponder(Spiny spiny) { this.Spiny = spiny; }
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; } }