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