-
Notifications
You must be signed in to change notification settings - Fork 3
Sprite Examples
// 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));