void OnPayloadReceived(object sender, Misc.PayloadReceivedEventArgs e)
        {
            var msg = e.Payload;

            if (msg.EventType == "TIMER")
            {
                if (msg.Event == "CALL_START")
                {
                    Started?.Invoke(this, new EventArgs());
                }
                if (msg.Event == "CALL_START_PAUSE")
                {
                    Paused?.Invoke(this, new EventArgs());
                }
                if (msg.Event == "CALL_END_PAUSE")
                {
                    Unpaused?.Invoke(this, new EventArgs());
                }
                if (msg.Event == "CALL_END")
                {
                    Stopped?.Invoke(this, new EventArgs());
                }
                if (msg.Event == "CALL_CANCEL")
                {
                    Canceled?.Invoke(this, new EventArgs());
                }
            }
        }
Exemplo n.º 2
0
    public virtual void Unpause()
    {
        isPaused = false;
        Unpaused.Invoke();

        // Register collisions again
        rigidbody.Sleep();
    }
Exemplo n.º 3
0
 public virtual void Unpause()
 {
     if (State == SceneState.PAUSED)
     {
         State = SceneState.ACTIVE;
     }
     Unpaused?.Invoke(this, new EventArgs());
     Resumed?.Invoke(this, new EventArgs());
 }
    public void UnpauseGame()
    {
        gamePaused = false;
        Unpaused.Invoke();

        if (pauseMenu != null && pauseMenu.activeSelf == true)
        {
            pauseMenu.SetActive(false);
        }
    }
Exemplo n.º 5
0
    public void Unpause()
    {
        // Resume previous motion and collision-registering
        velocity         = previousVelocity;
        previousVelocity = velocity;
        // ^ Keep previousVelocity from being 0
        rigidbody.WakeUp();

        isPaused = false;
        Unpaused.Invoke();
    }
 public void Unpause()
 {
     isPaused = false;
     Unpaused.Invoke();
 }
Exemplo n.º 7
0
 public void Unpause()
 {
     // Let the gun shoot again
     isPaused = false;
     Unpaused.Invoke();
 }