def start_hitState(self): if (not self.isAlive()): start_DieDeathState(self) else: self.linearVelocity[2] = 0.0 self.stopMovement() start_hitUpercut(self)
def start_hitState(self): if not self.isAlive(): start_DieDeathState(self) else: self.linearVelocity[2] = 0.0 self.stopMovement() start_hitUpercut(self)
def start_hitUpercut(self): # Lose heart self.applyDamage() if (not self.isAlive()): start_DieDeathState(self) else: # Play animation self.rig.playHitUpercut() # Play sound self.audio.playHurtSound() # Hit effect hitEffect(self) # Deactive ground self.grounded = False # Fall up force self.linearVelocity[2] += 16.0 self.linearVelocity[1] -= 8.0 # Go to state self.switchState(PlayerState.HIT_UPERCUT_STATE)
def start_hitUpercut(self): # Lose heart self.applyDamage() if not self.isAlive(): start_DieDeathState(self) else: # Play animation self.rig.playHitUpercut() # Play sound self.audio.playHurtSound() # Hit effect hitEffect(self) # Deactive ground self.grounded = False # Fall up force self.linearVelocity[2] += 16.0 self.linearVelocity[1] -= 8.0 # Go to state self.switchState(PlayerState.HIT_UPERCUT_STATE)