Module pong3dglo :: Class myGame
[frames] | no frames]

Class myGame

source code


Pong game logic derived from simple gemelogic base class. This is the main class, subclassed off his parent base gamelogic01 to have a custom game. Other classes are involved to manage menus, inputs, scores and such, and you can find all this stuff in the following files: gameLogic01.py, scorer.py, dgstuff.py, easyinput.py,

Instance Methods
 
__init__(self, gameplay) source code
 
abortgame(self, foo=None) (Inherited from gamelogic01.gameLogic01) source code
 
dbgprint(self, msg) (Inherited from gamelogic01.gameLogic01) source code
 
defaultFilter(self, request, args)
This is the function that is called if there is no filterState() method for a particular state name. (Inherited from gamelogic01.gameLogic01)
source code
 
enterGameplay(self, *args)
will enter here after 'Gameplay' FSM request. (Inherited from gamelogic01.gameLogic01)
source code
 
enterMenu(self, *args) (Inherited from gamelogic01.gameLogic01) source code
 
enterTitle(self, *args) (Inherited from gamelogic01.gameLogic01) source code
 
exitGameplay(self) (Inherited from gamelogic01.gameLogic01) source code
 
exitMenu(self) (Inherited from gamelogic01.gameLogic01) source code
 
exitTitle(self) (Inherited from gamelogic01.gameLogic01) source code
 
filterGameplay(self, request, args) (Inherited from gamelogic01.gameLogic01) source code
 
filterMenu(self, request, *args) (Inherited from gamelogic01.gameLogic01) source code
 
filterTitle(self, request, args) (Inherited from gamelogic01.gameLogic01) source code
 
istuneplaying(self) (Inherited from gamelogic01.gameLogic01) source code
 
playtune(self, tunetoplay='')
Helper to play sounds (Inherited from gamelogic01.gameLogic01)
source code
 
pop_menu(self, foo=None) (Inherited from gamelogic01.gameLogic01) source code
 
postgameover(self, score=None)
manages what happens as the game ends
source code
 
push_entry(self, menudata) (Inherited from gamelogic01.gameLogic01) source code
 
push_menu(self, menudata) (Inherited from gamelogic01.gameLogic01) source code
 
setgamemode(self, index=None) source code
 
setinputs(self, on=True)
FSM keyboard inputs (Inherited from gamelogic01.gameLogic01)
source code
 
setopponent(self, index=None) source code
 
setvideo(self, index=None)
handler called by menu_options_video
source code
 
walktree(self, top, ext='.ogg') (Inherited from gamelogic01.gameLogic01) source code

Inherited from direct.showbase.ShowBase.ShowBase: SetAllSfxEnables, addAngularIntegrator, addSfxManager, backfaceCullingOff, backfaceCullingOn, changeMouseInterface, closeWindow, createBaseAudioManagers, createStats, destroy, disableAllAudio, disableMouse, disableParticles, enableAllAudio, enableMouse, enableMusic, enableParticles, enableSoftwareMousePointer, enableSoundEffects, exitfunc, finalizeExit, getAlt, getAspectRatio, getBackgroundColor, getControl, getExitErrorCode, getMeta, getRepository, getShift, getSize, initShadowTrav, isMainWindowOpen, isParticleMgrEnabled, isPhysicsMgrEnabled, loadMusic, loadSfx, makeAllPipes, makeCamera, makeCamera2d, makeCamera2dp, makeDefaultPipe, makeModulePipe, movie, oobe, oobeCull, openDefaultWindow, openMainWindow, openWindow, playMusic, playSfx, popCTrav, printEnvDebugInfo, pushCTrav, removeCameraFrustum, restart, reviveInput, run, saveCubeMap, saveSphereMap, screenshot, setBackgroundColor, setFrameRateMeter, setMouseOnNode, setSleep, setupDataGraph, setupMouse, setupMouseCB, setupRender, setupRender2d, setupRender2dp, setupWindowControls, showCameraFrustum, shutdown, silenceInput, sleepCycleTask, startDirect, startTk, startWx, textureOff, textureOn, toggleBackface, toggleParticles, toggleShowVertices, toggleTexMem, toggleTexture, toggleWireframe, updateManagers, useDrive, useTrackball, userExit, windowEvent, wireframeOff, wireframeOn

Inherited from direct.showbase.DirectObject.DirectObject: accept, acceptOnce, addTask, classTree, detectLeaks, doMethodLater, getAllAccepting, ignore, ignoreAll, isAccepting, isIgnoring, removeAllTasks, removeTask

Inherited from direct.fsm.FSM.FSM: __getattr__, __repr__, __str__, cleanup, defaultEnter, defaultExit, demand, filterOff, forceTransition, getCurrentOrNextState, getStateChangeEvent, isInTransition, request, requestNext, requestPrev, setBroadcastStateChanges, setStateArray

Class Variables
  GS_MODES = ['3d', '3dg']
  GS_OPPONENTS = ['human', 'cpu']
  SCOREFILE = 'pong3d.sco'
  gameplayshell = None (Inherited from gamelogic01.gameLogic01)
  playingtune = None (Inherited from gamelogic01.gameLogic01)

Inherited from direct.showbase.ShowBase.ShowBase: notify

Inherited from direct.fsm.FSM.FSM: SerialNum, defaultTransitions

Method Details

__init__(self, gameplay)
(Constructor)

source code 
Overrides: direct.fsm.FSM.FSM.__init__

postgameover(self, score=None)

source code 

manages what happens as the game ends

Overrides: gamelogic01.gameLogic01.postgameover