public static recycleBinForGameObject ( GameObject go ) : TrashManRecycleBin, | ||
go | GameObject | Go. |
return | TrashManRecycleBin, |
// Use this for initialization void Start() { TrashMan.recycleBinForGameObject(tank); TrashMan.recycleBinForGameObject(tankController); TrashMan.recycleBinForGameObject(bot); TrashMan.recycleBinForGameObject(botController); this.AddScore(0); this.SpawnPlayer(); this.StartCoroutine(this.EnemySpawner()); }
void Start() { // if you plan on listening to the spawn/despawn events, Start is a good time to add your listeners. TrashMan.recycleBinForGameObject(cubePrefab).onSpawnedEvent += go => Debug.Log("spawned object: " + go); TrashMan.recycleBinForGameObject(cubePrefab).onDespawnedEvent += go => Debug.Log("DEspawned object: " + go); }