maint: clean-up of some combat related classes and methods for clarity

This commit is contained in:
Chris
2025-10-23 13:04:56 -04:00
parent eb1622d4ed
commit a83ab1156a
13 changed files with 135 additions and 527 deletions

View File

@@ -8,13 +8,9 @@ namespace Reset.Units{
// Temporary
private float inputMagnitude;
void Start(){
}
void Update(){
// Temporary
try {
// Temporary
inputMagnitude = Mathf.MoveTowards(inputMagnitude, GetComponent<PlayerControls>().rawMoveInput.magnitude * 2f, 6f * Time.deltaTime);
modelAnimator.SetFloat("Move Direction X", Unit.Movement.GetResolvedDirectionLocal().x * inputMagnitude);
@@ -23,21 +19,6 @@ namespace Reset.Units{
Debug.LogError($"Failed in setting X and Y move direction floats: {e.Message}");
}
}
public void SendTriggerToAnimator(string trigger){
if (!modelAnimator) {
Debug.LogError($"There is no animator set to recieve the trigger '{trigger}' on unit {name}.", gameObject);
return;
}
try {
modelAnimator.SetTrigger(trigger);
}
catch (Exception e)
{
Debug.LogError($"Failed to send trigger to Animator: {e.Message}");
}
}
}