Exemplo n.º 1
0
spTrackEntry* SkeletonAnimation::addAnimation (int trackIndex, const std::string& name, bool loop, float delay) {
	spAnimation* animation = spSkeletonData_findAnimation(_skeleton->data, name.c_str());
	if (!animation) {
		log("Spine: Animation not found: %s", name.c_str());
		return 0;
	}
	return spAnimationState_addAnimation(_state, trackIndex, animation, loop, delay);
}
Exemplo n.º 2
0
void ComponentSpine::addAnimation(const graphics::SpineManagerItem * _animation, const int track_index, const bool loop, const float delay)
{
    auto __animation = * const_cast<graphics::SpineManagerItem *>(_animation);

    updateSpine(__animation);

    spAnimationState_addAnimation(animationState, track_index, __animation.getAnimation(), loop, delay);
}
Exemplo n.º 3
0
    spTrackEntry* SpineAnimation::addAnimation(int trackIndex, const char* name, bool loop, float delay)
	{
		spAnimation* animation = spSkeletonData_findAnimation(skeleton->data, name);
        if (!animation) {
            return 0;
        }
        return spAnimationState_addAnimation(state, trackIndex, animation, loop, delay);
	}
bool SpineAnimation::addAnimation(JNIEnv* env, int trackIndex, const char* name, bool loop, float delay) {
	spAnimation* animation = spSkeletonData_findAnimation(skeleton->data, name);
	if (!animation) {
		callback->onError(env, "Animation not found: %s", (char*) name);
		return false;
	}
	else {
		spAnimationState_addAnimation(state, trackIndex, animation, loop, delay);
		return true;
	}
}
Exemplo n.º 5
0
    bool SpineDrawable::addAnimation(int32_t trackIndex, const std::string& animationName, bool loop, float delay)
    {
        spAnimation* animation = spSkeletonData_findAnimation(animationState->data->skeletonData, animationName.c_str());

        if (!animation)
        {
            return false;
        }

        spAnimationState_addAnimation(animationState, trackIndex, animation, loop ? 1 : 0, delay);

        return true;
    }
Exemplo n.º 6
0
void SkeletonAnimationFbo::addAnimation(int trackIndex, const QString& name, bool loop, float delay)
{
    if (!isSkeletonValid()){
        qDebug()<<"SkeletonAnimation::addAnimation Error: Skeleton is not ready";
        return;
    }

    spAnimation* animation = spSkeletonData_findAnimation(mspSkeleton->data, name.toStdString().c_str());
    if (!animation) {
        qDebug()<<"SkeletonAnimation::setAnimation Error: Animation is not found:"<<name;
        return;
    }
    spAnimationState_addAnimation(mspAnimationState, trackIndex, animation, loop, delay);
}