bunch of shit
This commit is contained in:
parent
bc1a251842
commit
923ac33302
20
hGameTest/src/game/Input.hx
Normal file
20
hGameTest/src/game/Input.hx
Normal 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;
|
||||
}
|
||||
}
|
||||
@ -9,4 +9,7 @@ class BaseRenderable extends BaseEntity{
|
||||
super();
|
||||
sprite = new Sprite();
|
||||
}
|
||||
override public function think(){
|
||||
super.think();
|
||||
}
|
||||
}
|
||||
@ -10,6 +10,6 @@ class Player extends BaseRenderable{
|
||||
sprite.addChild(new Bitmap(Tileset.tilesetMap["testsheet"].tileMap["testTile5"]));
|
||||
}
|
||||
override public function think(){
|
||||
|
||||
super.think();
|
||||
}
|
||||
}
|
||||
2
hGameTest/src/game/scene/Map.hx
Normal file
2
hGameTest/src/game/scene/Map.hx
Normal file
@ -0,0 +1,2 @@
|
||||
package game.scene;
|
||||
|
||||
2
hGameTest/src/game/scene/Menu.hx
Normal file
2
hGameTest/src/game/scene/Menu.hx
Normal file
@ -0,0 +1,2 @@
|
||||
package game.scene;
|
||||
|
||||
2
hGameTest/src/game/scene/Scene.hx
Normal file
2
hGameTest/src/game/scene/Scene.hx
Normal file
@ -0,0 +1,2 @@
|
||||
package game.scene;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user