This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/gameengine/Converter
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
..
2009-06-28 11:22:26 +00:00
2009-06-21 16:18:38 +00:00
2009-06-08 20:08:19 +00:00
2009-06-08 20:08:19 +00:00
2009-06-08 20:08:19 +00:00
2009-06-08 20:08:19 +00:00
2009-06-08 20:08:19 +00:00
2009-06-08 20:08:19 +00:00
2009-06-28 11:22:26 +00:00
2009-06-08 20:08:19 +00:00
2009-06-08 20:08:19 +00:00
2009-06-08 20:08:19 +00:00
2009-06-08 20:08:19 +00:00
2009-06-08 20:08:19 +00:00
2.5
2009-06-18 19:25:58 +00:00
2009-06-21 16:18:38 +00:00
2009-06-08 20:08:19 +00:00
2009-06-08 20:08:19 +00:00
2009-06-08 20:08:19 +00:00
2009-06-08 20:08:19 +00:00
2009-06-08 20:08:19 +00:00
2009-06-08 20:08:19 +00:00
2009-06-08 20:08:19 +00:00
2009-06-15 11:47:16 +00:00
2009-06-21 16:18:38 +00:00
2009-06-21 16:18:38 +00:00