16 lines
421 B
TypeScript
16 lines
421 B
TypeScript
export function start(): void {
|
|
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')
|
|
}
|
|
|
|
export function stop(): void {
|
|
if (this.isActive.value) {
|
|
this.shouldStop.value = true
|
|
console.log('shut down engine')
|
|
}
|
|
} |