protected void requestZombieCreationFast() { GameObject gObj = globalEvents.characterCreator.createFastZombie(gameObject.transform.position, Quaternion.Euler(0, 0, 0)); zombieAI zAI = gObj.GetComponent <zombieAI>(); if (zAI != null) { zAI.MakeFastZombie(); } }
public GameObject createFastZombie(Vector3 position, Quaternion rotation) { GameObject gObj = createZombie(position, rotation); zombieAI zombie = gObj.GetComponent <zombieAI>(); if (zombie != null) { zombie.MakeFastZombie(); } return(gObj); }
public zombieAI createFastZombie() { GameObject spawn = getRandomSpawn(); // if no such object found randomly, get out of loop if (spawn == null) { return(null); } zombieAI fz = createZombie(gs.RandomVectorInBounds(spawn), q).GetComponent <zombieAI>(); fz.MakeFastZombie(); return(fz); }