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>();
            }
        }
Пример #3
0
 public FollowInViewAction(OverworldShip ship, GameObjectOverworld target)
 {
     this.ship   = ship;
     this.target = target;
 }
Пример #4
0
 public BeginLevelCollisionEvent(Game1 game, OverworldShip ship, GameObjectOverworld target)
     : base(game, ship, target)
 {
 }
Пример #5
0
 public TravelAction(OverworldShip ship, GameObjectOverworld target)
 {
     this.ship   = ship;
     this.target = target;
 }
Пример #6
0
 public WaitTimeAction(OverworldShip ship, int time)
 {
     this.ship     = ship;
     this.waitTime = time;
     counter       = 0;
 }
Пример #7
0
 public CollisionEvent(Game1 game, OverworldShip ship, GameObjectOverworld target)
 {
     this.game   = game;
     this.ship   = ship;
     this.target = target;
 }
Пример #8
0
 public RemoveOnCollisionEvent(Game1 game, OverworldShip ship, GameObjectOverworld target)
     : base(game, ship, target)
 {
 }
Пример #9
0
        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;
        }
Пример #10
0
 public PirateColllisionEvent(Game1 game, OverworldShip ship, GameObjectOverworld target)
     : base(game, ship, target)
 {
 }