ohzi-core 6.5.1 → 6.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ohzi-core",
3
- "version": "6.5.1",
3
+ "version": "6.5.2",
4
4
  "description": "OHZI Core Library",
5
5
  "source": "src/index.js",
6
6
  "module": "build/index.module.js",
@@ -49,7 +49,7 @@ class KeyboardInput
49
49
  key.down = false;
50
50
  key.released = true;
51
51
  }
52
- }
52
+ }
53
53
 
54
54
  release_keys()
55
55
  {
@@ -64,19 +64,13 @@ class KeyboardInput
64
64
 
65
65
  press_key(key_name)
66
66
  {
67
- // for (let i = 0; i < this.keys.length; i++)
68
- // {
69
- // if (this.keys[i].key_name === key && !this.keys[i].fired)
70
- // {
71
- // this.keys[i].pressed = true;
72
- // this.keys[i].down = true;
73
- // this.keys[i].fired = true;
74
- // }
75
- // }
76
67
  const key = this.keys.find(key => key.key_name === key_name);
77
68
  if (key)
78
69
  {
79
- key.pressed = true;
70
+ if (key.down === false)
71
+ {
72
+ key.pressed = true;
73
+ }
80
74
  key.down = true;
81
75
  key.fired = true;
82
76
  }
@@ -100,7 +94,7 @@ class KeyboardInput
100
94
  return key.down;
101
95
  }
102
96
  return false;
103
- }
97
+ }
104
98
 
105
99
  is_key_released(key_name)
106
100
  {