Esempio n. 1
0
 public override float GetWeight()
 {
     if (!CanDrop())
     {
         return(0f);
     }
     if (IsInState())
     {
         return(10000f);
     }
     if (brain.CurrentState != null && brain.CurrentState.StateType == AIState.Orbit && brain.CurrentState.TimeInState > 60f)
     {
         CH47DropZone closest = CH47DropZone.GetClosest(brain.mainInterestPoint);
         if ((bool)closest && Vector3Ex.Distance2D(closest.transform.position, brain.mainInterestPoint) < 200f)
         {
             CH47AIBrain component = brain.GetComponent <CH47AIBrain>();
             if (component != null)
             {
                 float num = Mathf.InverseLerp(300f, 600f, component.Age);
                 return(1000f * num);
             }
         }
     }
     return(0f);
 }
Esempio n. 2
0
        public override float GetWeight()
        {
            if (this.brain.GetEntity().OutOfCrates() && !this.brain.GetEntity().ShouldLand())
            {
                return(10000f);
            }
            CH47AIBrain component = (CH47AIBrain)((Component)this.brain).GetComponent <CH47AIBrain>();

            return(Object.op_Inequality((Object)component, (Object)null) && (double)component.age > 600.0 ? 10000f : 0.0f);
        }
Esempio n. 3
0
        public override float GetWeight()
        {
            if (brain.GetEntity().OutOfCrates() && !brain.GetEntity().ShouldLand())
            {
                return(10000f);
            }
            CH47AIBrain component = brain.GetComponent <CH47AIBrain>();

            if (component != null)
            {
                if (!(component.Age > 1800f))
                {
                    return(0f);
                }
                return(10000f);
            }
            return(0f);
        }
Esempio n. 4
0
        public override float GetWeight()
        {
            if (this.brain.GetEntity().OutOfCrates() && !this.brain.GetEntity().ShouldLand())
            {
                return(10000f);
            }
            CH47AIBrain component = this.brain.GetComponent <CH47AIBrain>();

            if (component == null)
            {
                return(0f);
            }
            if (component.age <= 600f)
            {
                return(0f);
            }
            return(10000f);
        }