test punch anim

This commit is contained in:
2025-06-22 12:12:46 +02:00
parent c8cfb28a7b
commit b67178e36c
9 changed files with 1075 additions and 18 deletions

View File

@@ -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() {