blender/source/gameengine/Ketsji/KXNetwork
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
..
CMakeLists.txt 2.50: 2009-06-08 20:08:19 +00:00
KX_NetworkEventManager.cpp 2.50: 2009-06-08 20:08:19 +00:00
KX_NetworkEventManager.h BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
KX_NetworkMessageActuator.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
KX_NetworkMessageActuator.h BGE Python API 2009-06-28 11:22:26 +00:00
KX_NetworkMessageSensor.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
KX_NetworkMessageSensor.h BGE Python API 2009-06-28 11:22:26 +00:00
KX_NetworkObjectActuator.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_NetworkObjectActuator.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_NetworkObjectSensor.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_NetworkObjectSensor.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
Makefile 2.50: 2009-06-08 20:08:19 +00:00
SConscript 2.50: 2009-06-08 20:08:19 +00:00