maint: clean-up of some combat related classes and methods for clarity
This commit is contained in:
@@ -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}");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user