예제 #1
0
    void everyAnimationCompleted(Spine.TrackEntry t)
    {
        if (Mine != null)
        {
            //once ani end
            if (!Mine.loop)
            {
                Mine.skeleton.PoseWithAnimation(basic_animation, 0, true);
                Mine.AnimationName = basic_animation;
                Mine.loop          = true;
                Mine.Reload();
                Mine.state.Complete += everyAnimationCompleted;
            }

            //always call
            if (event_next_call != null)
            {
                event_next_call(this);
                event_next_call = null;
            }
        }
    }
예제 #2
0
    public void Create(string prefabName, string prefabskin, string basic_animation_name, float size)
    {
        Clear();

        CurrentPrefabName = prefabName;
        basic_animation   = basic_animation_name;

        //가장 가까운 링커를 찾는다
        MyLinker = this.GetNearestParent <scSpineRenderStageLinker>();

        //생성
        Mine = MyLinker.Stage.MakeSpineObject(gameObject, prefabName, size);
        if (Mine != null)
        {
            Mine.initialSkinName = prefabskin;
            SetAnimationBasic(basic_animation, true);
            Mine.Reload();
            Mine.state.Complete += everyAnimationCompleted;
        }
    }