示例#1
0
 protected override void checkVoid()
 {
     // Debug.Log(LongPos.Distance(pos, curPlanet.scaledPos) + " " + curPlanet.atmosRadius);
     if (LongPos.Distance(pos, curPlanet.scaledPos) > curPlanet.atmosRadius)
     {
         curPlanet = null;
         updateChildRef();
     }
 }
示例#2
0
 protected override void checkBodies()
 {
     foreach (Planet plan in curSystem.planets)
     {
         if (LongPos.Distance(pos, plan.scaledPos) < plan.atmosRadius)
         {
             curPlanet = plan;
             UniverseSystem.curPlanet = plan;//TODO: c'mon sam
             enterBody();
             break;
         }
     }
 }
示例#3
0
 void checkPlanet()
 {
     //if on a planet, check to see if you are far enough to leave it
     if (onPlanet)
     {
         //if the distance from the planet is greater than it's enter radius, remove
         if (curPlanet.atmosRadius < LongPos.Distance(curPlanet.scaledPos, stellarPos))
         {
             exitPlanet();
         }
     }
     else//check all planets to see if you are close enough to one to enter it
     {
     }
 }