コード例 #1
0
    def onEnemyEmpty(self):
        """
		virtual method.
		The enemy list is empty
		"""
        AI.onEnemyEmpty(self)
        Combat.onEnemyEmpty(self)
コード例 #2
0
    def onAddEnemy(self, entityID):
        """
		virtual method.
		Enemy enters the list
		"""
        AI.onAddEnemy(self, entityID)
        Combat.onAddEnemy(self, entityID)
コード例 #3
0
ファイル: Monster.py プロジェクト: easiest321/kbengine
	def onSubStateChanged_(self, oldSubState, newSubState):
		"""
		virtual method.
		子状态改变了
		"""
		State.onSubStateChanged_(self, oldSubState, newSubState)
		AI.onSubStateChanged_(self, oldSubState, newSubState)
コード例 #4
0
ファイル: Monster.py プロジェクト: hafewa/tank-1
    def onAddEnemy(self, entityID):
        """
		virtual method.
		有敌人进入列表
		"""
        AI.onAddEnemy(self, entityID)
        Combat.onAddEnemy(self, entityID)
コード例 #5
0
ファイル: Monster.py プロジェクト: hafewa/tank-1
    def onEnemyEmpty(self):
        """
		virtual method.
		敌人列表空了
		"""
        AI.onEnemyEmpty(self)
        Combat.onEnemyEmpty(self)
コード例 #6
0
ファイル: Monster.py プロジェクト: hafewa/tank-1
    def onRemoveEnemy(self, entityID):
        """
		virtual method.
		删除敌人
		"""
        AI.onRemoveEnemy(self, entityID)
        Combat.onRemoveEnemy(self, entityID)
コード例 #7
0
ファイル: Monster.py プロジェクト: hafewa/tank-1
    def onSubStateChanged_(self, oldSubState, newSubState):
        """
		virtual method.
		子状态改变了
		"""
        State.onSubStateChanged_(self, oldSubState, newSubState)
        AI.onSubStateChanged_(self, oldSubState, newSubState)
コード例 #8
0
ファイル: Monster.py プロジェクト: easiest321/kbengine
	def onAddEnemy(self, entityID):
		"""
		virtual method.
		有敌人进入列表
		"""
		AI.onAddEnemy(self, entityID)
		Combat.onAddEnemy(self, entityID)
コード例 #9
0
ファイル: Monster.py プロジェクト: easiest321/kbengine
	def onRemoveEnemy(self, entityID):
		"""
		virtual method.
		删除敌人
		"""
		AI.onRemoveEnemy(self, entityID)
		Combat.onRemoveEnemy(self, entityID)
コード例 #10
0
    def onRemoveEnemy(self, entityID):
        """
		virtual method.
		Delete enemy
		"""
        AI.onRemoveEnemy(self, entityID)
        Combat.onRemoveEnemy(self, entityID)
コード例 #11
0
	def onEnemyEmpty(self):
		"""
		virtual method.
		敌人列表空了
		"""
		AI.onEnemyEmpty(self)
		Combat.onEnemyEmpty(self)
コード例 #12
0
    def onSubStateChanged_(self, oldSubState, newSubState):
        """
		virtual method.
		Substate changed
		"""
        State.onSubStateChanged_(self, oldSubState, newSubState)
        AI.onSubStateChanged_(self, oldSubState, newSubState)
        AnimationState.onSubStateChanged_(self, oldSubState, newSubState)
コード例 #13
0
    def onForbidChanged_(self, forbid, isInc):
        """
		virtual method.
		Entity prohibits condition change
		@param isInc		:	Is it an increase?
		"""
        State.onForbidChanged_(self, forbid, isInc)
        AI.onForbidChanged_(self, forbid, isInc)
コード例 #14
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) 
コード例 #15
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)
コード例 #16
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)
コード例 #17
0
ファイル: Monster.py プロジェクト: hafewa/tank-1
    def onForbidChanged_(self, forbid, isInc):
        """
		virtual method.
		entity禁止 条件改变
		@param isInc		:	是否是增加
		"""
        State.onForbidChanged_(self, forbid, isInc)
        AI.onForbidChanged_(self, forbid, isInc)
コード例 #18
0
ファイル: Monster.py プロジェクト: easiest321/kbengine
	def onForbidChanged_(self, forbid, isInc):
		"""
		virtual method.
		entity禁止 条件改变
		@param isInc		:	是否是增加
		"""
		State.onForbidChanged_(self, forbid, isInc)
		AI.onForbidChanged_(self, forbid, isInc)
コード例 #19
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)
コード例 #20
0
 def onTimer(self, tid, userArg):
     """
     定时器回调函数
     :param tid:
     :param userArg:
     """
     # 分发到有onTimer的父类
     AI.onTimer(self, tid, userArg)
     Character.onTimer(self, tid, userArg)
コード例 #21
0
ファイル: Monster.py プロジェクト: CSystem/MyGameServerAssets
	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)
		Spell.onTimer(self, tid, userArg)
		AI.onTimer(self, tid, userArg)
コード例 #22
0
ファイル: Monster.py プロジェクト: easiest321/kbengine
	def onWitnessed(self, isWitnessed):
		"""
		KBEngine method.
		此实体是否被观察者(player)观察到, 此接口主要是提供给服务器做一些性能方面的优化工作,
		在通常情况下,一些entity不被任何客户端所观察到的时候, 他们不需要做任何工作, 利用此接口
		可以在适当的时候激活或者停止这个entity的任意行为。
		@param isWitnessed	: 为false时, entity脱离了任何观察者的观察
		"""
		AI.onWitnessed(self, isWitnessed)
