LoadSpine() public static method

public static LoadSpine ( string name, string jsonPath ) : void
name string
jsonPath string
return void
Example #1
0
    void Start()
    {
        // Setup Futile
        FutileParams fparams = new FutileParams(true, true, true, true);

        fparams.AddResolutionLevel(1024.0f, 1.0f, 1.0f, "");
        fparams.origin = new Vector2(0.5f, 0.5f);
        Futile.instance.Init(fparams);

        // Load the powerup sprite
        GSpineManager.LoadSpine("powerup", "spine/powerup/powerupJson", "spine/powerup/powerupAtlas");
        powerup = new GSpineSprite("powerup");
        Futile.stage.AddChild(powerup);
        powerup.Play("animation");
        powerup.SetPosition((Futile.screen.halfWidth * 0.25f), -(Futile.screen.halfHeight * 0.5f));
        _activeSprite = powerup;

        // load the goblin sprite
        GSpineManager.LoadSpine("goblin", "spine/goblin/goblinJson", "spine/goblin/goblinAtlas");
        goblin = new GSpineSprite("goblin");
        Futile.stage.AddChild(goblin);
        goblin.SetSkin("goblin");
        goblin.Play("walk");
        goblin.SetPosition((Futile.screen.halfWidth * 0.25f), -(Futile.screen.halfHeight * 0.5f));
        goblin.isVisible = false;

        // load the spineboy sprite
        GSpineManager.LoadSpine("spineboy", "spine/spineboy/spineboyJson", "spine/spineboy/spineboyAtlas");
        spineboy = new GSpineSprite("spineboy");
        Futile.stage.AddChild(spineboy);
        spineboy.SetAnimationMix("jump", "walk", 0.4f);
        spineboy.Play("walk");
        spineboy.SetPosition((Futile.screen.halfWidth * 0.25f), -(Futile.screen.halfHeight * 0.5f));
        spineboy.isVisible = false;
    }
    void Start()
    {
        // Setup Futile
        FutileParams fparams = new FutileParams(true, true, true, true);

        fparams.AddResolutionLevel(1024.0f, 1.0f, 1.0f, "");
        fparams.origin = new Vector2(0.5f, 0.5f);
        Futile.instance.Init(fparams);


        GSpineManager.LoadSpine("powerup", "spine/powerup/powerup-spine", "spine/powerup/powerup-atlas");
        sprite = new GSpineSprite("powerup");
        Futile.stage.AddChild(sprite);
        sprite.SetPosition((Futile.screen.halfWidth * 0.25f), -(Futile.screen.halfHeight * 0.5f));
        sprite.Play("animation");
    }
    void Start()
    {
        // Setup Futile
        FutileParams fparams = new FutileParams(true, true, true, true);

        fparams.AddResolutionLevel(1024.0f, 1.0f, 1.0f, "");
        fparams.origin = new Vector2(0.5f, 0.5f);
        Futile.instance.Init(fparams);


        GSpineManager.LoadSpine("spineboy-original", "spine/spineboy-original/spineboy-original-spine", "spine/spineboy-original/spineboy-original-atlas");
        sprite = new GSpineSprite("spineboy-original");
        Futile.stage.AddChild(sprite);
        sprite.SetPosition((Futile.screen.halfWidth * 0.25f), -(Futile.screen.halfHeight * 0.5f));
        sprite.Play("walk");
        sprite.SetAnimationMix("jump", "walk", 0.4f);
    }