using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Content; using Sprint3_actual.SpriteFactories; using Sprint3_actual; using System; using System.Collections.Generic; using System.Text; namespace Sprint3_actual.Everything_NPC { public class NPCFactory { private enum NPCType { OldMan = 0, Stalfos = 1, Slime = 2, Moblin = 3, Keese = 4, Aquamentus = 5, Dodongo = 6, BigSlime = 7, SpikeTrap = 8, Snake = 9, Wallmaster = 10, Fire = 11, StoneStatueRight = 12, Moldorm = 13, StoneStatueLeft = 14, SecondBoss = 15, LightningBolt = 16, FloorSpike = 17, Damager = 18 } private static NPCFactory instance = new NPCFactory(); public static NPCFactory Instance { get { return instance; } } private NPCFactory() { } public INPC CreateNPC(int type, int xPos, int yPos, room Room, Game1 game) { switch ((NPCType)type) { case NPCType.OldMan: return new OldMan(xPos, yPos); case NPCType.Stalfos: return new Stalfos(xPos, yPos, Room); case NPCType.Slime: return new Slime(xPos, yPos); case NPCType.Moblin: return new Moblin(xPos, yPos, NPCSpriteFactory.Instance.boomerangTexture, Room); case NPCType.Keese: return new Keese(xPos, yPos); case NPCType.Aquamentus: return new Aquamentus(xPos, yPos, NPCSpriteFactory.Instance.NPCSpriteSheet, Room); case NPCType.Dodongo: return new Dodongo(xPos, yPos, Room); case NPCType.BigSlime: return new BigSlime(xPos, yPos, Room); case NPCType.SpikeTrap: return new SpikeTrap(xPos, yPos, game); case NPCType.Snake: return new Snake(xPos, yPos, game, Room); case NPCType.Wallmaster: return new Wallmaster(xPos, yPos, Room); case NPCType.Fire: return new Fire(xPos, yPos); case NPCType.StoneStatueRight: return new StoneStatueRight(xPos, yPos, NPCSpriteFactory.Instance.NPCSpriteSheet,game); case NPCType.StoneStatueLeft: return new StoneStatueLeft(xPos, yPos, NPCSpriteFactory.Instance.NPCSpriteSheet,game); case NPCType.Moldorm: return new Moldorm(xPos, yPos, Room); case NPCType.SecondBoss: return new OldWoman(xPos, yPos, Room, game); case NPCType.LightningBolt: return new LightningBolt(xPos, yPos, Room, game); case NPCType.FloorSpike: return new FloorSpike(xPos, yPos, Room, game); case NPCType.Damager: return new Damager(xPos, yPos, Room, game); default: return new Stalfos(xPos, yPos, Room); } } } }