public void CreateCharacter(string btnName) { //Tipo de personaje que vamos a crear CharacterType type = StringToType(btnName); // Genero del personaje que vamos a crear GenderType gender = GetGenderProbability(); //Seteamos la base del personaje SetCharacter(gender); switch (type) { case CharacterType.Ninja: Ninja ninja = selectedBase.AddComponent <Ninja>(); ninja = new Ninja(gender, NinjaColor, selectedSurface, selectedBase.GetComponent <Animator>()); selectedCharacter = ninja; break; case CharacterType.Golem: Golem golem = selectedBase.AddComponent <Golem>(); golem = new Golem(gender, GolemColor, selectedSurface, selectedBase.GetComponent <Animator>()); selectedCharacter = golem; break; case CharacterType.Zombie: Zombie zombie = selectedBase.AddComponent <Zombie>(); zombie = new Zombie(gender, ZombieColor, selectedSurface, selectedBase.GetComponent <Animator>()); selectedCharacter = zombie; break; case CharacterType.Archer: Archer archer = selectedBase.AddComponent <Archer>(); archer = new Archer(gender, ArcherColor, selectedSurface, selectedBase.GetComponent <Animator>()); selectedCharacter = archer; break; case CharacterType.Nymph: Nymph nymph = selectedBase.AddComponent <Nymph>(); nymph = new Nymph(gender, NymphColor, selectedSurface, selectedBase.GetComponent <Animator>()); selectedCharacter = nymph; break; } }
public Character GetEnemy(int id) { Character nextChar; switch (id) { //Low level case 100: nextChar = new Bat(); return(nextChar); case 101: nextChar = new Rat(); return(nextChar); case 102: nextChar = new Kobold(); return(nextChar); case 103: nextChar = new Slime(); return(nextChar); case 104: nextChar = new Farmer(); return(nextChar); case 105: nextChar = new Imp(); return(nextChar); case 106: nextChar = new Zombie(); return(nextChar); case 107: nextChar = new Phantom(); return(nextChar); case 108: nextChar = new Goblin(); return(nextChar); case 109: nextChar = new Witch(); return(nextChar); //Mid level case 110: nextChar = new Harpy(); return(nextChar); case 111: nextChar = new Elemental(); return(nextChar); case 112: nextChar = new Nymph(); return(nextChar); case 113: nextChar = new Vampire(); return(nextChar); case 114: nextChar = new Lamia(); return(nextChar); case 115: nextChar = new Qilin(); return(nextChar); case 116: nextChar = new Unicorn(); return(nextChar); case 117: nextChar = new Jinn(); return(nextChar); case 118: nextChar = new Xorn(); return(nextChar); case 119: nextChar = new Antlion(); return(nextChar); //High level case 120: nextChar = new Yeti(); return(nextChar); case 121: nextChar = new Orc(); return(nextChar); case 122: nextChar = new Minotaur(); return(nextChar); case 123: nextChar = new Troll(); return(nextChar); case 124: nextChar = new Cyclop(); return(nextChar); case 125: nextChar = new Drake(); return(nextChar); default: nextChar = new Slime(); return(nextChar); } }