Exemplo n.º 1
0
    private void preloadSpine(FileInfo spineZipInfo)
    {
        string spineName = spineZipInfo.Name.Replace(spineZipInfo.Extension, "");

        SkeletonAnim                  = SpineZipReader.CreateSkeAnimFromZip(spineZipInfo.FullName);
        SkeletonAnim.name             = spineName;
        SkeletonAnim.transform.parent = LoadedRoot;
        LoadedSpines.Add(spineName, SkeletonAnim);
    }
Exemplo n.º 2
0
    public void ReloadSpineSync(string spineName, string fullZipPath)
    {
        if (CurSpineName == spineName)
        {
            return;
        }

        if (SkeletonAnim)
        {
            Destroy(SkeletonAnim.gameObject);
        }

        SkeletonAnim                  = SpineZipReader.CreateSkeAnimFromZip(fullZipPath);
        SkeletonAnim.name             = spineName;
        SkeletonAnim.loop             = true;
        SkeletonAnim.transform.parent = SpineRoot;
        SkeletonAnim.AnimationName    = ToolManager.Instance.DefaultAnim;
    }
Exemplo n.º 3
0
    public void ReloadSpine(string curSpineName, string fullZipPath)
    {
        if (SkeletonAnim)
        {
            Destroy(SkeletonAnim.gameObject);
        }

        foreach (Transform child in SpineRoot.transform)
        {
            Destroy(child.gameObject);
        }

        CurSpineName                  = curSpineName;
        SkeletonAnim                  = SpineZipReader.CreateSkeAnimFromZip(fullZipPath);
        SkeletonAnim.name             = curSpineName;
        SkeletonAnim.loop             = true;
        SkeletonAnim.transform.parent = SpineRoot;
        SkeletonAnim.AnimationName    = ToolManager.Instance.DefaultAnim;
    }
Exemplo n.º 4
0
 void testLoad()
 {
     SkeletonAnim = SpineZipReader.CreateSkeAnimFromZip(@"E:\proj\ProjectS\ProjectS\client\trunk\projects\res\spine\spine001.zip");
 }