Ejemplo n.º 1
0
 public void addToGrid(movementGrid Grid)
 {
     grid = Grid;
     if (gridX >= 0 && gridY >= 0 && gridX < grid.Width() && gridY < grid.Height())
     {
         grid [gridX, gridY].restricted = Blocked;
         grid [gridX, gridY].slow       = Slowed;
         transform.position             = grid.worldPos(gridX, gridY);
     }
     else
     {
         Debug.LogError("Invalid grid obstacle position");
     }
 }
Ejemplo n.º 2
0
 public void addToGrid(movementGrid Grid, int x, int y)       //This way, can insure grid is properly instantiated when adding
 {
     grid = Grid;
     newMove(x, y);
 }
Ejemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     grid = GetComponentInParent <movementGrid> ();
 }