Ejemplo n.º 1
0
    public void addAutoClick()
    {
        //Store initial time once


        //Basic Countdown Code
        if (startTimer < autoClick_timer)
        {
            //Decrese time elapsed between frames to countdown every frame
            startTimer += Time.deltaTime;
            // Debug.Log("Current Timer: " + startTimer);
        }
        else
        {
            startTimer = 0;
            //Time has passed add the points
            ClickerCounter.numberOfClicks++;
            ClickerCounter.totalClicks++;
            ClickerCounter.SpawnParticle();
            //Reset timer variable to save it next frame
            // Debug.Log("Timer Reset to: " + autoClick_timer);
        }
    }