示例#1
0
 public void showInput()
 {
     inputChoices = selectedMove.getCastableLocations(Game.getPlayer().position);
     foreach (Vector2Int v in inputChoices)
     {
         Game.getDungeonBoard().gui.SetTile((Vector3Int)v, ShiblitzTile.inputHighlight);
     }
 }
示例#2
0
    public virtual void queueMove()
    {
        ShiblitzMove      move          = moves[UnityEngine.Random.Range(0, moves.Count)];
        List <Vector2Int> possibleMoves = move.getCastableLocations(position);

        if (possibleMoves.Count > 0)
        {
            Vector2Int moveLocation = possibleMoves[0];
            foreach (Vector2Int v in possibleMoves)
            {
                if (Vector2Int.Distance(v, Game.getPlayer().position) < Vector2Int.Distance(moveLocation, Game.getPlayer().position))
                {
                    moveLocation = v;
                }
            }
            Game.getDungeonBoard().gui.SetTile((Vector3Int)moveLocation, ShiblitzTile.enemyInputHighlight);
            move.setCastLocation(moveLocation);
            Game.QueueMove(move);
        }
    }