Example #1
0
            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;
                }
            }
Example #2
0
    public virtual IZombie Build(IsRange isRange, ZombieColor color)
    {
        IZombie z = SelectZombie(isRange);

        z.Paint(color);
        return(z);
    }
Example #3
0
    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));
    }
Example #4
0
 public ZombieJack(CharacterProperty property, ZombieColor color) : base(property, color)
 {
 }
Example #5
0
 public virtual void Paint(ZombieColor color)
 {
     this.color = color;
 }
Example #6
0
 public AbstractZombie(CharacterProperty property, ZombieColor zombieColor)
 {
     this.property = property;
     this.color    = zombieColor;
 }
 public AbstractZombieNormal(CharacterProperty property, ZombieColor color) : base(property, color)
 {
 }