Ejemplo n.º 1
0
 def __init__(self):
     shyloo.Entity.__init__(self)
     GameObject.__init__(self)
     Motion.__init__(self)
     Flags.__init__(self)
     State.__init__(self)
     Combat.__init__(self)
Ejemplo n.º 2
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))
Ejemplo n.º 3
0
    def onSubStateChanged_(self, oldSubState, newSubState):
        """
		virtual method.
		子状态改变了
		"""
        State.onSubStateChanged_(self, oldSubState, newSubState)
        AI.onSubStateChanged_(self, oldSubState, newSubState)
Ejemplo n.º 4
0
	def onSubStateChanged_(self, oldSubState, newSubState):
		"""
		virtual method.
		子状态改变了
		"""
		State.onSubStateChanged_(self, oldSubState, newSubState)
		AI.onSubStateChanged_(self, oldSubState, newSubState)
Ejemplo n.º 5
0
 def __init__(self):
     KBEngine.Entity.__init__(self)
     GameObject.__init__(self)
     Motion.__init__(self)
     Flags.__init__(self)
     State.__init__(self)
     Combat.__init__(self)
Ejemplo n.º 6
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)
Ejemplo n.º 7
0
    def onStateChanged_(self, oldstate, newstate):
        """
		virtual method.
		entity状态改变了
		"""
        State.onStateChanged_(self, oldstate, newstate)
        AI.onStateChanged_(self, oldstate, newstate)
        NPCObject.onStateChanged_(self, oldstate, newstate)
Ejemplo n.º 8
0
	def onForbidChanged_(self, forbid, isInc):
		"""
		virtual method.
		entity禁止 条件改变
		@param isInc		:	是否是增加
		"""
		State.onForbidChanged_(self, forbid, isInc)
		AI.onForbidChanged_(self, forbid, isInc)
Ejemplo n.º 9
0
	def onStateChanged_(self, oldstate, newstate):
		"""
		virtual method.
		entity状态改变了
		"""
		State.onStateChanged_(self, oldstate, newstate)
		AI.onStateChanged_(self, oldstate, newstate)
		NPCObject.onStateChanged_(self, oldstate, newstate)
Ejemplo n.º 10
0
    def onForbidChanged_(self, forbid, isInc):
        """
		virtual method.
		entity禁止 条件改变
		@param isInc		:	是否是增加
		"""
        State.onForbidChanged_(self, forbid, isInc)
        AI.onForbidChanged_(self, forbid, isInc)
Ejemplo n.º 11
0
 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)
Ejemplo n.º 12
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) 
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 15
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) 
Ejemplo n.º 16
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)
Ejemplo n.º 17
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)
Ejemplo n.º 18
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))
Ejemplo n.º 19
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)
Ejemplo n.º 20
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) 
Ejemplo n.º 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()
Ejemplo n.º 22
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)
Ejemplo n.º 23
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)
Ejemplo n.º 24
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)
Ejemplo n.º 25
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)
Ejemplo n.º 26
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层来寻路
Ejemplo n.º 27
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层来寻路
Ejemplo n.º 28
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
Ejemplo n.º 29
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
Ejemplo n.º 30
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 
Ejemplo n.º 31
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 
Ejemplo n.º 32
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:
Ejemplo n.º 33
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
Ejemplo n.º 34
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
Ejemplo n.º 35
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))
Ejemplo n.º 36
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
Ejemplo n.º 37
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
Ejemplo n.º 38
0
    def __init__(self):
        Ouroboros.Entity.__init__(self)
        GameObject.__init__(self)
        State.__init__(self)
        AnimationState.__init__(self)
        Motion.__init__(self)
        AbilityBox.__init__(self)
        AuraBox.__init__(self)
        Ability.__init__(self)
        Teleport.__init__(self)
        Combat.__init__(self)
        Auxiliary.__init__(self)
        # Dialog.__init__(self)

        # Set the fastest speed allowed per second, the speed will be pulled back
        self.topSpeed = self.moveSpeed + 15.0
        # self.topSpeedY = 10.0

        self.setDefaultData()
        self.resetProperties()
        self.updateBaseProperties()
        self.resetEntity()
        self.onEnable()
Ejemplo n.º 39
0
    def __init__(self):
        KBEngine.Entity.__init__(self)
        GameObject.__init__(self)
        Motion.__init__(self)
        State.__init__(self)

        self.territoryControllerID = 0

        self.destroyTime = self.getDatas()["destroyTime"]
        self.explodeTime = self.getDatas().get("explodeTime", 0)

        self.changeState(GameConfigs.ENTITY_STATE_FREE)

        self.addTimer(0.01, 0, SCDefine.TIMER_TYPE_WEAPON_IN_WORLD)  #只需要觸發一次

        DEBUG_MSG(
            "Weapon::__init__: %i. attackerID:%i,ownerID:%i,destroyTime:%i" %
            (self.id, self.attackerID, self.ownerID, self.destroyTime))

        DEBUG_MSG(
            'Weapon::__init__: id = %i ,position:(%f,%f,%f),direction(%f,%f,%f),forward(%f,%f,%f)'
            % (self.id, self.position.x, self.position.y, self.position.z,
               self.direction.x, self.direction.y, self.direction.z,
               self.destForward.x, self.destForward.y, self.destForward.z))
Ejemplo n.º 40
0
 def __init__(self):
     GameObject.__init__(self)
     Motion.__init__(self)
     Flags.__init__(self)
     State.__init__(self)
     Combat.__init__(self)
Ejemplo n.º 41
0
	def __init__(self):
		GameObject.__init__(self)
		Motion.__init__(self)
		Flags.__init__(self) 
		State.__init__(self) 
		Combat.__init__(self)