// Gets the NPC's and creates a copy public iCopyable GetNPC(NPCType type) { // Checks to see what is being called switch (type) { // If the case found is the corresponding NPC type, call its class, specifically the Copy() function, and return it to the NPCSpawner case NPCType.Beggar: iCopyable beggar = m_beg.Copy(); return(beggar); case NPCType.Shop_Owner: iCopyable shop_owner = m_shop_owner.Copy(); return(shop_owner); case NPCType.Farmer: iCopyable farmer = m_farm.Copy();; return(farmer); case NPCType.Small_egg: iCopyable small_egg = m_small_egg.Copy(); return(small_egg); } // Returns null if none of the cases match return(null); }
public Enemy SpawnEnemy(Enemy prototype) { m_Copy = prototype.Copy(); return((Enemy)m_Copy); }
public Organism SpawnType(Organism prototype) { iCopyable m_Copy = prototype.Copy(); return((Organism)m_Copy); }
public GameSquare SpawnGameSquare(GameSquare prototype) { m_Copy = prototype.Copy(); return((GameSquare)m_Copy); }
public Enemy SpwanEnemy(Enemy prototype) { copier = prototype.Copy(); return((Enemy)copier); }