Skip to content
TeaAlligator edited this page Sep 4, 2014 · 3 revisions

// to create a texture in the manager TextureManager.getInstance().addTexture("texture_label", new Texture(getResources().openRawResource(R.raw.texture_name_in_file), true));

// to create a simple sprite blueprint in the sprite blueprint provider SpriteBlueprintProvider.GetInstance().AddSimpleSpriteBlueprint("sprite_blueprint_label", new SimpleSpriteBlueprint("texture_label", position, scale));

// to instantiate a sprite from the sprite manager SpriteManager.GetInstance().AddSimpleSprite("sprite_blueprint_label", 0);

// animated sprite blueprint SpriteBlueprintProvider.GetInstance().AddAnimatedSpriteBlueprint(String label, new AnimatedSpriteBlueprint(String textureName, SimpleVector position, float scale, int[] numberOfFramesOnAGivenRow, float secondsWaitingOnFrame, float frameWidthInPixels, float frameHeightInPixels));

Clone this wiki locally