Esempio n. 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;
    }
Esempio n. 2
0
 // construct a new sprite with the spine skeleton name
 public GSpineSprite(string name)
 {
     if (GSpineManager.DoesContainSkeleton(name))
     {
         BuildSkeleton(GSpineManager.GetSkeletonByName(name));
     }
     else
     {
         Debug.Log("Skeleton " + name + " is not loaded");
     }
 }
    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");
    }
Esempio n. 4
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);


        GSpineManager.LoadSpineBySkel("990001", "spine/990001/990001.skel.bytes", "spine/990001/990001.atlas");
        sprite = new GSpineSprite("990001");
        Futile.stage.AddChild(sprite);
        sprite.SetPosition((Futile.screen.halfWidth * 0.25f), -(Futile.screen.halfHeight * 0.5f));
        sprite.scale = 0.5f;
    }
    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);
    }