Quantcast
Channel: MarsHut
Viewing all articles
Browse latest Browse all 6551

Adding behavior to as3 components with haxe 3

$
0
0
Hi all,

I have developed a flash game with an old version of haxe (2.08). My game
assets are composed of bones which are customized in game by players
(custom colors, custom equipments), for my assets i'm using this workflow :

1) assets are dispatched in several swf files and unified in one big file
assets.swf using swfmill. Assets are created and exported by designers, as3
classes have no logic.
2) the assets.swf is staticaly linked to my main program using -swf-lib
parameter.
3) a python script generates all as3 classes exported in assets.swf (using
haxe --gen-hx-classes) and add behaviors to them by subclassing a haxe
class. Sample of generated class:

class MCPlayerRun extends bones.Animation {

// bones.Animation is a haxe class which contains all code to manage bones,
including custom constructor with color equipment args.

4) i import classes in my main program and create instances of modified
classes to display assets.

I would like to migrate on haxe3 but i'm not sure about my workflow under
haxe3. It seems that as3 classes definition have priority on haxe3 classes
def. Is there a trick (macro ?) to surround this behavior or is my workflow
just "obsolete" ? How would you deal with this use case ?

Thx a lot.

Viewing all articles
Browse latest Browse all 6551

Trending Articles