public void Coloring() // Esta función asigna de manera aleatoria los colores, igualmente utilizando un Enum. { switch (Random.Range(0, 4)) { case 0: mC = ZombieColor.Celeste; break; case 1: mC = ZombieColor.Lila; break; case 2: mC = ZombieColor.Verde; break; } if (mC == ZombieColor.Celeste) { gameObject.GetComponent <Renderer>().material.color = Color.cyan; } else if (mC == ZombieColor.Lila) { gameObject.GetComponent <Renderer>().material.color = Color.magenta; } else if (mC == ZombieColor.Verde) { gameObject.GetComponent <Renderer>().material.color = Color.green; } }
public virtual IZombie Build(IsRange isRange, ZombieColor color) { IZombie z = SelectZombie(isRange); z.Paint(color); return(z); }
public static IZombie Make(Catagory catagory, IsRange isRange, ZombieColor color) { ZombieFactory factory = null; if (catagory == Catagory.Crazy) { factory = new CrazyZombieFactory(); } else if (catagory == Catagory.Normal) { factory = new NormalZombieFactory(); } return(factory.Build(isRange, color)); }
public ZombieJack(CharacterProperty property, ZombieColor color) : base(property, color) { }
public virtual void Paint(ZombieColor color) { this.color = color; }
public AbstractZombie(CharacterProperty property, ZombieColor zombieColor) { this.property = property; this.color = zombieColor; }
public AbstractZombieNormal(CharacterProperty property, ZombieColor color) : base(property, color) { }