Module MyGameWorld :: Class MY_SingleGameWorld
[hide private]
[frames] | no frames]

Class MY_SingleGameWorld

source code

object --+
         |
        MY_SingleGameWorld

singleton class of the game's world to set all its laws

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
setDefaultWorld(self)
resets the whole game world to default values
source code
 
setGravityDirection(self, character_orientation)
sets the direction of gravity by character_orientation
source code
 
setFeedBack(self, controller, feedback_item, anim=False)
sets the feedback pictures in the middle of the screen
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
a new object with type S, a subtype of T
__new__(self, *args, **kargs) source code
Class Variables [hide private]
  __instance = None
Instance Variables [hide private]
Boolean boxIntro
True if player has to use the power switch to start the game
Integer deleteDelay
the amount of the delay for deleting objects
Integer (0,1,2) gravityAxis
the axis of the gravity direction
Float gravityForce
the power of the gravity (default 9.81)
Vector gravityVector
the standardized vector for gravity direction
Boolean isPaused
True if the whole world was stopped by an event
Boolean isUnusual
True if you want the pure stair insanity
Boolean nextHurdle
True if it is time for a new hurdle
Integer nextItemTime
this is the counter variable for setting an item in the game
Integer numberOfHurdle
the number of all hurdles in the game
Integer (1 or -1) planeForceDirection
the gravity direction in the current plane (up=1 or down=-1)
Matrix planeRotationMatrix
the rotation matrix that holds the information for every object to know how to get the head up in the sky (world coords)
Boolean restartGame
True if the game shall be restarted
Boolean soundOn
True if the sound in the background is switched on, False for off
Boolean specialKeys
True if the player has to use special key input dependent on the current plane of the player
Boolean switchOn
True is player has used the power switch
Boolean tpcOn
True if the third person camera shall appear in the lower left corner of the window, False if you wish no visible third person camera
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__new__(self, *args, **kargs)
Static Method

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__
(inherited documentation)

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

setGravityDirection(self, character_orientation)

source code 

sets the direction of gravity by character_orientation

Parameters:
  • character_orientation (Matrix) - the current orientation of the player character

setFeedBack(self, controller, feedback_item, anim=False)

source code 

sets the feedback pictures in the middle of the screen

Parameters:
  • controller (the controler where the ipo actuator is connected to (only useful with anim=True)) - SCA_PythonController
  • feedback_item (String) - the name of the feedback that will appear
  • anim (Boolean) - True if there will be an animation (use skill items), False for not feasible actions and game options like sound