Beispiel #1
0
 Sprite GetCellSprite(GridSystem.WorldGridCell cell)
 {
     if (cell.ContentType == GridSystem.GridContentType.Baricade)
     {
         return(_baricade);
     }
     if (cell.Buildable)
     {
         return(_buildable);
     }
     if (cell.Walkable)
     {
         return(_onlyWalkable);
     }
     return(null);
 }
Beispiel #2
0
 void HandleCellChange(object sender, GridSystem.WorldGridCell cell)
 {
     (cell.Content as SpriteRenderer).sprite = GetCellSprite(cell);
 }