Esempio n. 1
0
        public override Activity Tick(Actor self)
        {
            if (IsCanceled)
            {
                return(NextActivity);
            }

            if (requireSpace && !helicopter.CanLand(self.Location))
            {
                return(this);
            }

            if (!playedSound && helicopter.Info.LandingSound != null && !self.IsAtGroundLevel())
            {
                Sound.Play(helicopter.Info.LandingSound);
                playedSound = true;
            }

            if (HeliFly.AdjustAltitude(self, helicopter, helicopter.Info.LandAltitude))
            {
                return(this);
            }

            return(NextActivity);
        }
Esempio n. 2
0
        public override Activity Tick(Actor self)
        {
            if (IsCanceled)
            {
                return(NextActivity);
            }

            if (requireSpace && !helicopter.CanLand(self.Location))
            {
                return(this);
            }

            if (HeliFly.AdjustAltitude(self, helicopter, landAltitude))
            {
                return(this);
            }

            return(NextActivity);
        }
Esempio n. 3
0
 bool CanUnload()
 {
     return(!IsEmpty(self) && (helicopter == null || helicopter.CanLand(self.Location)) &&
            CurrentAdjacentCells != null && CurrentAdjacentCells.Any(c => Passengers.Any(p => p.Trait <IPositionable>().CanEnterCell(c))));
 }