feat: add shuriken weapon

add shuriken weapon model, 3 animations
change move speed triggers animation
This commit is contained in:
Chris
2026-01-09 01:14:14 -05:00
parent 96c43c6369
commit 49862b5de1
15 changed files with 345 additions and 139 deletions

View File

@@ -12,22 +12,24 @@ namespace Reset.Units{
public Vector3 neckRotOffset;
public Vector3 rotationLimit;
public float moveSpeed;
// Temporary
private float inputMagnitude;
void Update(){
// Temporary
try {
inputMagnitude = Mathf.MoveTowards(inputMagnitude, GetComponent<PlayerControls>().rawMoveInput.magnitude * 2f, 6f * Time.deltaTime);
modelAnimator.SetFloat("Move Direction X", Unit.Movement.GetResolvedDirectionLocal().x * inputMagnitude);
modelAnimator.SetFloat("Move Direction Y", Unit.Movement.GetResolvedDirectionLocal().y * inputMagnitude);
} catch (Exception e) {
Debug.LogError($"Failed in setting X and Y move direction floats: {e.Message}");
}
// try {
// inputMagnitude = Mathf.MoveTowards(inputMagnitude, GetComponent<PlayerControls>().rawMoveInput.magnitude * 2f, 6f * Time.deltaTime);
//
// modelAnimator.SetFloat("Move Direction X", Unit.Movement.GetResolvedDirectionLocal().x * inputMagnitude);
// modelAnimator.SetFloat("Move Direction Y", Unit.Movement.GetResolvedDirectionLocal().y * inputMagnitude);
// } catch (Exception e) {
// Debug.LogError($"Failed in setting X and Y move direction floats: {e.Message}");
// }
modelAnimator.SetFloat("Move Direction X", moveSpeed);
}
private void LateUpdate(){