bunch of shit
This commit is contained in:
parent
bbd08f0065
commit
36526435ac
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();
|
super();
|
||||||
sprite = new Sprite();
|
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"]));
|
sprite.addChild(new Bitmap(Tileset.tilesetMap["testsheet"].tileMap["testTile5"]));
|
||||||
}
|
}
|
||||||
override public function think(){
|
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