public static void OnPositionUnhovered(MultiTile position) { foreach (Tile tile in position) { tile.highlighter.TurnOn(GetColourOfBrighteness(tile.highlighter.GetComponent <Renderer>().material.color, 1.0f / hoveringTilesBrightnessFactor)); } }
public void SendCommandToSetUnitPosition(Unit unit, MultiTile targetPosition) { int endPosX = targetPosition.bottomLeftCorner.position.x; int endPosZ = targetPosition.bottomLeftCorner.position.z; if (Global.instance.matchType == MatchTypes.Online) { photonView.RPC("RPCSetUnitPosition", RpcTarget.All, unit.index, endPosX, endPosZ); } else { DragableUnit.SetNewPosition(unit.index, endPosX, endPosZ); } }
void GetMultiTile(int x, int y, MultiTile currentTile) { foreach (MultiTileSecondDimension multi in currentTile.rows) { //Debug.Log(multi.tiles.Length); for (int x1 = 0; x1 < multi.tiles.Length; x1++) { if (tileMap[x + x1, y] == null) { tileMap[x + x1, y] = multi.tiles[x1]; } } y++; } }