コード例 #1
0
 public void Clear()
 {
     if (Mine != null)
     {
         Destroy(Mine.gameObject);
         Mine = null;
     }
     MyLinker          = null;
     CurrentPrefabName = basic_animation = string.Empty;
 }
コード例 #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;
        }
    }