コード例 #1
0
    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)
コード例 #2
0
ファイル: NPC.py プロジェクト: hafewa/tank-1
    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)
コード例 #3
0
	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)
コード例 #4
0
	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	
コード例 #5
0
ファイル: Monster.py プロジェクト: gameogre/kbengine
	def __init__(self):
		NPCObject.__init__(self)
		Flags.__init__(self) 
		State.__init__(self) 
		Motion.__init__(self) 
		Combat.__init__(self) 
		Spell.__init__(self) 
		AI.__init__(self) 
コード例 #6
0
ファイル: Monster.py プロジェクト: gameogre/kbengine
 def __init__(self):
     NPCObject.__init__(self)
     Flags.__init__(self)
     State.__init__(self)
     Motion.__init__(self)
     Combat.__init__(self)
     Spell.__init__(self)
     AI.__init__(self)
コード例 #7
0
ファイル: Monster.py プロジェクト: hafewa/tank-1
    def onStateChanged_(self, oldstate, newstate):
        """
		virtual method.
		entity状态改变了
		"""
        State.onStateChanged_(self, oldstate, newstate)
        AI.onStateChanged_(self, oldstate, newstate)
        NPCObject.onStateChanged_(self, oldstate, newstate)
コード例 #8
0
ファイル: Monster.py プロジェクト: easiest321/kbengine
	def onStateChanged_(self, oldstate, newstate):
		"""
		virtual method.
		entity状态改变了
		"""
		State.onStateChanged_(self, oldstate, newstate)
		AI.onStateChanged_(self, oldstate, newstate)
		NPCObject.onStateChanged_(self, oldstate, newstate)
コード例 #9
0
 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))
コード例 #10
0
    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)
コード例 #11
0
 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)
コード例 #12
0
    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)
コード例 #13
0
    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)
コード例 #14
0
ファイル: Monster.py プロジェクト: Jimlan/kbengine
	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) 
コード例 #15
0
    def __init__(self):
        NPCObject.__init__(self)
        State.__init__(self)
        AbilityBox.__init__(self)
        AuraBox.__init__(self)
        Combat.__init__(self)
        GameObject.__init__(self)

        self.onEnable()
コード例 #16
0
ファイル: Monster.py プロジェクト: easiest321/kbengine
	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层来寻路
コード例 #17
0
    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层来寻路
コード例 #18
0
    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:
コード例 #19
0
	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 
コード例 #20
0
ファイル: Monster.py プロジェクト: CSystem/MyGameServerAssets
	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 
コード例 #21
0
    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))
コード例 #22
0
	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()
コード例 #23
0
 def __init__(self):
     Ouroboros.Entity.__init__(self)
     NPCObject.__init__(self)
     Motion.__init__(self)
コード例 #24
0
	def __init__(self):
		KBEngine.Entity.__init__(self)
		NPCObject.__init__(self)
		Motion.__init__(self)
コード例 #25
0
 def __init__(self):
     shyloo.Entity.__init__(self)
     NPCObject.__init__(self)
     Motion.__init__(self)
コード例 #26
0
ファイル: Monster.py プロジェクト: easiest321/kbengine
	def onDestroy(self):
		"""
		entity销毁
		"""
		NPCObject.onDestroy(self)
		Combat.onDestroy(self)
コード例 #27
0
ファイル: Monster.py プロジェクト: hafewa/tank-1
    def onDestroy(self):
        """
		entity销毁
		"""
        NPCObject.onDestroy(self)
        Combat.onDestroy(self)
コード例 #28
0
ファイル: NPC.py プロジェクト: gameogre/kbengine
 def __init__(self):
     NPCObject.__init__(self)
     Motion.__init__(self)
コード例 #29
0
ファイル: NPC.py プロジェクト: gameogre/kbengine
	def __init__(self):
		NPCObject.__init__(self)
		Motion.__init__(self)
コード例 #30
0
    def onDestroy(self):
        """
		Entity destruction
		"""
        NPCObject.onDestroy(self)
        Combat.onDestroy(self)
コード例 #31
0
ファイル: NPC.py プロジェクト: yyow3193/kbengine
	def __init__(self):
		KBEngine.Entity.__init__(self)
		NPCObject.__init__(self)
		Motion.__init__(self)