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(); } }
public void FlashIfNeeded(bool flash) { Dispatcher.BeginInvoke((Action)(() => { if (!IsActive) { if (flash) { Flasher.Flash(this); } else { Flasher.Stop(this); } } })); }
private void HideError() { ThermoMath.got_error = false; error_flasher.Stop(); error_message.enabled = false; }