Exemplo n.º 1
0
def openRegularDoor(self):
    # if anim finish ed
    if (self.rig.getActionFrame(5) == 48):
        # if detect new
        if (self.tester.detectNextLevelSwitcher()):
            start_pathFollowLevelState(self)
        else:
            # go to idle
            self.switchState(PlayerState.IDLE_STATE)
Exemplo n.º 2
0
def openRegularDoor(self):
	# if anim finish ed
	if (self.rig.getActionFrame(5) == 48):
		# if detect new
		if (self.tester.detectNextLevelSwitcher()):
		  start_pathFollowLevelState(self)
		else:
		  # go to idle
		  self.switchState(PlayerState.IDLE_STATE)
Exemplo n.º 3
0
def pathFollowState(self):
	if (self.tester.detectNextLevelSwitcher()):
		start_pathFollowLevelState(self)
	else:
		# if near the target step change to the next step
		if ( distPathTarget(self) < 1.2):
			# change to the next step
			nextStep(self)
		else:
			# play run animation
			self.rig.playRun()
			# move
			self.linearVelocity[0] = 0
			self.linearVelocity[1] = 8.0