Browse Source

added ability to query airborne state. Be careful this only works if the walker supports the airborne state

Josh Wilson 19 years ago
parent
commit
c1f040a7d1
2 changed files with 6 additions and 0 deletions
  1. 3 0
      direct/src/controls/ControlManager.py
  2. 3 0
      direct/src/controls/GravityWalker.py

+ 3 - 0
direct/src/controls/ControlManager.py

@@ -178,6 +178,9 @@ class ControlManager:
     def getSpeeds(self):
         return self.currentControls.getSpeeds()
 
+    def getIsAirborne(self):
+        return self.currentControls.getIsAirborne()
+    
     def setTag(self, key, value):
         assert self.notify.debugCall(id(self))
         for controls in self.controls.values():

+ 3 - 0
direct/src/controls/GravityWalker.py

@@ -167,6 +167,9 @@ class GravityWalker(DirectObject.DirectObject):
         #assert self.debugPrint("getSpeeds()")
         return (self.speed, self.rotationSpeed, self.slideSpeed)
 
+    def getIsAirborne(self):
+        return self.isAirborne
+    
     def setAvatar(self, avatar):
         self.avatar = avatar
         if avatar is not None: