kittykatattack / hexi

Make games the fun way!
MIT License
551 stars 83 forks source link

Pixi objects in Hexi #2

Open sashamirkovic opened 8 years ago

sashamirkovic commented 8 years ago

Hello,

I started using Hexi but I can't find all object Pixi has. How can I add rounded rectangle for example?

Best Regards, Sasha

kittykatattack commented 8 years ago

Hi Sasha,

The global PIXI object is built-in, so you can access any low-level Pixi code through that object, just as if you were using a stand-alone Pixi installation.

sashamirkovic commented 8 years ago

I already use Hexi, let's say I already have my g = hexi. Is it possible to add PIXI objects to g.stage or any other child container of g.stage?

kittykatattack commented 8 years ago

Yes, just add a Pixi objects to Hexi's stage, like this:

g.stage.addChild(anyPixiObject)

The stage is just an ordinary Pixi Container