Esempio n. 1
0
    // Start is called before the first frame update
    void Start()
    {
        mainCamera = Camera.main;
        //Cursor.visible = false;
        //Cursor.lockState = CursorLockMode.Locked;
        animator     = GetComponent <Animator>();
        activeWeapon = GetComponent <ActiveWeapon>();

        //USED FOR AIMING BUTTON
        btnCountChecker = GameObject.FindGameObjectWithTag("ScriptHolder").GetComponent <UiButtonFuctionsScript>();

        desktopControlls = GameObject.FindGameObjectWithTag("ScriptHolder").GetComponent <DekstopControlls>();
    }
Esempio n. 2
0
    void Start()
    {
        reload = GetComponent <ReloadWeapon>();
        RaycastWeapon existingWeapon = GetComponentInChildren <RaycastWeapon>();

        if (existingWeapon)
        {
            Equip(existingWeapon);
        }

        //TESTING
        btnCountChecker  = GameObject.FindGameObjectWithTag("ScriptHolder").GetComponent <UiButtonFuctionsScript>();
        desktopControlls = GameObject.FindGameObjectWithTag("ScriptHolder").GetComponent <DekstopControlls>();
    }
    // Start is called before the first frame update
    void Start()
    {
        animator        = GetComponent <Animator>();
        cc              = GetComponent <CharacterController>();
        activeWeapon    = GetComponent <ActiveWeapon>();
        reloadWeapon    = GetComponent <ReloadWeapon>();
        characterAiming = GetComponent <CharacterAiming>();

        #region  Movement with Joystick

        Leftjoystick = FindObjectOfType <FixedJoystick>();


        #endregion
        btnScriptTapCounterHelper = GameObject.FindGameObjectWithTag("ScriptHolder").GetComponent <UiButtonFuctionsScript>();
        desktopControlls          = GameObject.FindGameObjectWithTag("ScriptHolder").GetComponent <DekstopControlls>();
    }