Пример #1
0
 public static void RaycastAll(this IMyPhysics phy, ref LineD line, List <HitInfo <IMyEntity> > result)
 {
     phy.CastRay(line.From, line.To, tmpHits);
     result.Capacity = tmpHits.Count;
     result.AddRange(tmpHits.Select(h => new HitInfo <IMyEntity>(h.HitEntity, h.Position)));
     tmpHits.Clear();
 }
Пример #2
0
        public static HitInfo <IMyEntity> Raycast(this IMyPhysics phy, ref LineD line)
        {
            IHitInfo hit;

            if (phy.CastRay(line.From, line.To, out hit))
            {
                return(new HitInfo <IMyEntity>(hit.HitEntity, hit.Position));
            }
            return(null);
        }
Пример #3
0
 public static void Clean()
 {
     Session     = null;
     Entities    = null;
     Players     = null;
     CubeBuilder = null;
     if (IngameScripting != null)
     {
         IngameScripting.Clean();
     }
     IngameScripting       = null;
     TerminalActionsHelper = null;
     Utilities             = null;
     Parallel         = null;
     Physics          = null;
     Multiplayer      = null;
     PrefabManager    = null;
     Input            = null;
     TerminalControls = null;
 }
 public static void Clean()
 {
     Session = null;
     Entities = null;
     Players = null;
     CubeBuilder = null;
     if (IngameScripting != null)
     {
         IngameScripting.Clean();
     }
     IngameScripting = null;
     TerminalActionsHelper = null;
     Utilities = null;
     Parallel = null;
     Physics = null;
     Multiplayer = null;
     PrefabManager = null;
     Input = null;
     TerminalControls = null;
 }