This repository has been archived by the owner on Nov 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed multible slice registration bug * Fixed shift Keys bug
- Loading branch information
1 parent
8f1a564
commit 9f19c49
Showing
5 changed files
with
57 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import EngineEvent from "../../engineevent.js"; | ||
import KeyBoardEventData from "./keyboardeventdata.js"; | ||
|
||
class KeyBoardEvent extends EngineEvent<KeyBoardEventData> { | ||
constructor(key: string) { | ||
super(new KeyBoardEventData(key)); | ||
} | ||
} | ||
|
||
export default KeyBoardEvent; |
13 changes: 13 additions & 0 deletions
13
src/ts/engine/event/events/keyboardevent/keyboardeventdata.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class KeyBoardEventData { | ||
private _key: string; | ||
|
||
get key(): string { | ||
return this._key; | ||
} | ||
|
||
constructor(key: string) { | ||
this._key = key; | ||
} | ||
} | ||
|
||
export default KeyBoardEventData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters