Interpolate count up Question

I am messing around with a cookie clicker type application. I currently have it set up so each click adds 1 to the score. I have a store that you can buy a power up that adds 10 points to the score each time you purchase. Once you purchase this, I have a timer set that the score increases by this value every 2 seconds. The score counts up using interpolation to do so. This all works so far. My question is, how do I add to the score during the interpolation count up? If I click while the count up is happening my score is not reflecting the additional clicks. I am only able to add to the score through clicking once the count up has ended. My eventual plan is that the score is continually counting up due to power up purchases which would currently never count any of the user clicks. Hope that makes some sense. Thanks in advance.

Answers

  • SocksSocks London, UK.Member Posts: 12,822

    Click changes A+1
    Interpolate interpolates B to its target value
    Score = A + B

Sign In or Register to comment.