示例#1
0
    void Update()
    {
        aimTiming += Time.deltaTime;
        if (aimTiming > 6f)
        {
            isAiming = true;
        }


        tempTime += Time.deltaTime;

        //Aim bullet
        if (tempTime > timeBetweenShots && isAiming)
        {
            bullet.AimPlayer();
            counter++;
            tempTime = 0;
        }
        if (counter >= aimNumber)
        {
            counter   = 0;
            isAiming  = false;
            aimTiming = 0f;
        }

        //Destroy boss
        if (hp <= 0)
        {
            Destroy(gameObject);
            SceneManager.LoadScene("Game");
        }
    }
示例#2
0
    void Update()
    {
        tempTime += Time.deltaTime;

        //Aim bullet
        if (tempTime > timeBetweenShots)
        {
            bullet.AimPlayer();
            tempTime = 0;
        }

        //Destroy boss
        if (hp <= 0)
        {
            Destroy(gameObject);
            SceneManager.LoadScene("Game");
        }
    }
示例#3
0
    void Update()
    {
        tempTime += Time.deltaTime;

        //Aim bullet
        if (tempTime > timeBetweenShots)
        {
            bullet.AimPlayer();
            tempTime = 0;
        }

        //Destroy boss
        if (hp <= 0)
        {
            Destroy(gameObject);

            PlayerPrefs.SetFloat("Shoot", playerController.GetTimeBetweenShoots());
            SceneManager.LoadScene("Game");
        }
    }