Beispiel #1
0
    // 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);
 }
Beispiel #3
0
    public Organism SpawnType(Organism prototype)
    {
        iCopyable m_Copy = prototype.Copy();

        return((Organism)m_Copy);
    }
Beispiel #4
0
 public GameSquare SpawnGameSquare(GameSquare prototype)
 {
     m_Copy = prototype.Copy();
     return((GameSquare)m_Copy);
 }
 public Enemy SpwanEnemy(Enemy prototype)
 {
     copier = prototype.Copy();
     return((Enemy)copier);
 }