private void onAnimationDone(EventArgs i_EventArgs) { if (AnimationDone != null) { AnimationDone.Invoke(this, i_EventArgs); } }
public void AnimationEnd() { _aniamationsDone++; if (_aniamationsDone >= 4) { AnimationDone?.Invoke(); } }
public void AnimationEnd() { _aniamationsDone++; if (_aniamationsDone == 3) { AnimationDone?.Invoke(); gameObject.SetActive(false); } }
public void NextFrame() { _currentFrame++; if (_currentFrame == _totalFrames) { _currentFrame = 0; AnimationDone?.Invoke(); } }
private void OnAnimationDone(CharacterAnimations animation) { if (AnimationDone != null) { AnimationDone.Invoke(this, new AnimationArgs() { Animation = animation }); } }
public void Update() { if (Speed > 0 && animTimer++ > Speed) { if (++ImageIndex == frames.Length) { ImageIndex = 0; AnimationDone?.Invoke(); } animTimer = 0; } }