示例#1
0
        public List <BattleAction> getRangedAttackActionList(int x, int y)
        {
            List <BattleAction> actionList = new List <BattleAction>();

            actionList.Add(new BattleAction()
            {
                character = ActiveCharacter, targetTile = board.getTileFromLocation(x, y), actionType = BattleActionType.RangedAttack
            });
            return(actionList);
        }
示例#2
0
        //iterates over the path find and moves single spaces
        public static void moveToPlayer(GameCharacter enemy, GameCharacter target, Board board)
        {
            var pointList = PathFind.Pathfind(board, enemy.x, enemy.y, target.x, target.y);

            foreach (var p in pointList)
            {
                board.MoveCharacter(enemy, board.getTileFromLocation(p.x, p.y));
            }
        }
示例#3
0
文件: AI.cs 项目: mengtest/UnityRPG
 //iterates over the path find and moves single spaces
 public static void moveToPlayer(GameCharacter enemy, GameCharacter target, Board board)
 {
     var pointList = PathFind.Pathfind(board, enemy.x, enemy.y, target.x, target.y);
     foreach(var p in pointList)
     {
         
         board.MoveCharacter(enemy, board.getTileFromLocation(p.x, p.y));
           
        
     }
 }