Example #1
0
 public void SetOrderControl(OrderControl orderControl, int?index = null)
 {
     if (index == null)
     {
         this.orderControl = orderControl;
         transform.color   = orderControl.color;
     }
 }
Example #2
0
        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);
            }
        }
Example #3
0
        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;
                }
            }
        }
Example #4
0
 public void RemoveOrderControl()
 {
     this.orderControl = null;
     transform.color   = Color.White;
 }