Exemplo n.º 1
0
 void Start()
 {
     bulletSpawnPoint = transform.Find("BulletSpawnPoint").gameObject;
     audioSource      = GetComponent <AudioSource>();
     fpsCam           = Camera.main;
     anim             = GetComponent <Animator>();
     UI = FindObjectOfType <UIButtonCallbacks>();
 }
Exemplo n.º 2
0
        // Use this for initialization
        private void Start()
        {
            m_CharacterController = GetComponent <CharacterController>();
            m_Camera = Camera.main;
            m_OriginalCameraPosition = m_Camera.transform.localPosition;
            m_FovKick.Setup(m_Camera);
            m_HeadBob.Setup(m_Camera, m_StepInterval);
            m_StepCycle   = 0f;
            m_NextStep    = m_StepCycle / 2f;
            m_Jumping     = false;
            m_AudioSource = GetComponent <AudioSource>();
            m_MouseLook.Init(transform, m_Camera.transform);

            m_dashOnCooldown = false;

            UI = FindObjectOfType <UIButtonCallbacks>();
        }