private void Awake() { if (globalFader == null) { globalFader = this; } else { Destroy(this); } SetFaderImageReference(); }
private void OnBreakChange(bool value) { atWork = value; PlayerBehavior.FreezePlayerMovementController(value); GlobalFader.TransitionBetweenFade(this, RunOnBreakChange(), 2, 0.5f, 2.2f); }