// 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>();
 }
コード例 #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>();
    }