Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | Static Public Attributes

# TwoDWalker Class Reference

Inheritance diagram for TwoDWalker:

List of all members.

## Public Member Functions
def | __init__
def | handleAvatarControls
def | jumpPressed
## Public Attributes
| isAirborne
| priorParent
## 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)

## Detailed Description

    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.

## Constructor & Destructor Documentation

def __init__ | ( |  | self,
|  |  | gravity = `-32.1740`,
|  |  | standableGround = `0.707`,
|  |  | hardLandingForce = `16.0`
| ) |  |

## Member Function Documentation

def handleAvatarControls | ( |  | self,
|  |  | task
| ) |  |

    Check on the arrow keys and update the avatar.

Reimplemented from GravityWalker.

def jumpPressed | ( |  | self | ) |

    This function should be called from TwoDDrive when the jump key is pressed.

## Member Data Documentation

tuple earlyEventSphere = base.config.GetBool('early-event-sphere', 0)`[static]`

Reimplemented from GravityWalker.

isAirborne

Reimplemented from GravityWalker.

tuple notify = directNotify.newCategory("TwoDWalker")`[static]`

Reimplemented from GravityWalker.

priorParent

Reimplemented from GravityWalker.

tuple wantDebugIndicator = base.config.GetBool('want-avatar-physics-indicator', 0)`[static]`

Reimplemented from GravityWalker.

tuple wantFloorSphere = base.config.GetBool('want-floor-sphere', 0)`[static]`

Reimplemented from GravityWalker.

All Classes Namespaces Functions Variables Enumerations Enumerator Properties