Exemple #1
0
        private void BindObjects()
        {
            m_entity = GetComponent <Entity>();
            m_cinemachineMultiChannelPerlin = m_virtualCamera.GetCinemachineComponent <CinemachineBasicMultiChannelPerlin>();
            m_pe = GetComponent <PlayerEntity>();

            GameObject gameManagerObj = GameObject.FindGameObjectWithTag("GameManager");

            m_gm  = gameManagerObj.GetComponent <GameManager>();
            m_ssm = gameManagerObj.GetComponent <ScreenShakeManager>();
        }
Exemple #2
0
        private void BindObjects()
        {
            m_health = GetComponent <EnemyHealth>();
            m_ee     = GetComponent <EnemyEntity>();

            GameObject gameManagerObj = GameObject.FindGameObjectWithTag("GameManager");

            if (m_gm == null)
            {
                m_gm = gameManagerObj.GetComponent <GameManager>();
            }
            if (m_ssm == null)
            {
                m_ssm = gameManagerObj.GetComponent <ScreenShakeManager>();
            }
            ;
        }
 private void BindObjects()
 {
     m_ssm       = GetComponent <ScreenShakeManager>();
     m_playerRef = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerEntity>();
 }