private EnumPlayError Load() { if (!File.Exists(path)) { return(EnumPlayError.FileDontExits); } if (!path.EndsWith(RecordFileSuffix)) { return(EnumPlayError.FileTypeError); } try { var stream = File.OpenRead(path); stream.Seek(0, SeekOrigin.Begin); string time; stream.Read(out time); string t; stream.Read(out t); var dataType = Type.GetType(t); GameRecordDataHandle = GameRecorder.CreateRecodeData(dataType); GameRecordDataHandle?.Load(stream); stream.Close(); } catch (Exception e) { Logger.LogError(e.ToString()); } if (GameRecordDataHandle?.CommandsCount == 0) { return(EnumPlayError.FileContentError); } return(EnumPlayError.None); }
public bool InstanceHandle <T>() where T : IGameRecordData { GameRecordDataHandle = CreateRecodeData <T>(); return(GameRecordDataHandle != null); }
public LoadParamRecoverTeam(IGameRecordData rData) { data = rData as GameRecordDataTeam; }