void Start() { try { SetUpAnimator(); weps.SetUpWeapons(anim); Debug.Log(weps.WeaponIcon.name); cam = Camera.main.transform; anim = GetComponent <Animator>(); rigidBody = GetComponent <Rigidbody>(); audioSource = GetComponent <AudioSource>(); GameObject obj = GameObject.Find("GameplayCanvas");//.GetComponentInChildren<Right_Stick>(); r_stick = obj.GetComponentInChildren <Right_Stick>(); l_stick = obj.GetComponentInChildren <Left_Stick>(); powerUpIcon = obj.GetComponentInChildren <PowerUpsUI>().GetComponentInChildren <Image>(true); powerUpSlider = obj.GetComponentInChildren <PowerUpsUI>().GetComponentInChildren <Slider>(true); reloadUI = obj.GetComponentInChildren <ReloadUI>(); } catch { } StartCoroutine("FootSteps"); }
void Start() { try { SetUpAnimator(); weps.SetUpWeapons(anim); cam = Camera.main.transform; anim = GetComponent <Animator>(); rigidBody = GetComponent <Rigidbody>(); audioSource = GetComponent <AudioSource>(); r_stick = GameObject.FindGameObjectWithTag("UI").GetComponentInChildren <Right_Stick>(); l_stick = GameObject.FindGameObjectWithTag("UI").GetComponentInChildren <Left_Stick>(); } catch { GetComponent <PlayerHealthController>().logs.text += ("yyy cyk"); } StartCoroutine("FootSteps"); //if (hidemouse) //{ // Cursor.lockState = CursorLockMode.Confined; // Cursor.visible = false; //} }