feat: more combat tweaks

shuriken can now be thrown
jumping animtions
jumping animations timing
state machine changes
start of online integration
This commit is contained in:
Chris
2026-01-15 14:42:25 -05:00
parent a06784f7b6
commit 25b7fae339
45 changed files with 28662 additions and 250 deletions

View File

@@ -1,4 +1,5 @@
using System;
using Unity.Netcode.Components;
using UnityEngine;
using UnityEngine.Rendering;
@@ -18,6 +19,8 @@ namespace Reset.Units{
// Temporary
private float inputMagnitude;
private NetworkAnimator netAnimator;
void Update(){
// Temporary
@@ -34,8 +37,19 @@ namespace Reset.Units{
modelAnimator.SetFloat("Gravity", Unit.Movement.resolvedMovement.gravity);
modelAnimator.SetBool("Grounded", Physics.Raycast(transform.position, Vector3.down, .2f));
Debug.Log(Unit.Movement.GetGrounded());
}
public void SendAnimationTrigger(string trigger){
if (Unit.UnitIsNetworked()) {
try {
netAnimator.SetTrigger(trigger);
} catch (Exception e){
Debug.LogError($"Failed to send network animation trigger: {e.Message}");
}
} else {
modelAnimator.SetTrigger(trigger);
}
}
private void LateUpdate(){