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); }
//データ読み込み 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)); } }
public EffectIO(IBinaryIO stream) { this._stream = stream; }
public EntityIO(IBinaryIO stream, IRegionEntityFactory factory, bool ScrollAffected) { this._stream = stream; this.factory = factory; this.ScrollAffected = ScrollAffected; }
public ActionIO(IBinaryIO _stream) { this._stream = _stream; }
public NamedVariableIO(IBinaryIO _stream) { this._stream = _stream; }