Пример #1
0
        public bool LoadFromBin()
        {
            var fileName = Preference.SubscriptionsFileName;

            if (File.Exists(fileName) == false)
            {
                return(false);
            }

            using (var reader = new BinaryReader(new FileStream(fileName, FileMode.Open)))
            {
                Items.Clear();

                int count = reader.ReadInt32();
                for (int i = 0; i < count; ++i)
                {
                    string typeName = reader.ReadString();

                    IBinaryIO item = CreateNodeFromTypeName(typeName) as IBinaryIO;
                    item.Load(reader);
                    Items.Add(item as Node);
                }
            }
            return(true);
        }
Пример #2
0
 //データ読み込み
 public void Overrirde(IBinaryIO io)
 {
     if (Buffers.ContainsKey(io.SaveKey))
     {
         BinaryUtil.BinaryRead(Buffers[io.SaveKey], io.OnRead);
     }
     else
     {
         Debug.LogError(string.Format("Not found Save data Key [{0}] ", io.SaveKey));
     }
 }
Пример #3
0
 public EffectIO(IBinaryIO stream)
 {
     this._stream = stream;
 }
Пример #4
0
 public EntityIO(IBinaryIO stream, IRegionEntityFactory factory, bool ScrollAffected)
 {
     this._stream        = stream;
     this.factory        = factory;
     this.ScrollAffected = ScrollAffected;
 }
Пример #5
0
 public ActionIO(IBinaryIO _stream)
 {
     this._stream = _stream;
 }
Пример #6
0
 public NamedVariableIO(IBinaryIO _stream)
 {
     this._stream = _stream;
 }