예제 #1
0
 def __init__(self):
     shyloo.Entity.__init__(self)
     GameObject.__init__(self)
     Motion.__init__(self)
     Flags.__init__(self)
     State.__init__(self)
     Combat.__init__(self)
예제 #2
0
파일: Avatar.py 프로젝트: VirtuaIRiot/Game
    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))
예제 #3
0
파일: Monster.py 프로젝트: hafewa/tank-1
    def onSubStateChanged_(self, oldSubState, newSubState):
        """
		virtual method.
		子状态改变了
		"""
        State.onSubStateChanged_(self, oldSubState, newSubState)
        AI.onSubStateChanged_(self, oldSubState, newSubState)
예제 #4
0
	def onSubStateChanged_(self, oldSubState, newSubState):
		"""
		virtual method.
		子状态改变了
		"""
		State.onSubStateChanged_(self, oldSubState, newSubState)
		AI.onSubStateChanged_(self, oldSubState, newSubState)
예제 #5
0
 def __init__(self):
     KBEngine.Entity.__init__(self)
     GameObject.__init__(self)
     Motion.__init__(self)
     Flags.__init__(self)
     State.__init__(self)
     Combat.__init__(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)
예제 #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
	def onForbidChanged_(self, forbid, isInc):
		"""
		virtual method.
		entity禁止 条件改变
		@param isInc		:	是否是增加
		"""
		State.onForbidChanged_(self, forbid, isInc)
		AI.onForbidChanged_(self, forbid, isInc)
예제 #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)
예제 #10
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)
예제 #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)
예제 #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) 
예제 #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
 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
	def __init__(self):
		GameObject.__init__(self) 
		Flags.__init__(self) 
		State.__init__(self) 
		Combat.__init__(self) 
		Spell.__init__(self) 
		Teleport.__init__(self) 
		Dialog.__init__(self) 
예제 #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)
예제 #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)
예제 #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))
예제 #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)
예제 #20
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) 
예제 #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()
예제 #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)
예제 #23
0
파일: Avatar.py 프로젝트: 1958/kbengine
	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)
예제 #24
0
파일: Avatar.py 프로젝트: yyow3193/kbengine
 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)
예제 #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)
예제 #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层来寻路
예제 #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层来寻路
예제 #28
0
파일: Avatar.py 프로젝트: gameogre/kbengine
    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
예제 #29
0
파일: Avatar.py 프로젝트: gameogre/kbengine
	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
예제 #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 
예제 #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 
예제 #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:
예제 #33
0
파일: Avatar.py 프로젝트: yyow3193/kbengine
    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
예제 #34
0
파일: Avatar.py 프로젝트: 1958/kbengine
	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
예제 #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))
예제 #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
예제 #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
예제 #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()
예제 #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))
예제 #40
0
 def __init__(self):
     GameObject.__init__(self)
     Motion.__init__(self)
     Flags.__init__(self)
     State.__init__(self)
     Combat.__init__(self)
예제 #41
0
	def __init__(self):
		GameObject.__init__(self)
		Motion.__init__(self)
		Flags.__init__(self) 
		State.__init__(self) 
		Combat.__init__(self)