public void SummonZombie(string t) { zombie = factory.CreateZombie(t); if (zombie != null) { int ranX = Random.Range(minX, maxX); Vector3 pos = new Vector3(ranX, 0, 0); Instantiate(zombie, pos, zombie.transform.rotation); } }
// Start is called before the first frame update void Start() { Timer = 0; Factory = ZombieFactory.Instance; Factory.CreateZombie(); }
public void CreateNewZombie(string type) { ZombieClass zombie = ZombieFactory.CreateZombie(type, this); this.enemies.Add(zombie); }