recycleBinForGameObject() public static method

gets the recycle bin for the given GameObject. Returns null if none exists.
public static recycleBinForGameObject ( GameObject go ) : TrashManRecycleBin,
go GameObject Go.
return TrashManRecycleBin,
Beispiel #1
0
    // 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());
    }
Beispiel #2
0
 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);
 }