test punch anim
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using RebootKit.Engine.Extensions;
|
||||
using RebootKit.Engine.Extensions;
|
||||
using RebootKit.Engine.Foundation;
|
||||
using RebootKit.Engine.Services.Simulation;
|
||||
using Unity.Mathematics;
|
||||
@@ -163,11 +162,22 @@ namespace RebootReality.jelycho.Player {
|
||||
m_PhysicsDragger.Drop();
|
||||
}
|
||||
|
||||
public void PrimaryAction() {
|
||||
m_Animator.SetTrigger(AnimatorParamHashes.Attack);
|
||||
}
|
||||
|
||||
public void SecondaryAction() {
|
||||
m_Animator.SetTrigger(AnimatorParamHashes.Block);
|
||||
}
|
||||
|
||||
struct AnimatorParamHashes {
|
||||
public static readonly int VelocityForwardNormalized = Animator.StringToHash("VelocityForwardNormalized");
|
||||
public static readonly int VelocityRightNormalized = Animator.StringToHash("VelocityRightNormalized");
|
||||
public static readonly int TurnVelocity = Animator.StringToHash("TurnVelocity");
|
||||
public static readonly int IsGrounded = Animator.StringToHash("IsGrounded");
|
||||
|
||||
public static readonly int Attack = Animator.StringToHash("Attack");
|
||||
public static readonly int Block = Animator.StringToHash("Block");
|
||||
}
|
||||
|
||||
void UpdateAnimator() {
|
||||
|
||||
@@ -70,6 +70,14 @@ namespace RebootReality.jelycho.Player {
|
||||
if (m_Config.dragObjectActionReference.action.WasReleasedThisFrame()) {
|
||||
m_FPPActor.StopDrag();
|
||||
}
|
||||
|
||||
if (m_Config.primaryActionReference.action.WasReleasedThisFrame()) {
|
||||
m_FPPActor.PrimaryAction();
|
||||
}
|
||||
|
||||
if (m_Config.secondaryActionReference.action.WasReleasedThisFrame()) {
|
||||
m_FPPActor.SecondaryAction();
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
|
||||
Reference in New Issue
Block a user