def onEnemyEmpty(self):
        """
		virtual method.
		The enemy list is empty
		"""
        AI.onEnemyEmpty(self)
        Combat.onEnemyEmpty(self)
    def onAddEnemy(self, entityID):
        """
		virtual method.
		Enemy enters the list
		"""
        AI.onAddEnemy(self, entityID)
        Combat.onAddEnemy(self, entityID)
Exemple #3
0
	def onSubStateChanged_(self, oldSubState, newSubState):
		"""
		virtual method.
		子状态改变了
		"""
		State.onSubStateChanged_(self, oldSubState, newSubState)
		AI.onSubStateChanged_(self, oldSubState, newSubState)
Exemple #4
0
    def onAddEnemy(self, entityID):
        """
		virtual method.
		有敌人进入列表
		"""
        AI.onAddEnemy(self, entityID)
        Combat.onAddEnemy(self, entityID)
Exemple #5
0
    def onEnemyEmpty(self):
        """
		virtual method.
		敌人列表空了
		"""
        AI.onEnemyEmpty(self)
        Combat.onEnemyEmpty(self)
Exemple #6
0
    def onRemoveEnemy(self, entityID):
        """
		virtual method.
		删除敌人
		"""
        AI.onRemoveEnemy(self, entityID)
        Combat.onRemoveEnemy(self, entityID)
Exemple #7
0
    def onSubStateChanged_(self, oldSubState, newSubState):
        """
		virtual method.
		子状态改变了
		"""
        State.onSubStateChanged_(self, oldSubState, newSubState)
        AI.onSubStateChanged_(self, oldSubState, newSubState)
Exemple #8
0
	def onAddEnemy(self, entityID):
		"""
		virtual method.
		有敌人进入列表
		"""
		AI.onAddEnemy(self, entityID)
		Combat.onAddEnemy(self, entityID)
Exemple #9
0
	def onRemoveEnemy(self, entityID):
		"""
		virtual method.
		删除敌人
		"""
		AI.onRemoveEnemy(self, entityID)
		Combat.onRemoveEnemy(self, entityID)
    def onRemoveEnemy(self, entityID):
        """
		virtual method.
		Delete enemy
		"""
        AI.onRemoveEnemy(self, entityID)
        Combat.onRemoveEnemy(self, entityID)
	def onEnemyEmpty(self):
		"""
		virtual method.
		敌人列表空了
		"""
		AI.onEnemyEmpty(self)
		Combat.onEnemyEmpty(self)
    def onSubStateChanged_(self, oldSubState, newSubState):
        """
		virtual method.
		Substate changed
		"""
        State.onSubStateChanged_(self, oldSubState, newSubState)
        AI.onSubStateChanged_(self, oldSubState, newSubState)
        AnimationState.onSubStateChanged_(self, oldSubState, newSubState)
    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)
Exemple #14
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) 
Exemple #15
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)
Exemple #16
0
	def onStateChanged_(self, oldstate, newstate):
		"""
		virtual method.
		entity状态改变了
		"""
		State.onStateChanged_(self, oldstate, newstate)
		AI.onStateChanged_(self, oldstate, newstate)
		NPCObject.onStateChanged_(self, oldstate, newstate)
Exemple #17
0
    def onForbidChanged_(self, forbid, isInc):
        """
		virtual method.
		entity禁止 条件改变
		@param isInc		:	是否是增加
		"""
        State.onForbidChanged_(self, forbid, isInc)
        AI.onForbidChanged_(self, forbid, isInc)
Exemple #18
0
	def onForbidChanged_(self, forbid, isInc):
		"""
		virtual method.
		entity禁止 条件改变
		@param isInc		:	是否是增加
		"""
		State.onForbidChanged_(self, forbid, isInc)
		AI.onForbidChanged_(self, forbid, isInc)
Exemple #19
0
    def onStateChanged_(self, oldstate, newstate):
        """
		virtual method.
		entity状态改变了
		"""
        State.onStateChanged_(self, oldstate, newstate)
        AI.onStateChanged_(self, oldstate, newstate)
        NPCObject.onStateChanged_(self, oldstate, newstate)
