()
| 307 | } |
| 308 | |
| 309 | public close(): void { |
| 310 | if (this.isClosed()) { |
| 311 | return |
| 312 | } |
| 313 | |
| 314 | if (this.hookFunctionPointer) { |
| 315 | this.lua.module.removeFunction(this.hookFunctionPointer) |
| 316 | } |
| 317 | |
| 318 | this.closed = true |
| 319 | } |
| 320 | |
| 321 | // Set to > 0 to enable, otherwise disable. |
| 322 | public setTimeout(timeout: number | undefined): void { |