bunch of shit
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user