public void SetType(enTileType type, Color wallColor) { this.type = type; switch (type) { case enTileType.Empty: GetComponent <SpriteRenderer>().color = new Color(66, 127, 255); break; case enTileType.Wall: GetComponent <SpriteRenderer>().color = wallColor; break; default: break; } }
public Node(Vector3 pos, enTileType typeType) { worldPosition = pos; isByPassable = typeType != enTileType.Wall; tCost = isByPassable ? 0 : 100; }