blender/source/gameengine/Expressions
Campbell Barton 9a7ea9664e BGE PyAPI support for subclassing any BGE game type from python, scripters define extra functions on gameObjects.
Adding a UI to set the type on startup can be added easily.

# ----
class myPlayer(GameTypes.KX_GameObject):
  def die(self):
    # ... do stuff ...
    self.endObject()

# make an instance
player = myPlayer(gameOb) # gameOb is made invalid now.
player.die()

# ----

One limitation (which could also be an advantage), is making the subclass instance will return that subclass everywhere, you cant have 2 different subclasses of the same BGE data at once.
2009-06-29 12:06:46 +00:00
..
BoolValue.cpp BGE PyAPI support for subclassing any BGE game type from python, scripters define extra functions on gameObjects. 2009-06-29 12:06:46 +00:00
BoolValue.h 2.50: 2009-06-08 20:08:19 +00:00
CMakeLists.txt more corrections from cleanup :/ 2009-06-21 17:03:17 +00:00
ConstExpr.cpp 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD 2009-04-20 15:06:46 +00:00
ConstExpr.h 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD 2009-04-20 15:06:46 +00:00
EmptyValue.cpp 2.50: 2009-06-08 20:08:19 +00:00
EmptyValue.h 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD 2009-04-20 15:06:46 +00:00
ErrorValue.cpp 2.50: 2009-06-08 20:08:19 +00:00
ErrorValue.h 2.50: 2009-06-08 20:08:19 +00:00
EXP_C-Api.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
EXP_C-Api.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
Expression.cpp Various mem leaks related to CValue reference count fixed 2008-03-01 19:46:50 +00:00
Expression.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
FloatValue.cpp 2.50: 2009-06-08 20:08:19 +00:00
FloatValue.h 2.50: 2009-06-08 20:08:19 +00:00
IdentifierExpr.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
IdentifierExpr.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
IfExpr.cpp 2.50: 2009-06-08 20:08:19 +00:00
IfExpr.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
InputParser.cpp BGE Py API 2009-06-16 07:16:51 +00:00
InputParser.h 2.50: 2009-06-08 20:08:19 +00:00
IntValue.cpp BGE Py API using python3 c/api calls. include bpy_compat.h to support py2.x 2009-06-29 02:25:54 +00:00
IntValue.h 2.50: 2009-06-08 20:08:19 +00:00
KX_HashedPtr.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_HashedPtr.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_Python_dynamic.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_Python_static.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_Python.h PyAPI RNA/BGE 2009-06-25 10:11:37 +00:00
ListValue.cpp BGE PyAPI support for subclassing any BGE game type from python, scripters define extra functions on gameObjects. 2009-06-29 12:06:46 +00:00
ListValue.h BGE Python API 2009-06-28 11:22:26 +00:00
Makefile 2.5 2009-06-23 16:57:46 +00:00
Operator1Expr.cpp Last of the config.h mods... 2002-11-25 15:29:57 +00:00
Operator1Expr.h Synchronise game engine with Tuhopuu2 tree. 2004-04-24 06:40:15 +00:00
Operator2Expr.cpp Synchronise game engine with Tuhopuu2 tree. 2004-04-24 06:40:15 +00:00
Operator2Expr.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
PyObjectPlus.cpp BGE PyAPI support for subclassing any BGE game type from python, scripters define extra functions on gameObjects. 2009-06-29 12:06:46 +00:00
PyObjectPlus.h BGE PyAPI support for subclassing any BGE game type from python, scripters define extra functions on gameObjects. 2009-06-29 12:06:46 +00:00
SConscript Fix for compiler error since BLO_sys_types.h was not in the path 2009-06-18 21:25:21 +00:00
StringValue.cpp 2.50: 2009-06-08 20:08:19 +00:00
StringValue.h BGE Py API using python3 c/api calls. include bpy_compat.h to support py2.x 2009-06-29 02:25:54 +00:00
Value.cpp BGE PyAPI support for subclassing any BGE game type from python, scripters define extra functions on gameObjects. 2009-06-29 12:06:46 +00:00
Value.h BGE Py API using python3 c/api calls. include bpy_compat.h to support py2.x 2009-06-29 02:25:54 +00:00
VectorValue.cpp 2.50: 2009-06-08 20:08:19 +00:00
VectorValue.h 2.50: 2009-06-08 20:08:19 +00:00
VoidValue.h 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD 2009-04-20 15:06:46 +00:00