示例#1
0
        public MovesetManager(string mtablePath)
        {
            var directory = Path.GetDirectoryName(mtablePath);

            string[] files = Directory.EnumerateFiles(directory, "*.bin").ToArray();

            if (files.Length == 0)
            {
                return;
            }

            foreach (string file in files)
            {
                var filename = Path.GetFileName(file);

                if (filename == "game.bin")
                {
                    Game   = new ACMDFile(file);
                    Endian = Game.Endian;
                }
                if (filename == "effect.bin")
                {
                    Effect = new ACMDFile(file);
                    Endian = Effect.Endian;
                }
                if (filename == "sound.bin")
                {
                    Sound  = new ACMDFile(file);
                    Endian = Sound.Endian;
                }
                if (filename == "expression.bin")
                {
                    Expression = new ACMDFile(file);
                    Endian     = Expression.Endian;
                }
            }
            if (File.Exists(mtablePath))
            {
                MotionTable = new MTable(mtablePath, Endian);
            }

            ScriptsHashList = new List <uint>();
            if (MotionTable != null)
            {
                ScriptsHashList.AddRange(MotionTable.ToList());
            }
        }