コード例 #23
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)
コード例 #24
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)
コード例 #25
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) 
コード例 #26
0
    def onWitnessed(self, isWitnessed):
        """
		Ouroboros method.
		Whether this entity is observed by the player, this interface is mainly to provide the server with some performance optimization work.
		Under normal circumstances, when some entities are not observed by any client, they do not need to do any work, using this interface
		Any behavior of this entity can be activated or stopped at the appropriate time.
		@param isWitnessed	: When false, the entity is out of observation by any observer.
		"""
        AI.onWitnessed(self, isWitnessed)
コード例 #27
0
ファイル: Monster.py プロジェクト: hafewa/tank-1
    def onWitnessed(self, isWitnessed):
        """
		KBEngine method.
		此实体是否被观察者(player)观察到, 此接口主要是提供给服务器做一些性能方面的优化工作,
		在通常情况下,一些entity不被任何客户端所观察到的时候, 他们不需要做任何工作, 利用此接口
		可以在适当的时候激活或者停止这个entity的任意行为。
		@param isWitnessed	: 为false时, entity脱离了任何观察者的观察
		"""
        AI.onWitnessed(self, isWitnessed)
コード例 #28
0
ファイル: Monster.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)
        Spell.onTimer(self, tid, userArg)
        AI.onTimer(self, tid, userArg)
コード例 #29
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)
        Ability.onTimer(self, tid, userArg)
        AI.onTimer(self, tid, userArg)
コード例 #30
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层来寻路
コード例 #31
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层来寻路
コード例 #32
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 
コード例 #33
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 
コード例 #34
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:
コード例 #35
0
ファイル: Monster.py プロジェクト: zhaobingchun/huanhuoserver
    def __init__(self):
        DEBUG_MSG("Monster::__init__")
        KBEngine.Entity.__init__(self)
        EntityObject.__init__(self)
        CombatEntity.__init__(self)
        AI.__init__(self)

        self.spawnPos = (0, 0, 0)
        self.timerMoveID = self.addTimer(0, 4, 1)
        self.monsterData = monster_data.data[self.name]
        self.modelName = self.monsterData["模型名称"]
        DEBUG_MSG("modelName is " + str(self.modelName))
        self.HP = self.monsterData["生命值"]
        self.HP_Max = self.monsterData["生命值"]
        self.killerTaskCounterVariableName = self.modelName + "_TaskCounter"
コード例 #36
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))
コード例 #37
0
    def onLeaveTrap(self, entity, range_xz, range_y, controllerID, userarg):
        """
		Ouroboros method.
		Engine callback leaves trap trigger
		"""
        AI.onLeaveTrap(self, entity, range_xz, range_y, controllerID, userarg)
コード例 #38
0
    def checkInTerritory(self):
        """
		virtual method.
		Check if you are in an active territory
		"""
        return AI.checkInTerritory(self)
コード例 #39
0
ファイル: Monster.py プロジェクト: hafewa/tank-1
    def onEnterTrap(self, entity, range_xz, range_y, controllerID, userarg):
        """
		KBEngine method.
		引擎回调进入陷阱触发
		"""
        AI.onEnterTrap(self, entity, range_xz, range_y, controllerID, userarg)
コード例 #40
0
ファイル: Monster.py プロジェクト: easiest321/kbengine
	def checkInTerritory(self):
		"""
		virtual method.
		检查自己是否在可活动领地中
		"""
		return AI.checkInTerritory(self)
コード例 #41
0
ファイル: Monster.py プロジェクト: easiest321/kbengine
	def onLeaveTrap(self, entity, range_xz, range_y, controllerID, userarg):
		"""
		KBEngine method.
		引擎回调离开陷阱触发
		"""
		AI.onLeaveTrap(self, entity, range_xz, range_y, controllerID, userarg)
コード例 #42
0
ファイル: Monster.py プロジェクト: easiest321/kbengine
	def onEnterTrap(self, entity, range_xz, range_y, controllerID, userarg):
		"""
		KBEngine method.
		引擎回调进入陷阱触发
		"""
		AI.onEnterTrap(self, entity, range_xz, range_y, controllerID, userarg)
コード例 #43
0
ファイル: Monster.py プロジェクト: hafewa/tank-1
    def onLeaveTrap(self, entity, range_xz, range_y, controllerID, userarg):
        """
		KBEngine method.
		引擎回调离开陷阱触发
		"""
        AI.onLeaveTrap(self, entity, range_xz, range_y, controllerID, userarg)
コード例 #44
0
ファイル: Monster.py プロジェクト: hafewa/tank-1
    def checkInTerritory(self):
        """
		virtual method.
		检查自己是否在可活动领地中
		"""
        return AI.checkInTerritory(self)
コード例 #45
0
ファイル: Monster.py プロジェクト: easiest321/kbengine
	def onFlagsChanged_(self, flags, isInc):
		"""
		virtual method.
		"""
		Flags.onFlagsChanged_(self, flags, isInc)
		AI.onFlagsChanged_(self, flags, isInc)
コード例 #46
0
ファイル: Monster.py プロジェクト: hafewa/tank-1
    def onFlagsChanged_(self, flags, isInc):
        """
		virtual method.
		"""
        Flags.onFlagsChanged_(self, flags, isInc)
        AI.onFlagsChanged_(self, flags, isInc)