Add input handling
This commit is contained in:
parent
29c6b14440
commit
d5be727040
36 changed files with 417 additions and 113 deletions
7
frontend/src/scripts/objects/game-object.ts
Normal file
7
frontend/src/scripts/objects/game-object.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { Typed } from '../transport/serializable';
|
||||
import { Vec2 } from '../math/vec2';
|
||||
|
||||
export class GameObject extends Typed {
|
||||
public position = new Vec2();
|
||||
public boundingBoxSize = new Vec2();
|
||||
}
|
||||
8
frontend/src/scripts/objects/object-container.ts
Normal file
8
frontend/src/scripts/objects/object-container.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { GameObject } from './game-object';
|
||||
import { Camera } from './types/camera';
|
||||
|
||||
export class ObjectContainer {
|
||||
private objects: Array<GameObject> = [];
|
||||
|
||||
constructor(public camera: Camera) {}
|
||||
}
|
||||
3
frontend/src/scripts/objects/types/camera.ts
Normal file
3
frontend/src/scripts/objects/types/camera.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import { GameObject } from '../game-object';
|
||||
|
||||
export class Camera extends GameObject {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue