direct.controls.TwoDWalker

from direct.controls.TwoDWalker import TwoDWalker

TwoDWalker.py is for controlling the avatars in a 2D scroller game environment.

Inheritance diagram

Inheritance diagram of direct.controls.TwoDWalker

class TwoDWalker(gravity=-32.174, standableGround=0.707, hardLandingForce=16.0)[source]

Bases: GravityWalker

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.

__init__(self, gravity=-32.174, standableGround=0.707, hardLandingForce=16.0)[source]
earlyEventSphere = 0
handleAvatarControls(self, task)[source]

Check on the arrow keys and update the avatar.

jumpPressed(self)[source]

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

notify = <direct.directnotify.Notifier.Notifier object>
wantDebugIndicator = 0
wantFloorSphere = 0