public BowserFireball(bool travelingLeft, int positionInGameX, int positionInGameY) : base(null, new Point(), new Vector2()) { this.SpriteFactory = BossFactory.GetInstance(); this.IsCollidable = true; this.SetYPositionInGame = positionInGameY + 32; if (travelingLeft) { this.Sprite = this.SpriteFactory.CreateProduct(BossTypes.FireballLeft); this.SetXPositionInGame = positionInGameX; this.XSpeed = -6.0f; } else { this.Sprite = this.SpriteFactory.CreateProduct(BossTypes.FireballRight); this.SetXPositionInGame = positionInGameX + 68; this.XSpeed = 6.0f; } }
public static GameObject CheckCharacters(Entity entity) { switch (entity.Type) { case "Player": GameObject mario = Mario.GetInstance(); ((Mario)mario).CheckpointPosition = entity.CheckpointX; if (((Mario)mario).Checkpoint) { mario.PositionInGame = new Point(entity.CheckpointX, entity.CheckpointY); } else { mario.PositionInGame = new Point(entity.X, entity.Y); } CostumeChanger.GetInstance().Setup(); return(mario); case "Goomba": return(new Goomba(EnemyFactory.GetInstance(), new Point(entity.X, entity.Y))); case "GreenKoopa": return(new Koopa(EnemyFactory.GetInstance(), new Point(entity.X, entity.Y), false)); case "RedKoopa": return(new Koopa(EnemyFactory.GetInstance(), new Point(entity.X, entity.Y), true)); case "PiranhaPlant": return(new PiranhaPlant(EnemyFactory.GetInstance(), new Point(entity.X, entity.Y))); case "Bowser": return(new Bowser(BossFactory.GetInstance(), new Point(entity.X, entity.Y))); default: return(null); } }