コード例 #1
0
        public static ActionFeedback[] PatrolRouteMission(PatrolRouteMission mission, Actor actor)
        {
            //Push it back on the stack
            actor.MissionStack.Push(mission);

            var nextPoint = mission.GetNextPoint();

            //Create a move to mission which moves the actor to the next point
            WalkToMission wTM = new WalkToMission()
            {
                TargetCoordinate = nextPoint.Coordinate,
                AcceptableRadius = nextPoint.AcceptableRadius
            };

            actor.CurrentMission = wTM;

            //Log it
            Console.WriteLine("Actor " + actor.ToString() + " is going to" + wTM.TargetCoordinate.ToString() + " as part of his patrol route");

            return new ActionFeedback[] { };
        }
コード例 #2
0
        public static ActionFeedback[] PatrolMission(PatrolMission mission, Actor actor)
        {
            //Create a move to mission which moves the actor to the point of interest
            PointOfInterest poi = GameState.LocalMap.PointsOfInterest[GameState.Random.Next(GameState.LocalMap.PointsOfInterest.Count)];

            //Push the patrol on the stack
            actor.MissionStack.Push(mission);

            //Log it
            Console.WriteLine("Actor " + actor.ToString() + " is going to" + poi.Coordinate.ToString());

            actor.CurrentMission = new WalkToMission()
            {
                TargetCoordinate = poi.Coordinate
            };

            return new ActionFeedback[] { };
        }