Esempio n. 1
0
    void Start()
    {
        firstPerson_View = transform.Find("FPS View").transform;
        charController   = GetComponent <CharacterController> ();


        speed     = walkSpeed;
        is_Moving = false;

        rayDistance = charController.height * 0.5f + charController.radius;
        default_ControllerHeight = charController.height;
        default_CamPos           = firstPerson_View.localPosition;

        playerAnimation = GetComponent <FPSPlayerAnimation> ();
    }
Esempio n. 2
0
    void Start()
    {
        firsPerson_View = transform.Find("FPS View").transform;
        charController  = GetComponent <CharacterController>();
        speed           = walkSpeed;
        is_moving       = false;

        rayDistance = charController.height * 0.5f + charController.radius;
        default_ControllerHeight = charController.height;
        default_CamPos           = firsPerson_View.localPosition;

        playerAnimation = GetComponent <FPSPlayerAnimation>();

        weapon_Manager.weapons[0].SetActive(true);
        current_Weapon = weapon_Manager.weapons[0].GetComponent <FPSWeapon>();
    }
Esempio n. 3
0
    // Use this for initialization
    void Start()
    {
        _audioSource    = GetComponent <AudioSource>();
        firstPersonView = transform.Find("FPS View").transform;
        charController  = GetComponent <CharacterController>();
        speed           = walkSpeed;
        isMoving        = false;

        rayDistance             = charController.height * 0.5f + charController.radius;
        defaultControllerHeight = charController.height;
        defaultCamPos           = firstPersonView.localPosition;

        playerAnimation = GetComponent <FPSPlayerAnimation>();

        weaponManager.weapons[0].SetActive(true);
        currentWeapon      = weaponManager.weapons[0].GetComponent <FPSWeapon>();
        currentHandsWeapon = handsWeaponManager.weapons[0].GetComponent <FPSHandsWeapon>();

        handsWeaponManager.weapons[0].SetActive(true);
    }