public FollowObjective(Game1 game, Mission mission, String description, EventTextCapsule eventTextCapsule, String startMessage, Vector2 startingPosition, Vector2 shipSpacing, params OverworldShip[] ships) : base(game, mission, description) { Setup(eventTextCapsule, startMessage, startingPosition, shipSpacing, ships); }
public CustomObjective(Game1 game, Mission mission, String description, EventTextCapsule eventTextCapsule, System.Action activateLogic, System.Action updateLogic, Func <Boolean> completedCondition, Func <Boolean> failedCondition) : base(game, mission, description) { SetupEventText(eventTextCapsule); SetupLogic(activateLogic, updateLogic, completedCondition, failedCondition); }
public CustomObjective(Game1 game, Mission mission, String description, EventTextCapsule eventTextCapsule) : base(game, mission, description) { SetupEventText(eventTextCapsule); SetupLogic(delegate { }, delegate { }, delegate { return(GameStateManager.currentState.Equals("OverworldState")); }, delegate { return(false); }); }
public ItemTransportObjective(Game1 game, Mission mission, String description, Item item, EventTextCapsule eventTextCapsule) : base(game, mission, description) { Setup(item); objectiveCompletedEventText = eventTextCapsule.CompletedText; eventTextCanvas = eventTextCapsule.EventTextCanvas; objectiveFailedEventText = eventTextCapsule.FailedText; }
public ResponseObjective(Game1 game, Mission mission, String description, ResponseTextCapsule responseTextCapsule, EventTextCapsule eventTextCapsule) : base(game, mission, description) { Setup(responseTextCapsule); objectiveCompletedEventText = eventTextCapsule.CompletedText; objectiveFailedEventText = eventTextCapsule.FailedText; eventTextCanvas = eventTextCapsule.EventTextCanvas; }
public EscortObjective(Game1 game, Mission mission, String description, EscortDataCapsule escortDataCapsule, EventTextCapsule eventTextCapsule) : base(game, mission, description) { Setup(escortDataCapsule); objectiveCompletedEventText = eventTextCapsule.CompletedText; eventTextCanvas = eventTextCapsule.EventTextCanvas; objectiveFailedEventText = eventTextCapsule.FailedText; }
public void SetEventText(EventTextCapsule eventTextCapsule) { objectiveCompletedEventText = eventTextCapsule.CompletedText; eventTextCanvas = eventTextCapsule.EventTextCanvas; objectiveFailedEventText = eventTextCapsule.FailedText; if (eventTextCapsule.Portraits.Count > 0) { SetupPortraits(eventTextCapsule.Portraits, eventTextCapsule.PortraitTriggers); } }
public CloseInOnLocationObjective(Game1 game, Mission mission, String description, int radius, EventTextCapsule eventTextCapsule) : base(game, mission, description) { this.radius = radius; objectiveCompletedEventText = eventTextCapsule.CompletedText; eventTextCanvas = eventTextCapsule.EventTextCanvas; objectiveFailedEventText = eventTextCapsule.FailedText; if (eventTextCapsule.Portraits.Count > 0) { SetupPortraits(eventTextCapsule.Portraits, eventTextCapsule.PortraitTriggers); } }
public ShootingLevelObjective(Game1 game, Mission mission, String description, String level, LevelStartCondition levelStartCondition, EventTextCapsule eventTextCapsule) : base(game, mission, description) { Setup(level, levelStartCondition); eventTextCanvas = eventTextCapsule.EventTextCanvas; objectiveCompletedEventText = eventTextCapsule.CompletedText; objectiveFailedEventText = eventTextCapsule.FailedText; if (eventTextCapsule.Portraits.Count > 0) { SetupPortraits(eventTextCapsule.Portraits, eventTextCapsule.PortraitTriggers); } }
public FollowObjective(Game1 game, Mission mission, String description, EventTextCapsule eventTextCapsule, String startMessage, Vector2 startingPosition, Vector2 shipSpacing, int deviationRadius, String deviationMessage, params OverworldShip[] ships) : base(game, mission, description) { Setup(eventTextCapsule, startMessage, startingPosition, shipSpacing, ships); this.deviationRadius = deviationRadius; this.deviationMessage = deviationMessage; if (deviationRadius > 0) { deviationAllowed = false; } else { deviationAllowed = true; } }
public AutoPilotObjective(Game1 game, Mission mission, String description, float speed, List <OverworldShip> companions, Vector2 companionStartingPos, EventTextCapsule eventTextCapsule, bool realTime = true) : base(game, mission, description) { this.speed = speed; ships = companions; this.companionStartingPos = companionStartingPos; this.realTime = realTime; objectiveCompletedEventText = eventTextCapsule.CompletedText; eventTextCanvas = eventTextCapsule.EventTextCanvas; objectiveFailedEventText = eventTextCapsule.FailedText; if (eventTextCapsule.Portraits.Count > 0) { SetupPortraits(eventTextCapsule.Portraits, eventTextCapsule.PortraitTriggers); } }
private void Setup(EventTextCapsule eventTextCapsule, String startMessage, Vector2 startingPosition, Vector2 spacing, params OverworldShip[] ships) { if (eventTextCapsule.CompletedText != null) { objectiveCompletedEventText = eventTextCapsule.CompletedText; } if (eventTextCapsule.FailedText != null) { objectiveFailedEventText = eventTextCapsule.FailedText; } eventTextCanvas = eventTextCapsule.EventTextCanvas; this.startMessage = startMessage; this.startingPosition = startingPosition; this.spacing = spacing; if (ships.Length < 1) { throw new ArgumentException("At least on ship is needed for this objective."); } else if (ships.Length == 1) { spacing = Vector2.Zero; } shipsToFollow = new List <OverworldShip>(); foreach (OverworldShip ship in ships) { shipsToFollow.Add(ship); } }