bunch of shit

This commit is contained in:
2021-03-14 18:39:55 +01:00
parent bc1a251842
commit 923ac33302
6 changed files with 30 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
package game;
import openfl.events.KeyboardEvent;
class Input{
public static var keys:Array<Bool> = [];
public static var keysLast:Array<Bool> = [];
public static function onKeyIsDown(e:KeyboardEvent){
keys[e.charCode] = true;
}
public static function onKeyIsUp(e:KeyboardEvent){
keys[e.charCode] = false;
}
public static function onEnterFrame()
{
keysLast = keys;
}
}