Exemplo n.º 1
0
    void CreatOneZombie(ZombieType type)
    {
        GameObject zombie = null;

        switch (type)
        {
        case ZombieType.Zombie1:
            zombie = Instantiate(zombie1);
            break;

        case ZombieType.ConeHeadZombie:
            zombie = Instantiate(ConeheadZombie);
            break;

        case ZombieType.BucketHeadZombie:
            zombie = Instantiate(BucketheadZombie);
            break;
        }


        int row = Random.Range(0, StageMap.ROW_MAX);

        zombie.transform.position = StageMap.SetZombiePos(row);
        zombie.GetComponent <ZombieMove>().row = row;
        zombie.GetComponent <SpriteDisplay>().SetOrderByRow(row);
        model.zombieList[row].Add(zombie);
    }