//TODO move this feature to Grid class private void _updateTileMaterial(uint x, uint y, Material material) { MaterialChanger tileComponent; string tileName = TileInfo.BuildTileName(x, y); if ((tileComponent = _getTileComponent(tileName)) == null) { return; } tileComponent.ChangeMaterial(material); }
void OnMouseDown() { if (Match.instance.currentTurnPlayerID != PlayerManager.instance.Self().id) { Debug.Log("You can't play when it's not your turn"); return; } if (Match.instance.PlayMove(_tileInfo.x, _tileInfo.y)) { Server.instance.WriteToServer("m:" + _tileInfo.BuildTileName() + "\n"); } else { Debug.Log("Invalid move"); } }
public string BuildTileName() { return(TileInfo.BuildTileName(x, y)); }