Exemple #1
0
    public void DoUpdate(Player player, ref PlayerFrameInfo frameInfo)
    {
        animator.SetFloat(AnimParams.FACEDIRX, player.FaceDir.x);
        animator.SetFloat(AnimParams.FACEDIRY, player.FaceDir.y);
        spriteRenderer.sortingOrder = Mathf.RoundToInt(player.transform.position.y * 100f) * -1;

        if (frameInfo.isFullyCharged)
        {
            flasherCharge.Stop();
            flasherFullCharge.Start();
        }
        else if (frameInfo.isCharging)
        {
            flasherCharge.Start();
        }
        else if (frameInfo.hasStoppedCharging)
        {
            flasherCharge.Stop();
            flasherFullCharge.Stop();
        }
    }
Exemple #2
0
 public void FlashIfNeeded(bool flash)
 {
     Dispatcher.BeginInvoke((Action)(() =>
     {
         if (!IsActive)
         {
             if (flash)
             {
                 Flasher.Flash(this);
             }
             else
             {
                 Flasher.Stop(this);
             }
         }
     }));
 }
Exemple #3
0
 private void HideError()
 {
     ThermoMath.got_error = false;
     error_flasher.Stop();
     error_message.enabled = false;
 }