示例#1
0
    void Update()
    {
        if (isReloading)
        {
            return;
        }
        Shoot();

        if (Input.GetButtonDown("Reload") && playerBulletStorage > 0)
        {
            StartCoroutine(Reload());
        }

        UiUpdate();

        if (Input.GetButtonDown("Fire2"))
        {
            CenterMarkAnim.SetBool("IsZooming", true);
            Fade fade = CenterMark.GetComponent <Fade>();
            fade.CallFadeIn();
            ArAnimator.SetBool("IsAiming", true);
            isAiming = true;
        }
        if (Input.GetButtonUp("Fire2"))
        {
            CenterMarkAnim.SetBool("IsZooming", true);
            Fade fade = CenterMark.GetComponent <Fade>();
            fade.CallFadeOut();
            ArAnimator.SetBool("IsAiming", false);
            isAiming = false;
        }
    }