コード例 #1
0
        static void AddScript(IDictionary <string, SingleScript> scripts, BinaryReader scriptsData)
        {
            var nameLength = scriptsData.ReadInt32();
            var scriptName = Encoding.UTF8.GetString(scriptsData.ReadBytes(nameLength));

            var scriptLength = scriptsData.ReadInt32();
            var scriptData   = scriptsData.ReadBytes(scriptLength);

            scripts[scriptName] = new SingleScript("scriptName", scriptData);
        }
コード例 #2
0
 public void SetScript(SingleScript script)
 {
     _script       = script;
     _memoryStream = new MemoryStream(script.GetScriptBinary());
     _binaryReader = new BinaryReader(_memoryStream);
 }