Beispiel #1
0
 public GameObject GetPath(Trap trap, int pathIndex)
 {
     if (trap != null)
     {
         return(trap.GetPath(pathIndex));
     }
     else
     {
         return(null);
     }
 }
Beispiel #2
0
 private void SetPath()
 {
     trap = TrapManager._instance.GetTrap(trapIndex);
     if (trap != null)
     {
         GameObject nextPath = trap.GetPath(pathIndex);
         if (nextPath != null)
         {
             path = nextPath;
         }
         else
         {
             trapIndex++;
             pathIndex = 0;
             SetPath();
         }
     }
     else
     {
         path = null;
     }
 }