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); }
//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)); } }
//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)); } }