private void SetSpeedToDefaultOnAnimDone() { if (pcAnimator.GetCurrentAnimatorStateInfo(0).normalizedTime >= .99f) { pcAnimator.speed = 1f; OngoingDisplaybehavior -= SetSpeedToDefaultOnAnimDone; } }
public void StartFlash(int times = 7, float interval = .15f) { OngoingDisplaybehavior += Flash; nextFlashTime = 0f; flashes = 0; timesToFlash = times; flashInterval = interval; // Flash(); }
#pragma warning restore 649 public void Start() { SetupBattleActorView(); OngoingDisplaybehavior = Nothing;//TODO: this is a cludge }
private void StopFlash() { spriteRenderer.color = Color.white; turnOnFlash = true; OngoingDisplaybehavior -= Flash; }
public void StopBlink() { spriteRenderer.enabled = true; OngoingDisplaybehavior = Nothing; }
public void StartBlink() { nextBlinkTime = Time.time; stopBlinkTime = Time.time + blinkDuration; OngoingDisplaybehavior += Blink; }
public void PlayCharacterAnimationAtSpeed(string stateName, float speed) { PlayCharacterAnimation(stateName); pcAnimator.speed = speed; OngoingDisplaybehavior += SetSpeedToDefaultOnAnimDone; }