2022-08-02 20:20:08 +00:00
|
|
|
export function start(): void {
|
2022-08-01 15:56:51 +00:00
|
|
|
if (this.isActive.value && !this.shouldStop.value) {
|
|
|
|
console.warn('attempt to start already running engine!')
|
|
|
|
return
|
|
|
|
}
|
|
|
|
this.isActive.value = true
|
|
|
|
this.shouldStop.value = false
|
|
|
|
console.log('start engine')
|
|
|
|
}
|
2022-08-02 20:20:08 +00:00
|
|
|
|
|
|
|
export function stop(): void {
|
|
|
|
if (this.isActive.value) {
|
|
|
|
this.shouldStop.value = true
|
|
|
|
console.log('shut down engine')
|
|
|
|
}
|
|
|
|
}
|