protected override void _StartAction(RPGCharacterController controller, HitContext context) { int hitNumber = context.number; Vector3 direction = context.direction; float force = context.force; float variableForce = context.variableForce; if (hitNumber == -1) { hitNumber = AnimationData.RandomHitNumber("Knockback"); direction = AnimationData.HitDirection("Knockback", hitNumber); direction = controller.transform.rotation * direction; } else { if (context.relative) { direction = controller.transform.rotation * direction; } } controller.GetAngry(); controller.Knockback(hitNumber); movement.KnockbackForce(direction, force, variableForce); movement.currentState = RPGCharacterState.Knockback; }
protected override void _StartAction(RPGCharacterController controller, int context) { controller.GetAngry(); controller.Dodge(context); }
protected override void _StartAction(RPGCharacterController controller, EmptyContext context) { controller.GetAngry(); movement.currentState = RPGCharacterState.Jump; }