public void SetOrderControl(OrderControl orderControl, int?index = null) { if (index == null) { this.orderControl = orderControl; transform.color = orderControl.color; } }
public BoardTile(BoardShape boardShape, Vector2 position, Texture2D texture, int size, Board board) : base(position, texture, board) { this.board = board; boardTileShape = boardShape; transform.SetSize(new Vector2(size, size), texture); transform.LayerDepth = EngManager.layerDepths[LayerDepths.Ground]; creature = null; orderControl = null; if (boardShape == BoardShape.Square) { BoardTileSquare(position, texture, size); } }
protected IEnumerator SetOrderControl(Board board, BoardTile originSquare, int range, Color color, List <TileOrderCriteria> criteria = null, string description = "") { orderControl = new OrderControl(board, originSquare, range, color, criteria, description); while (!orderControl.cancelled) { if (orderControl.cancelled) { break; } if (orderControl.selection == null) { yield return(null); } else { orderControl.Cancel(); SelectionMade(); break; } } }
public void RemoveOrderControl() { this.orderControl = null; transform.color = Color.White; }