namespace ZGame
{
///
/// 补丁包初始化失败
///
public class InitializeFailedEventArgs : GameEventArgs
{
public static readonly int EventId = typeof(InitializeFailedEventArgs).GetHashCode();
public override int Id => EventId;
}
///
/// 补丁流程步骤改变
///
public class PatchStatesChangeEventArgs : GameEventArgs
{
public static readonly int EventId = typeof(PatchStatesChangeEventArgs).GetHashCode();
public override int Id => EventId;
public string Tips { get; }
public PatchStatesChangeEventArgs(string tips)
{
this.Tips = tips;
}
}
///
/// 发现更新文件
///
public class FoundUpdateFilesEventArgs : GameEventArgs
{
public static readonly int EventId = typeof(FoundUpdateFilesEventArgs).GetHashCode();
public override int Id => EventId;
public int TotalCount { get; }
public long TotalSizeBytes { get; }
public FoundUpdateFilesEventArgs(int totalCount, long totalSizeBytes)
{
this.TotalCount = totalCount;
this.TotalSizeBytes = totalSizeBytes;
}
}
///
/// 下载进度更新
///
public class DownloadProgressUpdateEventArgs : GameEventArgs
{
public static readonly int EventId = typeof(DownloadProgressUpdateEventArgs).GetHashCode();
public override int Id => EventId;
public int TotalDownloadCount { get; }
public int CurrentDownloadCount { get; }
public long TotalDownloadSizeBytes { get; }
public long CurrentDownloadSizeBytes { get; }
public DownloadProgressUpdateEventArgs(int totalDownloadCount, int currentDownloadCount, long totalDownloadSizeBytes, long currentDownloadSizeBytes)
{
this.TotalDownloadCount = totalDownloadCount;
this.CurrentDownloadCount = currentDownloadCount;
this.TotalDownloadSizeBytes = totalDownloadSizeBytes;
this.CurrentDownloadSizeBytes = currentDownloadSizeBytes;
}
}
///
/// 资源版本号更新失败
///
public class PackageVersionUpdateFailedEventArgs : GameEventArgs
{
public static readonly int EventId = typeof(PackageVersionUpdateFailedEventArgs).GetHashCode();
public override int Id => EventId;
}
///
/// 补丁清单更新失败
///
public class PatchManifestUpdateFailedEventArgs : GameEventArgs
{
public static readonly int EventId = typeof(PatchManifestUpdateFailedEventArgs).GetHashCode();
public override int Id => EventId;
}
///
/// 网络文件下载失败
///
public class WebFileDownloadFailedEventArgs : GameEventArgs
{
public static readonly int EventId = typeof(WebFileDownloadFailedEventArgs).GetHashCode();
public override int Id => EventId;
public string FileName { get; }
public string Error { get; }
public WebFileDownloadFailedEventArgs(string fileName, string error)
{
this.FileName = fileName;
this.Error = error;
}
}
///
/// 更新完成
///
public class UpdaterDoneEventArgs : GameEventArgs
{
public static readonly int EventId = typeof(UpdaterDoneEventArgs).GetHashCode();
public override int Id => EventId;
}
}