Пример #1
0
def OnInit():
	random.seed()
	print(sys.path)
	_ctx = Context.GetInstance()
	_ctx.stateMachine = StateMachine()
	_ctx.viewer = Viewer.GetInstance()
	_ctx.viewer.Init()
	_ctx.LoadImages()
Пример #2
0
    def OnBaseCreate(self):
        print("<<<<<<Avatar OnBaseCreate>>>>")
        print("AvatarID %d" % self.AvatarID)
        print("Name", self.Name)
        print("attr1 %d" % self.attr1)
        print("attr2 %d" % self.attr2)
        print("attr4 ", self.attr4)
        print("attr5 ", self.attr5)
        print("attr6 ", self.attr6)

        print("attr7 ", self.attr7)
        print("attr8 ", self.attr8)
        print("<<<<<<Avatar OnBaseCreate>>>>")
        Viewer.GetInstance().RegisterEntity(self.id, self._view)
Пример #3
0
 def OnLeaveAOI(self):
     Viewer.GetInstance().UnRegisterEntity(self.id)
     print("<<<<<<Avatar OnLeaveAOI ", self.id, ">>>>")
Пример #4
0
 def OnEnterAOI(self):
     print("<<<<<<Avatar OnEnterAOI ", self.id, ">>>>")
     Viewer.GetInstance().RegisterEntity(self.id, self._view)