Exemplo n.º 1
0
    private void putItemBackInPool(GameObject go)
    {
        List <GameObject> objects = obstaclePool [go.name];

        go.transform.localScale = startScale;
        EnableDisableScript script = go.GetComponent <EnableDisableScript> ();

        if (script != null)
        {
            script.enableObstacle();
        }
        go.SetActive(false);
        obstaclesInUse.Remove(go);
        objects.Add(go);
    }
Exemplo n.º 2
0
 private void enableLane(int laneLocked)
 {
     for (int x = 0; x < obstaclesInUse.Count; x++)
     {
         GameObject go = obstaclesInUse [x];
         if (x % level.numberOfLanes == laneLocked)
         {
             EnableDisableScript script = go.GetComponent <EnableDisableScript> ();
             if (script != null)
             {
                 script.enableObstacle();
             }
         }
     }
 }