Timer.js 709 B

12345678910111213141516171819202122232425262728293031323334
  1. function Timer() {
  2. }
  3. Timer.prototype.Pause = function(paused) {
  4. Polycode.Timer_Pause(this.__ptr, paused)
  5. }
  6. Timer.prototype.isPaused = function() {
  7. Polycode.Timer_isPaused(this.__ptr)
  8. }
  9. Timer.prototype.getTicks = function() {
  10. Polycode.Timer_getTicks(this.__ptr)
  11. }
  12. Timer.prototype.Update = function(ticks) {
  13. Polycode.Timer_Update(this.__ptr, ticks)
  14. }
  15. Timer.prototype.Reset = function() {
  16. Polycode.Timer_Reset(this.__ptr)
  17. }
  18. Timer.prototype.hasElapsed = function() {
  19. Polycode.Timer_hasElapsed(this.__ptr)
  20. }
  21. Timer.prototype.getElapsedf = function() {
  22. Polycode.Timer_getElapsedf(this.__ptr)
  23. }
  24. Timer.prototype.setTimerInterval = function(msecs) {
  25. Polycode.Timer_setTimerInterval(this.__ptr, msecs)
  26. }