Public Member Functions | |
def | __init__ |
def | handleAvatarControls |
def | jumpPressed |
![]() | |
def | __init__ |
def | addBlastForce |
def | debugPrint |
def | deleteCollisions |
def | disableAvatarControls |
def | displayDebugInfo |
def | doDeltaPos |
def | enableAvatarControls |
def | flushEventHandlers |
def | getAirborneHeight |
def | getCollisionsActive |
def | getGravity |
def | getIsAirborne |
def | getSpeeds |
def | getVelocity |
def | handleAvatarControls |
def | initializeCollisions |
def | oneTimeCollide |
def | placeOnFloor |
def | reset |
def | setAirborneHeightFunc |
def | setAvatar |
def | setAvatarPhysicsIndicator |
def | setCollisionRayHeight |
def | setCollisionsActive |
def | setFloorBitMask |
def | setGravity |
def | setMayJump |
def | setPriorParentVector |
def | setTag |
def | setupEventSphere |
def | setupFloorSphere |
def | setupRay |
def | setupWallSphere |
def | setWalkSpeed |
def | setWallBitMask |
def | startJumpDelay |
def | swapFloorBitMask |
Static Public Attributes | |
tuple | earlyEventSphere = base.config.GetBool('early-event-sphere', 0) |
tuple | notify = directNotify.newCategory("TwoDWalker") |
tuple | wantDebugIndicator = base.config.GetBool('want-avatar-physics-indicator', 0) |
tuple | wantFloorSphere = base.config.GetBool('want-floor-sphere', 0) |
![]() | |
tuple | DiagonalFactor = math.sqrt(2.) |
tuple | earlyEventSphere = base.config.GetBool('early-event-sphere', 0) |
tuple | notify = directNotify.newCategory("GravityWalker") |
tuple | wantDebugIndicator = base.config.GetBool('want-avatar-physics-indicator', 0) |
tuple | wantFloorSphere = base.config.GetBool('want-floor-sphere', 0) |
The TwoDWalker is primarily for a 2D Scroller game environment. Eg - Toon Blitz minigame. TODO: This class is still work in progress. Currently Toon Blitz is using this only for jumping. Moving the Toon left to right is handled by toontown/src/minigame/TwoDDrive.py. I eventually want this class to control all the 2 D movements, possibly with a customizable input list.
def __init__ | ( | self, | |
gravity = -32.1740 , |
|||
standableGround = 0.707 , |
|||
hardLandingForce = 16.0 |
|||
) |
def handleAvatarControls | ( | self, | |
task | |||
) |
Check on the arrow keys and update the avatar.
def jumpPressed | ( | self | ) |
This function should be called from TwoDDrive when the jump key is pressed.
|
static |
isAirborne |
|
static |
priorParent |
|
static |
|
static |