Fix collision detection
This commit is contained in:
parent
006ab3c4e6
commit
5b4e67cbf0
9 changed files with 169 additions and 49 deletions
|
|
@ -12,9 +12,9 @@ import { createCharacter } from './objects/world/create-character';
|
|||
import { createDungeon } from './objects/world/create-dungeon';
|
||||
import { RenderCommand } from './drawing/commands/render';
|
||||
import { Physics } from './physics/physics';
|
||||
import { MoveToCommand } from './physics/commands/move-to';
|
||||
import { TeleportToCommand } from './physics/commands/teleport-to';
|
||||
import { IRenderer } from './drawing/i-renderer';
|
||||
import { Random } from './helper/random';
|
||||
|
||||
export class Game {
|
||||
private previousTime?: DOMHighResTimeStamp = null;
|
||||
|
|
@ -28,6 +28,8 @@ export class Game {
|
|||
const canvas: HTMLCanvasElement = document.querySelector('canvas#main');
|
||||
const overlay: HTMLElement = document.querySelector('#overlay');
|
||||
|
||||
Random.seed = 42;
|
||||
|
||||
document.addEventListener(
|
||||
'visibilitychange',
|
||||
this.handleVisibilityChange.bind(this)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue