Search Results

Search found 1 results on 1 pages for 'user3491043'.

Page 1/1 | 1 

  • Slick and Timers?

    - by user3491043
    I'm making a game where I need events to happen in a precise amount of time. Explanation : I want that event A happens at 12000ms, and event B happens every 10000ms. So "if"s should looks like this. //event A if(Ticks == 12000) //do things //even B if(Ticks % 10000 == 0) //do stuff But now how can I have this "Ticks" value ? I tried to declare an int and then increasing it in the update method, I tried 2 ways of increasing it : Ticks++; It doesn't works because the update method is not always called every microseconds. Ticks += delta; It's kinda good but the delta is not always equals to 1, so I can miss the precise values I need in the if statements So if you know how can I do events in a precise amount of time please tell me how can I do this

    Read the article

1