public static bool InRestrictedSpace(OverworldShip ship, Vector2 point) { foreach (SpaceRegion region in ship.restrictedSpace) { if (CollisionDetection.IsPointInsideRectangle(point, region.SpaceRegionArea)) { return(true); } } return(false); }
public EscortDataCapsule(OverworldShip shipToDefend, List <OverworldShip> enemyShips, List <OverworldShip> allyShips, Vector2 startingPoint, int enemyAttackStartTime, int enemyAttackFrequency, int shipToDefendHP, List <String> levels, List <int> timedMessageTriggers, float speed) { Setup(shipToDefend, enemyShips, startingPoint, levels, enemyAttackStartTime, enemyAttackFrequency); this.allyShips = allyShips; this.enemyAttackStartTime = enemyAttackStartTime; this.enemyAttackFrequency = enemyAttackFrequency; this.shipToDefendHP = shipToDefendHP; this.timedMessageTriggers = timedMessageTriggers; freighterSpeed = speed; if (this.allyShips == null) { this.allyShips = new List <OverworldShip>(); } }
private void Setup(OverworldShip shipToDefend, List <OverworldShip> enemyShips, Vector2 startingPoint, List <String> levels, int enemyAttackStartTime, int enemyAttackFrequency) { this.shipToDefend = shipToDefend; this.enemyShips = enemyShips; this.startingPoint = startingPoint; this.levels = levels; this.enemyAttackStartTime = enemyAttackStartTime; this.enemyAttackFrequency = enemyAttackFrequency; if (this.enemyShips == null) { this.enemyShips = new List <OverworldShip>(); } if (this.levels == null) { this.levels = new List <String>(); } }
public BeginLevelCollisionEvent(Game1 game, OverworldShip ship, GameObjectOverworld target) : base(game, ship, target) { }
public FollowInViewAction(OverworldShip ship, GameObjectOverworld target) { this.ship = ship; this.target = target; }
public WaitTimeAction(OverworldShip ship, int time) { this.ship = ship; this.waitTime = time; counter = 0; }
public RemoveOnCollisionEvent(Game1 game, OverworldShip ship, GameObjectOverworld target) : base(game, ship, target) { }
public TravelAction(OverworldShip ship, GameObjectOverworld target) { this.ship = ship; this.target = target; }
public CollisionEvent(Game1 game, OverworldShip ship, GameObjectOverworld target) { this.game = game; this.ship = ship; this.target = target; }
private float originalSpeed; // DANNE: Added a few lines to reset speed when WaitAction is finished public WaitAction(OverworldShip ship, Func <Boolean> condition) { this.ship = ship; this.condition = condition; originalSpeed = ship.speed; }
public PirateColllisionEvent(Game1 game, OverworldShip ship, GameObjectOverworld target) : base(game, ship, target) { }