Example #1
0
        public void UseTime()
        {
            var deltaTime = PhysicsTimer.CurrentTime - LastUpdate;

            if (deltaTime < 0.0f)
            {
                LastUpdate = PhysicsTimer.CurrentTime;
                return;
            }
            if (deltaTime < PhysicsGlobals.MinQuantum)
            {
                return;
            }

            foreach (var obj in Iter)
            {
                obj.update_object();
                if (Player.Equals(obj))
                {
                    SmartBox.PlayerPhysicsUpdatedCallback();
                }
            }
            //foreach (var obj in StaticAnimatingObjects)
            //    obj.animate_static_object();

            LastUpdate = PhysicsTimer.CurrentTime;
        }
Example #2
0
 public bool IsPartOfPlayerObj()
 {
     return(PhysObj.Equals(PlayerObject));
 }