Where to find function which draw all objects on stage??

52 views
Skip to first unread message

Marcin Korba

unread,
Oct 3, 2015, 12:34:28 PM10/3/15
to HaxeFlixel
Hello after taking few steps from tutorial i'am at adding animated character which in my case desirable format is MovieClip, i know it's possible it with using OpenFl but if i use that i will lose HaxeFlixel support which is used to draw anything else, so after thinking i decided to override function which draw elements in screen in order but to my surprise the all draw methods for FlxBasic just increase count of object, i tried to find, thought it should be in FlxG class but the only one which is called is method draw for FlxState which if commented don't draw anything whilst if uncommented draw scene, where again in code this function basically again do nothing so my question where in code the actual screen is being drawn, While many might say just use spritesheets, i might say that the only thing that i might compromise so first generate character with clothes, animation etc. (Of course every time different depends on clothes being worn) and then generate from that spritesheet, but even if i decide to compromise i need to find way to change color of movieClips (or to be precise the last child of movieClip which is rectangle filled with white color).

So anyone can help me with that?

SruloArt

unread,
Oct 3, 2015, 1:47:43 PM10/3/15
to HaxeFlixel
* HaxeFlixel uses a FlxCamera object to draw stuff on screen.

* When you use draw you're actually signaling to the FlxCamera object to draw your object into a BitmapData of a regular Flash Bitmap, which is then rendered on screen at the rate you've set (for Flash and html5 canvas/dom), or to draw it using a Tilesheet solution (on native targets that use the GPU). There's also support for Triangles rendering but that's only on dev.

* A HaxeFlixel FlxSprite object includes a colorTransform method (and also a draw method if we're at it, and that's also relevant to tiles).
Reply all
Reply to author
Forward
0 new messages