Example #1
0
 private void SetSpeedToDefaultOnAnimDone()
 {
     if (pcAnimator.GetCurrentAnimatorStateInfo(0).normalizedTime >= .99f)
     {
         pcAnimator.speed        = 1f;
         OngoingDisplaybehavior -= SetSpeedToDefaultOnAnimDone;
     }
 }
Example #2
0
 public void StartFlash(int times = 7, float interval = .15f)
 {
     OngoingDisplaybehavior += Flash;
     nextFlashTime           = 0f;
     flashes       = 0;
     timesToFlash  = times;
     flashInterval = interval;
     // Flash();
 }
Example #3
0
#pragma warning restore 649

    public void Start()
    {
        SetupBattleActorView();
        OngoingDisplaybehavior = Nothing;//TODO: this is a cludge
    }
Example #4
0
 private void StopFlash()
 {
     spriteRenderer.color    = Color.white;
     turnOnFlash             = true;
     OngoingDisplaybehavior -= Flash;
 }
Example #5
0
 public void StopBlink()
 {
     spriteRenderer.enabled = true;
     OngoingDisplaybehavior = Nothing;
 }
Example #6
0
 public void StartBlink()
 {
     nextBlinkTime           = Time.time;
     stopBlinkTime           = Time.time + blinkDuration;
     OngoingDisplaybehavior += Blink;
 }
Example #7
0
 public void PlayCharacterAnimationAtSpeed(string stateName, float speed)
 {
     PlayCharacterAnimation(stateName);
     pcAnimator.speed        = speed;
     OngoingDisplaybehavior += SetSpeedToDefaultOnAnimDone;
 }