void shouldPlayerBeFrozen() { if ((parentofGameEvents.childCount >= 0)) { OnFreeze?.Invoke(false); } if ((parentOfNewTransforms.childCount <= 1) && (parentofGameEvents.childCount == 0) && (freezeOverride == false)) { OnFreeze?.Invoke(true); } }
private IEnumerator FreezeEvent() { var time = DateTime.Now; Debug.Log("freezed"); isFreezed = true; catIceShell.SetActive(true); OnFreeze?.Invoke(isFreezed); yield return(Yielders.Get(freezeTime)); var elapsed = DateTime.Now; var difference = elapsed - time; Debug.Log(difference + " not freezed"); isFreezed = false; catIceShell.SetActive(false); OnFreeze?.Invoke(isFreezed); }
public void Freeze() { Console.WriteLine("Freezing..."); OnFreeze?.Invoke(this, new EventArgs()); freezingState = true; }