public void HandleRollingAndSprinting(float delta) { if (animatorHandler.anim.GetBool("isInteracting")) { return; } if (inputHandler.rollFlag) { moveDirection = cameraObject.forward * inputHandler.vertical; moveDirection += cameraObject.right * inputHandler.horizontal; if (inputHandler.moveAmount > 0) { animatorHandler.PlayerTargetAnimation("Roll", true); moveDirection.y = 0; Quaternion rollRotation = Quaternion.LookRotation(moveDirection); myTransform.rotation = rollRotation; } else { animatorHandler.PlayerTargetAnimation("Backstep", true); } } }
public void TakeDamage(int damage) { currentHealth = currentHealth - damage; if (currentHealth > 0) { currentHealth = 0; } healthbar.SetCurrentHealth(currentHealth); if (currentHealth == 0) { currentHealth = 0; animatorHandler.PlayerTargetAnimation("Unarmed-Death1", true); } animatorHandler.PlayerTargetAnimation("Damage_Animation", true); }
public void HandleLightAttack(WeaponItem weapon) { animatorHandler.PlayerTargetAnimation(weapon.OH_Light_Attack_1, true); }