private void BindEvents()
        {
            if (m_screenShakeEvent == null)
            {
                m_screenShakeEvent = new ScreenShakeEvent();
            }

            m_screenShakeEvent.AddListener(StartScreenShake);
        }
Esempio n. 2
0
    // ********************************************************************
    #endregion
    // ********************************************************************


    // ********************************************************************
    #region Private Methods
    // ********************************************************************
    private void OnScreenShakeEvent(ScreenShakeEvent _event)
    {
        ApplyScreenShake(_event.magnitude);
    }
Esempio n. 3
0
 private void OnDisable()
 {
     onScreenShake -= Shake;
 }
Esempio n. 4
0
    public void ShakeScreen(bool instant, float factor = 1f, float time = 1f)
    {
        ScreenShakeEvent ssEvent = new ScreenShakeEvent(instant, factor, time);

        eventQueue.Enqueue(ssEvent);
    }
Esempio n. 5
0
 void Start()
 {
     onScreenShake += Shake;
 }