Skip to content

Upgrade Guide to v2

loudoweb edited this page Feb 20, 2016 · 9 revisions

Create a Spriter

v1

engine.addEntity('entityName', x,  y);
engine.getEntity('entityName'); 

v2

engine.addSpriter('uniqueId', x,  y);
engine.getSpriter('uniqueId');
//now you can also use a different SCML for each Spriter within the engine
engine.addSpriter('uniqueId', x,  y, scml);

Callback

v1

function myCallback(s:Spriter, entity:String, anim:String):Void

v2

function myCallback(s:Spriter):Void
{
   //now you can get the current entity name and animation name within your Spriter instance.
   s.currentEntityName
   s.currentAnimationName
}