All pastes #81643 Raw Edit

Untitled

public text v1 · immutable
·published 2006-07-07 18:40 UTC
rendered paste body
       public void TimedActivity(long currentTime, float secondDifference)
       {
           // this method gives the user the chance to override the default time if he prefers
           // to not use the TimeManager.

           double secondDifferenceSquaredDividedByTwo = (secondDifference * secondDifference) / 2.0;

           foreach (PhysicsObject po in mPhysicsObjectArray)
           {

               po.TimedActivity(currentTime, secondDifference, secondDifferenceSquaredDividedByTwo);

               po.UpdateObject();
               
           }

           foreach (PhysicsObject po in mPhysicsObjectArray)
           {
               foreach (PhysicsObject poy in mPhysicsObjectArray)
               {

                   if (po != poy && po.CollisionCheck(poy))
                   {
                       po.FindCollisionForce(poy);
                   }

               }
           }

                   
       }