def onTimer(self, tid, userArg): """ Ouroboros method. Engine callback timer trigger """ #DEBUG_MSG("%s::onTimer: %i, tid:%i, arg:%i" % (self.getScriptName(), self.id, tid, userArg)) NPCObject.onTimer(self, tid, userArg)
def onTimer(self, tid, userArg): """ KBEngine method. 引擎回调timer触发 """ #DEBUG_MSG("%s::onTimer: %i, tid:%i, arg:%i" % (self.getScriptName(), self.id, tid, userArg)) NPCObject.onTimer(self, tid, userArg)
def __init__(self): KBEngine.Entity.__init__(self) NPCObject.__init__(self) GameObject.__init__(self) DEBUG_MSG("[CellApp] Weapon::__init__: called, attackId: %i" % self.attackId) self.territoryControllerID = 0
def __init__(self): NPCObject.__init__(self) Flags.__init__(self) State.__init__(self) Motion.__init__(self) Combat.__init__(self) Spell.__init__(self) AI.__init__(self)
def onStateChanged_(self, oldstate, newstate): """ virtual method. entity状态改变了 """ State.onStateChanged_(self, oldstate, newstate) AI.onStateChanged_(self, oldstate, newstate) NPCObject.onStateChanged_(self, oldstate, newstate)
def __init__(self): KBEngine.Entity.__init__(self) NPCObject.__init__(self) Motion.__init__(self) Combat.__init__(self) State.__init__(self) SkillEffectMgr.__init__(self) self.seTimer = self.addTimer(0.1, 0.1, SCDefine.TIMER_TYPE_BUFF_TICK) ERROR_MSG("npc init, id is :%i" % (self.mid))
def onTimer(self, tid, userArg): """ KBEngine method. 引擎回调timer触发 """ #DEBUG_MSG("%s::onTimer: %i, tid:%i, arg:%i" % (self.className, self.id, tid, userArg)) NPCObject.onTimer(self, tid, userArg) Spell.onTimer(self, tid, userArg) AI.onTimer(self, tid, userArg)
def __init__(self): KBEngine.Entity.__init__(self) NPCObject.__init__(self) Flags.__init__(self) State.__init__(self) Motion.__init__(self) Combat.__init__(self) Spell.__init__(self) AI.__init__(self)
def onStateChanged_(self, oldstate, newstate): """ virtual method. The entity state has changed. """ State.onStateChanged_(self, oldstate, newstate) AI.onStateChanged_(self, oldstate, newstate) NPCObject.onStateChanged_(self, oldstate, newstate) AnimationState.onStateChanged_(self, oldstate, newstate)
def onTimer(self, tid, userArg): """ shyloo method. 引擎回调timer触发 """ #DEBUG_MSG("%s::onTimer: %i, tid:%i, arg:%i" % (self.getScriptName(), self.id, tid, userArg)) NPCObject.onTimer(self, tid, userArg) Spell.onTimer(self, tid, userArg) AI.onTimer(self, tid, userArg)
def __init__(self): NPCObject.__init__(self) State.__init__(self) AbilityBox.__init__(self) AuraBox.__init__(self) Combat.__init__(self) GameObject.__init__(self) self.onEnable()
def __init__(self): KBEngine.Entity.__init__(self) NPCObject.__init__(self) Flags.__init__(self) State.__init__(self) Motion.__init__(self) Combat.__init__(self) Spell.__init__(self) AI.__init__(self) if self.modelID == 20002001: self.layer = 1 # entity所在的层,可以设置多个不同的navmesh层来寻路
def __init__(self): Ouroboros.Entity.__init__(self) NPCObject.__init__(self) State.__init__(self) AnimationState.__init__(self) Motion.__init__(self) Combat.__init__(self) Ability.__init__(self) AI.__init__(self) # The layer where the entity is located can be set up with multiple different navmesh layers to find the way. Here, 20002001 is the dragon in the warring-demo. # The 0th floor is the ground, and the 1st floor is the pathfinding layer that ignores the building. '''if self.modelID == 20002001:
def __init__(self): KBEngine.Entity.__init__(self) NPCObject.__init__(self) State.__init__(self) Motion.__init__(self) Combat.__init__(self) Spell.__init__(self) AI.__init__(self) # entity所在的层,可以设置多个不同的navmesh层来寻路, 这里20002001是warring-demo中在天上的飞龙, # 第0层是地面,第1层是忽略建筑物的寻路层 if self.modelID == 20002001: self.layer = 1
def __init__(self): KBEngine.Entity.__init__(self) NPCObject.__init__(self) Flags.__init__(self) State.__init__(self) Motion.__init__(self) Combat.__init__(self) Spell.__init__(self) AI.__init__(self) # entity所在的层,可以设置多个不同的navmesh层来寻路, 这里20002001是warring-demo中在天上的飞龙, # 第0层是地面,第1层是忽略建筑物的寻路层 #if self.modelID == 20002001: # self.layer = 1 ERROR_MSG("monster init, id is :%i, speed: %i" % (self.mid, self.moveSpeed))
def onTimer(self, tid, userArg): """ KBEngine method. 引擎回调timer触发 """ #DEBUG_MSG("%s::onTimer: %i, tid:%i, arg:%i" % (self.getScriptName(), self.id, tid, userArg)) NPCObject.onTimer(self, tid, userArg) if SCDefine.TIMER_TYPE_HEARDBEAT == userArg: #DEBUG_MSG("[CellApp] %s::onTimer: %i, position:(%f,%f,%f), velocity(%f, %f, %f)" % (self.getScriptName(), self.id, self.position.x, self.position.y, self.position.z, self.velocity.x, self.velocity.y, self.velocity.z)) if self.velocity != Math.Vector3(0,0,0): #movePosition = Math.Vector3(self.velocity.x * deltaTime, self.velocity.y * deltaTime, self.velocity.z * deltaTime) movePosition = self.velocity * deltaTime self.position = self.position + movePosition self.velocity.y = self.velocity.y + (-gravity * deltaTime) if self.position.y < 0: self.delTimer(tid) self.destroy()
def __init__(self): Ouroboros.Entity.__init__(self) NPCObject.__init__(self) Motion.__init__(self)
def __init__(self): KBEngine.Entity.__init__(self) NPCObject.__init__(self) Motion.__init__(self)
def __init__(self): shyloo.Entity.__init__(self) NPCObject.__init__(self) Motion.__init__(self)
def onDestroy(self): """ entity销毁 """ NPCObject.onDestroy(self) Combat.onDestroy(self)
def __init__(self): NPCObject.__init__(self) Motion.__init__(self)
def onDestroy(self): """ Entity destruction """ NPCObject.onDestroy(self) Combat.onDestroy(self)