Пример #1
0
 void shouldPlayerBeFrozen()
 {
     if ((parentofGameEvents.childCount >= 0))
     {
         OnFreeze?.Invoke(false);
     }
     if ((parentOfNewTransforms.childCount <= 1) && (parentofGameEvents.childCount == 0) && (freezeOverride == false))
     {
         OnFreeze?.Invoke(true);
     }
 }
Пример #2
0
    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);
    }
Пример #3
0
 public void Freeze()
 {
     Console.WriteLine("Freezing...");
     OnFreeze?.Invoke(this, new EventArgs());
     freezingState = true;
 }