Exemple #20
0
 def onTimer(self, tid, userArg):
     """
     定时器回调函数
     :param tid:
     :param userArg:
     """
     # 分发到有onTimer的父类
     AI.onTimer(self, tid, userArg)
     Character.onTimer(self, tid, userArg)
Exemple #21
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)
		Spell.onTimer(self, tid, userArg)
		AI.onTimer(self, tid, userArg)
Exemple #22
0
	def onWitnessed(self, isWitnessed):
		"""
		KBEngine method.
		此实体是否被观察者(player)观察到, 此接口主要是提供给服务器做一些性能方面的优化工作,
		在通常情况下,一些entity不被任何客户端所观察到的时候, 他们不需要做任何工作, 利用此接口
		可以在适当的时候激活或者停止这个entity的任意行为。
		@param isWitnessed	: 为false时, entity脱离了任何观察者的观察
		"""
		AI.onWitnessed(self, isWitnessed)
Exemple #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)
    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)
Exemple #25
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) 
    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)
Exemple #27
0
    def onWitnessed(self, isWitnessed):
        """
		KBEngine method.
		此实体是否被观察者(player)观察到, 此接口主要是提供给服务器做一些性能方面的优化工作,
		在通常情况下,一些entity不被任何客户端所观察到的时候, 他们不需要做任何工作, 利用此接口
		可以在适当的时候激活或者停止这个entity的任意行为。
		@param isWitnessed	: 为false时, entity脱离了任何观察者的观察
		"""
        AI.onWitnessed(self, isWitnessed)
Exemple #28
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)
        Spell.onTimer(self, tid, userArg)
        AI.onTimer(self, tid, userArg)
    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)
Exemple #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层来寻路
Exemple #31
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层来寻路
Exemple #32
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 
Exemple #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 
    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:
Exemple #35
0
    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"
Exemple #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))
    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)
    def checkInTerritory(self):
        """
		virtual method.
		Check if you are in an active territory
		"""
        return AI.checkInTerritory(self)
Exemple #39
0
    def onEnterTrap(self, entity, range_xz, range_y, controllerID, userarg):
        """
		KBEngine method.
		引擎回调进入陷阱触发
		"""
        AI.onEnterTrap(self, entity, range_xz, range_y, controllerID, userarg)
Exemple #40
0
	def checkInTerritory(self):
		"""
		virtual method.
		检查自己是否在可活动领地中
		"""
		return AI.checkInTerritory(self)
Exemple #41
0
	def onLeaveTrap(self, entity, range_xz, range_y, controllerID, userarg):
		"""
		KBEngine method.
		引擎回调离开陷阱触发
		"""
		AI.onLeaveTrap(self, entity, range_xz, range_y, controllerID, userarg)
Exemple #42
0
	def onEnterTrap(self, entity, range_xz, range_y, controllerID, userarg):
		"""
		KBEngine method.
		引擎回调进入陷阱触发
		"""
		AI.onEnterTrap(self, entity, range_xz, range_y, controllerID, userarg)
Exemple #43
0
    def onLeaveTrap(self, entity, range_xz, range_y, controllerID, userarg):
        """
		KBEngine method.
		引擎回调离开陷阱触发
		"""
        AI.onLeaveTrap(self, entity, range_xz, range_y, controllerID, userarg)
Exemple #44
0
    def checkInTerritory(self):
        """
		virtual method.
		检查自己是否在可活动领地中
		"""
        return AI.checkInTerritory(self)
Exemple #45
0
	def onFlagsChanged_(self, flags, isInc):
		"""
		virtual method.
		"""
		Flags.onFlagsChanged_(self, flags, isInc)
		AI.onFlagsChanged_(self, flags, isInc)
Exemple #46
0
    def onFlagsChanged_(self, flags, isInc):
        """
		virtual method.
		"""
        Flags.onFlagsChanged_(self, flags, isInc)
        AI.onFlagsChanged_(self, flags, isInc)