示例#1
0
 private float GetPlayerGridDistance(MyCubeGrid grid)
 {
     if (MySession.Static.ControlledEntity != null && MySession.Static.ControlledEntity.Entity != null)
     {
         return((float)Vector3D.Distance(MySession.Static.ControlledEntity.Entity.PositionComp.GetPosition(), grid.GetBaseEntity().PositionComp.GetPosition()));
     }
     return(float.MaxValue);
 }
示例#2
0
 private float GetPlayerGridDistance(MyCubeGrid grid)
 {
     return((float)Vector3D.Distance(MySession.ControlledEntity.Entity.PositionComp.GetPosition(), grid.GetBaseEntity().PositionComp.GetPosition()));
 }