Skip to content

Commit

Permalink
docs: optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
tianqing617 committed Nov 19, 2021
1 parent aa90bed commit 273dda8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/GameControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default class GameControl {
console.log('enum', DirectionEnum);
const keys = Object.keys(DirectionEnum);
// 是否是此四个键:ArrowRight ArrowLeft ArrowUp ArrowDown
// TODO: 优化:DirectionEnum[event.key] 若存在,则属性上下左右四个按钮
if (keys.includes(event.key)) {
// @ts-ignore
console.log('num', DirectionEnum[event.key], this.direction);
Expand Down

0 comments on commit 273dda8

Please sign in to comment.