예제 #1
0
파일: PlayerAI.cs 프로젝트: Jecral/Football
        /// <summary>
        /// Instructs the player to go away from the action point.
        /// </summary>
        public PlayerAction GoAwayFromActionPoint(Point actionPoint)
        {
            Pathfinding pathfinding = new Pathfinding();

            List<Point> neighbors = pathfinding.GetValidNeighborPoints(actionPoint);
            if (neighbors.Count > 0)
            {
                return new PlayerAction(null, neighbors[0], ActionType.Run);
            }
            else
            {
                return null;
            }
        }