//创建僵尸 void CreateOneZombie(ZombieType type) { GameObject zombie = null; switch (type) { case ZombieType.Zombie1: zombie = Instantiate(zombie1); break; default: break; } int row = Random.Range(0, StageMap.MaxRow); zombie.transform.position = StageMap.ZombiePosByRow(row); zombie.GetComponent <ZombieMove>().Row = row; zombie.GetComponent <ZombieSpriteDisplay>().SetOrderByRow(row); _model.zombieList[row].Add(zombie); }