示例#1
0
    // Use this for initialization
    void Start()
    {
        player               = GameObject.FindGameObjectWithTag("Player");
        skyboxCameraHolder   = GameObject.FindGameObjectWithTag("skyboxViewer");
        cameraHolder         = GameObject.FindGameObjectWithTag("cameraHolder");
        playerMove           = player.GetComponent <playerMove>();
        aimdownsights        = weaponHolder.GetComponent <aimDownSights> ();
        healthcontroller     = player.GetComponent <healthController> ();
        armsAnimator         = arms.GetComponent <Animator>();
        cameraAnimator       = cameraHolder.GetComponent <Animator> ();
        skyboxCameraAnimator = skyboxCameraHolder.GetComponent <Animator> ();
        weaponAnimator       = GetComponent <Animator> ();
        rounds               = magSize;

        weaponAudio = GetComponent <AudioSource> ();
    }
示例#2
0
 // Use this for initialization
 void Start()
 {
     AimDownSights = weaponHolder.GetComponent <aimDownSights> ();
 }