コード例 #1
0
    // Token: 0x0600025B RID: 603 RVA: 0x00007C14 File Offset: 0x00006014
    public void SetUpAniAnimation()
    {
        GameObject gameObject = AnmAnimation.CreateGameObject("aniObj", this.aniName, this.aniName);

        gameObject.GetComponent <AnmAnimation>().SetAction(this.act);
        gameObject.transform.SetParent(base.transform, false);
    }
コード例 #2
0
 private static bool Decompile(string file)
 {
     try {
         AnmAnimation anm = AnmAnimation.Extract(file);
         try {
             string outFile = Path.Combine(output, Path.GetFileNameWithoutExtension(file) + extension);
             anm.DecompileToFile(outFile, encoding);
             Console.WriteLine($"  ANM {Path.GetFileName(file)} -> {Path.GetFileName(outFile)}");
             count++;
             return(true);
         } catch (Exception ex) {
             PrintError($"ANM {Path.GetFileName(file)}, {ex.Message}");
             if (errorLevel.Value >= Level.low)
             {
                 return(false);
             }
         }
     } catch { }
     try {
         CstScene cst = CstScene.Extract(file);
         try {
             string outFile = Path.Combine(output, Path.GetFileNameWithoutExtension(file) + extension);
             cst.DecompileToFile(outFile, encoding);
             Console.WriteLine($"  CST {Path.GetFileName(file)} -> {Path.GetFileName(outFile)}");
             count++;
             return(true);
         } catch (Exception ex) {
             PrintError($"CST {Path.GetFileName(file)}, {ex.Message}");
             if (errorLevel.Value >= Level.low)
             {
                 return(false);
             }
         }
     } catch { }
     try {
         FesScreen fes = FesScreen.Extract(file);
         try {
             string outFile = Path.Combine(output, Path.GetFileNameWithoutExtension(file) + extension);
             fes.DecompileToFile(outFile, encoding);
             Console.WriteLine($"  FES {Path.GetFileName(file)} -> {Path.GetFileName(outFile)}");
             count++;
             return(true);
         } catch (Exception ex) {
             PrintError($"FES {Path.GetFileName(file)}, {ex.Message}");
             if (errorLevel.Value >= Level.low)
             {
                 return(false);
             }
         }
     } catch { }
     PrintWarning($"{Path.GetFileName(file)} is not a CaySystem2 script file!");
     return(!(errorLevel.Value >= Level.high));
 }
コード例 #3
0
ファイル: AnmAnimation.cs プロジェクト: lillianwang16/Games
    // Token: 0x06000013 RID: 19 RVA: 0x00002510 File Offset: 0x00000910
    public static GameObject CreateGameObject(string name, string anmPath, string pngPath)
    {
        GameObject gameObject = new GameObject(name);

        gameObject.AddComponent <AnmAnimation>();
        AnmAnimation component = gameObject.GetComponent <AnmAnimation>();

        component.pngName = pngPath;
        component.anmName = anmPath;
        component.UpdateAnmData();
        return(gameObject);
    }
コード例 #4
0
ファイル: CharaTable.cs プロジェクト: lillianwang16/Games
    // Token: 0x06000267 RID: 615 RVA: 0x000086E8 File Offset: 0x00006AE8
    public void CreteCharacter(int charaId, string aniName, Vector3 aniPos, int act, Vector2 hit_size, Vector2 hit_offset)
    {
        if (this.RefChara == null)
        {
            this.RefChara = new List <GameObject>();
        }
        GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.CharaPref);

        gameObject.transform.SetParent(base.transform, false);
        gameObject.GetComponent <CharaObject>().SetChara(charaId);
        GameObject gameObject2 = AnmAnimation.CreateGameObject("aniObj", aniName, aniName);

        gameObject2.GetComponent <AnmAnimation>().SetAction(act);
        gameObject2.transform.SetParent(gameObject.transform, false);
        this.RefChara.Add(gameObject);
        gameObject.transform.localPosition = aniPos;
        if (hit_size != Vector2.zero)
        {
            gameObject.GetComponent <BoxCollider2D>().size = hit_size;
        }
        if (hit_offset != Vector2.zero)
        {
            gameObject.GetComponent <BoxCollider2D>().offset = hit_offset;
        }
        Debug.Log(string.Concat(new object[]
        {
            "[charaTable] キャラクタ生成[",
            this.RefChara.Count,
            "]: Id = ",
            charaId,
            " / name = ",
            aniName,
            " / aniPos = ",
            aniPos,
            " / fixPos(size)(offset) = ",
            hit_size,
            hit_offset
        }));
    }