igt-vue icon indicating copy to clipboard operation
igt-vue copied to clipboard

Create Counter tool

Open Ishadijcks opened this issue 3 years ago • 0 comments

The Counter should take an interval in seconds. After running update(delta) on it, it can be used in 3 ways:

const c = new Counter(30, this.save)
c.update(delta)
const c = new Counter(30)
c.onComplete.subscribe(this.save)
const c = new Counter(30)
if(c.update(delta)) {
    this.save()
}

This Counter should replace the save interval, achievement check and special events

Also add a boolean that determines if excess delta should carry over or be discarded

Ishadijcks avatar Apr 05 '21 00:04 Ishadijcks