52 lines
1.3 KiB
Haxe
52 lines
1.3 KiB
Haxe
package game;
|
|
|
|
import engine.typedefs.CVar;
|
|
import game.entities.Player;
|
|
import openfl.display.Stage;
|
|
import openfl.display.Sprite;
|
|
import openfl.events.Event;
|
|
import assets.Scanner;
|
|
import assets.HTex;
|
|
import engine.ConVar;
|
|
import game.ui.console.Console;
|
|
|
|
class Game
|
|
{
|
|
public var stage:Stage;
|
|
public var gameLayer:Sprite;
|
|
public var uiLayer:Sprite;
|
|
public function new(_stage:Stage){
|
|
stage = _stage;
|
|
/*
|
|
Scanner.scanTextureDir();
|
|
for(tex in Scanner.textures){
|
|
HTex.createTextureObjectFromJSON(tex);
|
|
}
|
|
*/
|
|
gameLayer = new Sprite();
|
|
uiLayer = new Sprite();
|
|
trace("wattafak");
|
|
}
|
|
public var player:Player;
|
|
public var console:Console = new Console();
|
|
public function loadData():Void
|
|
{
|
|
new game.ui.text.TextFormats();
|
|
|
|
}
|
|
public function onInit():Void
|
|
{
|
|
|
|
gameLayer = new Sprite();
|
|
uiLayer = new Sprite();
|
|
stage.addChild(gameLayer);
|
|
stage.addChild(uiLayer);
|
|
uiLayer.addChild(console);
|
|
//var cvar_cl_kankerlow:CVar = ConVar.registerCVar("cl_kankerlow", CInt, 10, FCVAR_ARCHIVE, "is de speler een kankerlow?",null,false,false,0,0,false);
|
|
|
|
}
|
|
public function onEnterFrame(e:Event):Void
|
|
{
|
|
Input.onEnterFrame();
|
|
}
|
|
} |