fixed timer listening
This commit is contained in:
parent
2b3e9113b4
commit
8577aa5b3b
@ -44,7 +44,11 @@ class TimerListening {
|
|||||||
* Increase last Trigger Time
|
* Increase last Trigger Time
|
||||||
*/
|
*/
|
||||||
public function tick() {
|
public function tick() {
|
||||||
$this->lastTrigger += $this->deltaTime;
|
if ($this->lastTrigger === null) {
|
||||||
|
$this->lastTrigger = microtime(true);
|
||||||
|
} else {
|
||||||
|
$this->lastTrigger += $this->deltaTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user