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)
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