I used Reset ResetTrigger() can’t cancel the SetTrigger.it will continue to be triggered.thanks!`
UnityEditorInternal.AnimatorController ac =
animator.runtimeAnimatorController as UnityEditorInternal.AnimatorController;
UnityEditorInternal.StateMachine sm = ac.GetLayer(0).stateMachine;
for (int i = 0; i < sm.stateCount; i++ )
ResetTrigger turns off an animation trigger that is currently on.
if(playerAmmo == 4 && timeDelay == 30)
ammoController.GetComponent(SpriteRenderer).sprite = fourBullets;
I’m afraid I can’t give exact feedback to your code as using the request in an array might work, but only if the requested trigger is active I believe.