示例#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);
        }
示例#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);
        }
示例#3
0
文件: Cargo.cs 项目: wytsep/OpenRA
 bool CanUnload()
 {
     return(!IsEmpty(self) && (helicopter == null || helicopter.CanLand(self.Location)) &&
            CurrentAdjacentCells != null && CurrentAdjacentCells.Any(c => Passengers.Any(p => p.Trait <IPositionable>().CanEnterCell(c))));
 }