//First label
add_library('box2d_processing')
add_library('jbox2d')
from gameInterface import GameInterface
def setup():
global gameI
box2D =Box2DProcessing(this)
gameI=GameInterface(box2D)
//Second label
class GameInterface:
def __init__(self,b):
self.box2d=b
class rectBoundary:
bd=BodyDef()
If I initialize the BodyDef() in the setup() and deliver it through the init(),
it can work.
But compared to java. Why can’t I directly use the class from library in the class which created by myself?