Skip to content

Commit

Permalink
マウスのボタンの状態も取得できるようにしたい
Browse files Browse the repository at this point in the history
  • Loading branch information
kazakami committed Dec 12, 2018
1 parent 79a6c0f commit 304be54
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export class Core {
private previousTime: number = null;
private keyState: { [key: string]: boolean } = {};
private previousKeyState: { [key: string]: boolean } = {};
private mouseLeftState: boolean = false;
private previousMouseLeftState: boolean = false;
private ratio: number = 1;

constructor(private option: CoreOption) {
Expand Down Expand Up @@ -667,6 +669,7 @@ export class Core {
for (const key in this.keyState) {
this.previousKeyState[key] = this.keyState[key];
}
this.previousMouseLeftState = this.mouseLeftState;
}

private Draw(): void {
Expand Down

0 comments on commit 304be54

Please sign in to comment.