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)
Example #3
0
 def __init__(self):
     KBEngine.Entity.__init__(self)
     GameObject.__init__(self)
     Motion.__init__(self)
     Flags.__init__(self)
     State.__init__(self)
     Combat.__init__(self)
Example #4
0
    def onAddEnemy(self, entityID):
        """
		virtual method.
		有敌人进入列表
		"""
        AI.onAddEnemy(self, entityID)
        Combat.onAddEnemy(self, entityID)
    def onAddEnemy(self, entityID):
        """
		virtual method.
		Enemy enters the list
		"""
        AI.onAddEnemy(self, entityID)
        Combat.onAddEnemy(self, entityID)
Example #6
0
    def onEnemyEmpty(self):
        """
		virtual method.
		敌人列表空了
		"""
        AI.onEnemyEmpty(self)
        Combat.onEnemyEmpty(self)
Example #7
0
    def onRemoveEnemy(self, entityID):
        """
		virtual method.
		删除敌人
		"""
        AI.onRemoveEnemy(self, entityID)
        Combat.onRemoveEnemy(self, entityID)
Example #8
0
    def __init__(self):
        KBEngine.Entity.__init__(self)
        GameObject.__init__(self)
        Motion.__init__(self)
        Combat.__init__(self)
        Arsenal.__init__(self)
        State.__init__(self)
        Settle.__init__(self)

        #self.topSpeed = self.moveSpeed + 5.0
        self.topSpeed = 0.0

        # 默认开始的尺寸
        self.modelRadius = 0.5

        self.changeState(GameConfigs.ENTITY_STATE_FREE)

        # 随机的初始化一个出生位置
        #        self.position =  GameUtils.randomPosition3D(self.modelRadius)

        # self.topSpeedY = 10.0
        self.getCurrSpace().onEnter(self)

        # 可视范围起始位30米,后期根据长大尺寸调整
        #       self.setViewRadius(30.0, 1.0)

        DEBUG_MSG('Avatar::__init__: id = %i ,position:(%f,%f,%f)' %
                  (self.id, self.position.x, self.position.y, self.position.z))
Example #9
0
	def onAddEnemy(self, entityID):
		"""
		virtual method.
		有敌人进入列表
		"""
		AI.onAddEnemy(self, entityID)
		Combat.onAddEnemy(self, entityID)
Example #10
0
	def onRemoveEnemy(self, entityID):
		"""
		virtual method.
		删除敌人
		"""
		AI.onRemoveEnemy(self, entityID)
		Combat.onRemoveEnemy(self, entityID)
Example #11
0
 def __init__(self):
     shyloo.Entity.__init__(self)
     GameObject.__init__(self)
     Motion.__init__(self)
     Flags.__init__(self)
     State.__init__(self)
     Combat.__init__(self)
    def onEnemyEmpty(self):
        """
		virtual method.
		The enemy list is empty
		"""
        AI.onEnemyEmpty(self)
        Combat.onEnemyEmpty(self)
Example #13
0
	def onDestroy(self):
		"""
		KBEngine method.
		entity销毁
		"""
		DEBUG_MSG("Avatar::onDestroy: %i." % self.id)
		Teleport.onDestroy(self)
		Combat.onDestroy(self)
Example #14
0
	def __init__(self):
		GameObject.__init__(self) 
		Flags.__init__(self) 
		State.__init__(self) 
		Combat.__init__(self) 
		Spell.__init__(self) 
		Teleport.__init__(self) 
		Dialog.__init__(self) 
 def __init__(self):
     Ouroboros.Entity.__init__(self)
     GameObject.__init__(self)
     Motion.__init__(self)
     Flags.__init__(self)
     State.__init__(self)
     Combat.__init__(self)
     AnimationState.__init__(self)
Example #16
0
    def onDestroy(self):
        """
		Ouroboros method.
		Entity destruction
		"""
        DEBUG_MSG("Avatar::onDestroy: %i." % self.id)
        Teleport.onDestroy(self)
        Combat.onDestroy(self)
Example #17
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) 
Example #18
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)
Example #19
0
	def onDestroy(self):
		"""
		shyloo method.
		entity销毁
		"""
		DEBUG_MSG("Avatar::onDestroy: %i." % self.id)
		Teleport.onDestroy(self)
		Combat.onDestroy(self)
Example #20
0
 def __init__(self):
     GameObject.__init__(self)
     Flags.__init__(self)
     State.__init__(self)
     Combat.__init__(self)
     Spell.__init__(self)
     Teleport.__init__(self)
     Dialog.__init__(self)
Example #21
0
    def __init__(self):
        NPCObject.__init__(self)
        State.__init__(self)
        AbilityBox.__init__(self)
        AuraBox.__init__(self)
        Combat.__init__(self)
        GameObject.__init__(self)

        self.onEnable()
Example #22
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)
Example #23
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))
Example #24
0
 def __init__(self):
     Ouroboros.Entity.__init__(self)
     GameObject.__init__(self)
     Flags.__init__(self)
     State.__init__(self)
     Combat.__init__(self)
     AuraBox.__init__(self)
     AbilityBox.__init__(self)
     AnimationState.__init__(self)
Example #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) 
Example #26
0
	def __init__(self):
		KBEngine.Entity.__init__(self)
		GameObject.__init__(self)
		Flags.__init__(self) 
		State.__init__(self) 
		SkillBox.__init__(self) 
		Combat.__init__(self) 
		Spell.__init__(self) 
		Dialog.__init__(self)
		Teleport.__init__(self)
Example #27
0
 def __init__(self):
     KBEngine.Entity.__init__(self)
     GameObject.__init__(self)
     Flags.__init__(self)
     State.__init__(self)
     SkillBox.__init__(self)
     Combat.__init__(self)
     Spell.__init__(self)
     Dialog.__init__(self)
     Teleport.__init__(self)
Example #28
0
 def __init__(self):
     shyloo.Entity.__init__(self)
     GameObject.__init__(self)
     Flags.__init__(self)
     State.__init__(self)
     SkillBox.__init__(self)
     Combat.__init__(self)
     Spell.__init__(self)
     Dialog.__init__(self)
     Motion.__init__(self)
     Teleport.__init__(self)
Example #29
0
 def takeDamage(self, receiverID, damage):
     DEBUG_MSG(
         " Avatar takeDamage self.id = %i receiverID = %i damage = %i" %
         (self.id, receiverID, damage))
     if receiverID == self.id:
         Combat.recvDamage(self, self.id, 1, 0, damage)
     target = KBEngine.entities.get(receiverID)
     if target is None:
         ERROR_MSG("Spell::spellTarget( %i ):receiverID = %i not found" %
                   (self.id, receiverID))
         return
     Combat.recvDamage(target, self.id, 1, 0, damage)
Example #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层来寻路
Example #31
0
    def __init__(self):
        GameObject.__init__(self)
        Flags.__init__(self)
        State.__init__(self)
        Motion.__init__(self)
        Combat.__init__(self)
        Spell.__init__(self)
        Teleport.__init__(self)
        Dialog.__init__(self)

        # 设置每秒允许的最快速度, 超速会被拉回去
        self.topSpeed = 10.0
Example #32
0
	def __init__(self):
		GameObject.__init__(self) 
		Flags.__init__(self) 
		State.__init__(self) 
		Motion.__init__(self) 
		Combat.__init__(self) 
		Spell.__init__(self) 
		Teleport.__init__(self) 
		Dialog.__init__(self) 
		
		# 设置每秒允许的最快速度, 超速会被拉回去
		self.topSpeed = 10.0
Example #33
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层来寻路
Example #34
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:
Example #36
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 
Example #37
0
	def __init__(self):
		KBEngine.Entity.__init__(self)
		GameObject.__init__(self) 
		Flags.__init__(self) 
		State.__init__(self) 
		Motion.__init__(self) 
		SkillBox.__init__(self) 
		Combat.__init__(self) 
		Spell.__init__(self) 
		Teleport.__init__(self) 
		Dialog.__init__(self) 
		
		# 设置每秒允许的最快速度, 超速会被拉回去
		self.topSpeed = self.moveSpeed + 5.0
Example #38
0
    def __init__(self):
        KBEngine.Entity.__init__(self)
        GameObject.__init__(self)
        Flags.__init__(self)
        State.__init__(self)
        Motion.__init__(self)
        SkillBox.__init__(self)
        Combat.__init__(self)
        Spell.__init__(self)
        Teleport.__init__(self)
        Dialog.__init__(self)

        # 设置每秒允许的最快速度, 超速会被拉回去
        self.topSpeed = self.moveSpeed + 5.0
Example #39
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))
Example #40
0
    def onTimer(self, tid, userArg):
        """
		Ouroboros method.
		Engine callback timer trigger
		"""
        #DEBUG_MSG('TID: %i %s' % (tid, userArg))

        if ServerConstantsDefine.TIMER_TYPE_HEARTBEAT == userArg:
            Combat.onTimer(self, tid, userArg)

        if ServerConstantsDefine.TIMER_TYPE_HEARTBEAT == userArg:
            self.onHeardTimer()

        if ServerConstantsDefine.TIMER_TYPE_AURA_TICK == userArg:
            AuraBox.onTimer(self, tid, userArg)

        if ServerConstantsDefine.TIMER_TYPE_ABILITY_TICK == userArg:
            AbilityBox.onTimer(self, tid, userArg)
Example #41
0
	def __init__(self):
		shyloo.Entity.__init__(self)
		GameObject.__init__(self) 
		Flags.__init__(self) 
		State.__init__(self) 
		Motion.__init__(self) 
		SkillBox.__init__(self) 
		Combat.__init__(self) 
		Spell.__init__(self) 
		Teleport.__init__(self) 
		Dialog.__init__(self) 
		
		# 设置每秒允许的最快速度, 超速会被拉回去
		self.topSpeed = self.moveSpeed + 5.0
		# self.topSpeedY = 10.0
		
		# 如果为7说明在UE4地图中,那么为了配合demo的移动速度,我们将限制设置得更大一些
		if self.spaceUType == 7:
			self.topSpeed = 0
Example #42
0
	def __init__(self):
		KBEngine.Entity.__init__(self)
		GameObject.__init__(self) 
		Flags.__init__(self) 
		State.__init__(self) 
		Motion.__init__(self) 
		SkillBox.__init__(self) 
		Combat.__init__(self) 
		Spell.__init__(self) 
		Teleport.__init__(self) 
		Dialog.__init__(self) 
		
		# 设置每秒允许的最快速度, 超速会被拉回去
		self.topSpeed = self.moveSpeed + 5.0
		# self.topSpeedY = 10.0
		
		if self.spaceUType == 1000:
			self.spaceUType = self.getCurrSpace().spaceUType
			self.topSpeed = 0
Example #43
0
	def __init__(self):
		GameObject.__init__(self)
		Motion.__init__(self)
		Flags.__init__(self) 
		State.__init__(self) 
		Combat.__init__(self) 
Example #44
0
	def onDestroy(self):
		"""
		entity销毁
		"""
		NPCObject.onDestroy(self)
		Combat.onDestroy(self)
Example #45
0
	def __init__(self):
		GameObject.__init__(self)
		Combat.__init__(self) 
		Spell.__init__(self)