예제 #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> ();
    }
예제 #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>();
    }
예제 #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);
    }