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:
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user