| Trees | Index | Help |
|
|---|
| Package svs_demogame :: Module scripts |
|
Author: Simon Yuill
Contact: simon@lipparosa.org
Copyright: 2005 Simon Yuill
License: GNU GPL version 2 or any later version
| Classes | |
|---|---|
Script |
Maintains code for a script, the code itself is treated as a module upon which functions are called when executed. |
ScriptHandler |
|
ScriptStore |
This class is used by the ScriptHandler to store data for scripts
between calls in the game loop. |
| Exceptions | |
|---|---|
ScriptException |
|
| Function Summary | |
|---|---|
Returns value used as part of the environemnt in which game scripts are run. | |
Import dynamically generated code as a module. | |
Loads the text file for the code functions available to game players. | |
Loads code to be used as template code for scriptable game entities. | |
Creates Script object with default code entry. | |
Creates Script object with specified code and
author. | |
Sets a value used as part of the environemnt in which game scripts are run. | |
| Variable Summary | |
|---|---|
Constants |
script_const = <svs_core.utilities.lib.Constants instanc...
|
| Function Details |
|---|
getScriptEnvironmentProperty(propertyName)Returns value used as part of the environemnt in which game scripts are run. |
importCode(code, name, add_to_sys_modules=0)Import dynamically generated code as a module. import foo is equivalent to foofile = open("/path/to/foo.py") foo = importCode(foofile,"foo",1) Returns a newly generated module. Written by Anders Hammarquist, http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/82234 |
loadGameCode(path=None)Loads the text file for the code functions available to game players. If path is not defined, loads the filesvs_demogame/gamecode.py.
|
loadTemplateCode(path=None)Loads code to be used as template code for scriptable game entities. |
makeEmptyScript()CreatesScript object with default code
entry.
|
makeScriptFromCode(code, author=None)CreatesScript object with specified code and
author.
|
setScriptEnvironmentProperty(propertyName, propertyValue)Sets a value used as part of the environemnt in which game scripts are run. |
| Variable Details |
|---|
script_const
|
| Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Thu Oct 20 15:30:24 2005 | http://epydoc.sf.net |