Hi, Im making a game in openfl and everything is fine,
but now Im implemening a server. And I Have classes like player, board, cards etc etc… all using openfl.
What I want is to make server use this classes, but pure haxe don’t know a thing about openfl:
haxe -neko server.n -main Server
Board.hx:5: characters 7-28 : Type not found : openfl.display.Sprite
Server.hx:14: lines 14-63 : Defined in this class
Player.hx:4: characters 7-28 : Type not found : openfl.display.Bitmap
Server.hx:14: lines 14-63 : Defined in this class
so I think maby i could first implement those classes without openfl and then use them im openfl…but in haxe I can’t extend from many classes so if I make for example class Board, I can’t make class BoardDisplay that will extend from Board and Sprite.
Do I have to separate it to two different classes one for display second for logic? It’s make less sence im my case. Is there any other way?
any better way to aproach this? like skip openfl stuff in server class and use them in openfl game?
I’m aware of “#if debug” stuff … maby there is a way to separate it like this:
Class Board #if openfl extends Sprite {
just guessing…
please help