Blender Git Commit Log

Git Commits -> Revision 7730391

Revision 7730391 by Porteries Tristan (master)
April 15, 2015, 12:02 (GMT)
BGE: subclass with more than 1 argument, D1237

In the BGE you can't create a subclass with more than 1 argument like : "player = Player(owner, 10)"
I have modified the py_base_new to check only the first argument of args tuple.
Now we can do :

class Player(types.KX_GameObject):
def __init__(self, gameobj, life):
print("create new player :", self, ", life :", life)

player = Player(own, 50)

Commit Details:

Full Hash: 7730391d7425a8581cf16b3a6510acc56108071c
Parent Commit: b9ea6fb
Committed By: Campbell Barton
Lines Changed: +7, -2

By: Miika HämäläinenLast update: Nov-07-2014 14:18 MiikaHweb | 2003-2019