Пример #1
0
        public float2 GetRepulseForce(Actor self, Actor h, Aircraft hAir)
        {
            if (self == h)
                return float2.Zero;
            if( hAir.Altitude < Altitude )
                return float2.Zero;
            var d = self.CenterLocation - h.CenterLocation;

            if (d.Length > Info.IdealSeparation)
                return float2.Zero;

            if (d.LengthSquared < Epsilon)
                return float2.FromAngle((float)self.World.SharedRandom.NextDouble() * 3.14f);
            return (5 / d.LengthSquared) * d;
        }
Пример #2
0
 public DebugAircraftSubPxY(Actor self)
 {
     a = self.Trait <Aircraft>();
 }
Пример #3
0
 public DebugAircraftAltitude(Actor self)
 {
     a = self.Trait <Aircraft>();
 }
Пример #4
0
 public DebugAircraftFacing(Actor self)
 {
     a = self.Trait <Aircraft>();
 }