Delka

  • 2014年3月10日
  • 2014年3月6日に参加
  • スレッド:Simple how-to question

    Had no a chance to look into it 🙁

    Questions:
    what is best for perfomance if I need to hide some parts of animated skeleton: alpha, remove bitmap or there is more interesting things?

    PS: for editor it will be superrior if there will be a chance to play different animations on the background to emaulate runtime traks feature.

  • スレッド:Simple how-to question

    AAA oooo.

    I hope I will have a chance to fill you with finest beer 🙂

    PS: tomorrow I will find someone in office to pull that Git out. I am too old for all these fancy modern technologies 🙂

  • スレッド:Simple how-to question

    Do you expect ease to use weghts/alpha for tracks in nearest future?

    PS: Be proud - Spine is awesome. We expect to achieve great results using it.

  • スレッド:Simple how-to question

    Thanks!

    Am I right if I say - adding annimations to different tracks means both animations will play simultaneously?
    If yes, are there any option to set weight for a track? For cases when different animations have influence for same bones.

  • スレッド:Simple how-to question
    • 編集済み
  • スレッド:Simple how-to question

    Hi!

    I see I may Mix from one animation to another. I found example in docs:

    Combining animations
    Multiple animations can be applied in sequence to animate parts of the skeleton differently:
    
    Skeleton skeleton = new Skeleton(skeletonData);
    AnimationState state1 = new AnimationState(stateData);
    state1.setAnimation("walk", true);
    AnimationState state2 = new AnimationState(stateData);
    state2.setAnimation("shoot", false);
    ...
    function render (float delta) {
       state1.update(delta);
       state2.update(delta);
       state1.apply(skeleton);
       state2.apply(skeleton);
       skeleton.updateWorldTransform();
       renderSkeleton(skeleton);
    }

    But how can I do it in cocos2d-x??
    I am unable to understand where to find mentioned "apply" and "update"... Looks like documentation are far away from cocos2d-x classes. I was able to play and mix animations this way:

    auto skela = static_cast<spine::SkeletonAnimation*>(&*ii);
    				
    spAnimation* animation = spSkeletonData_findAnimation(skela->skeleton->data, an.c_str() );
    				
    if (animation!=nullptr)
    {
    	spTrackEntry* pres = skela->setAnimation(0, an.c_str(), false);
    
    if (randomize)
    {
        skela->update(rand() % int(pres->endTime * 1000) / 1000.0);
    }
    }
    

    Please assist.