update sample

This commit is contained in:
hevinci
2022-11-25 21:40:54 +08:00
parent 82cff36194
commit 5718d57b88
223 changed files with 5950 additions and 2216 deletions
@@ -0,0 +1,119 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UniFramework.Event;
public class BattleEventDefine
{
/// <summary>
/// 分数改变
/// </summary>
public class ScoreChange : IEventMessage
{
public int CurrentScores;
public static void SendEventMessage(int currentScores)
{
var msg = new ScoreChange();
msg.CurrentScores = currentScores;
UniEvent.SendMessage(msg);
}
}
/// <summary>
/// 游戏结束
/// </summary>
public class GameOver : IEventMessage
{
public static void SendEventMessage()
{
var msg = new GameOver();
UniEvent.SendMessage(msg);
}
}
/// <summary>
/// 敌人死亡
/// </summary>
public class EnemyDead : IEventMessage
{
public Vector3 Position;
public Quaternion Rotation;
public static void SendEventMessage(Vector3 position, Quaternion rotation)
{
var msg = new EnemyDead();
msg.Position = position;
msg.Rotation = rotation;
UniEvent.SendMessage(msg);
}
}
/// <summary>
/// 玩家死亡
/// </summary>
public class PlayerDead : IEventMessage
{
public Vector3 Position;
public Quaternion Rotation;
public static void SendEventMessage(Vector3 position, Quaternion rotation)
{
var msg = new PlayerDead();
msg.Position = position;
msg.Rotation = rotation;
UniEvent.SendMessage(msg);
}
}
/// <summary>
/// 小行星爆炸
/// </summary>
public class AsteroidExplosion : IEventMessage
{
public Vector3 Position;
public Quaternion Rotation;
public static void SendEventMessage(Vector3 position, Quaternion rotation)
{
var msg = new AsteroidExplosion();
msg.Position = position;
msg.Rotation = rotation;
UniEvent.SendMessage(msg);
}
}
/// <summary>
/// 敌人发射子弹
/// </summary>
public class EnemyFireBullet : IEventMessage
{
public Vector3 Position;
public Quaternion Rotation;
public static void SendEventMessage(Vector3 position, Quaternion rotation)
{
var msg = new EnemyFireBullet();
msg.Position = position;
msg.Rotation = rotation;
UniEvent.SendMessage(msg);
}
}
/// <summary>
/// 玩家发射子弹
/// </summary>
public class PlayerFireBullet : IEventMessage
{
public Vector3 Position;
public Quaternion Rotation;
public static void SendEventMessage(Vector3 position, Quaternion rotation)
{
var msg = new PlayerFireBullet();
msg.Position = position;
msg.Rotation = rotation;
UniEvent.SendMessage(msg);
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 523858f19dde4204aad79345f342b0ce
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,98 @@
using UniFramework.Event;
public class PatchEventDefine
{
/// <summary>
/// 补丁流程步骤改变
/// </summary>
public class PatchStatesChange : IEventMessage
{
public string Tips;
public static void SendEventMessage(string tips)
{
var msg = new PatchStatesChange();
msg.Tips = tips;
UniEvent.SendMessage(msg);
}
}
/// <summary>
/// 发现更新文件
/// </summary>
public class FoundUpdateFiles : IEventMessage
{
public int TotalCount;
public long TotalSizeBytes;
public static void SendEventMessage(int totalCount, long totalSizeBytes)
{
var msg = new FoundUpdateFiles();
msg.TotalCount = totalCount;
msg.TotalSizeBytes = totalSizeBytes;
UniEvent.SendMessage(msg);
}
}
/// <summary>
/// 下载进度更新
/// </summary>
public class DownloadProgressUpdate : IEventMessage
{
public int TotalDownloadCount;
public int CurrentDownloadCount;
public long TotalDownloadSizeBytes;
public long CurrentDownloadSizeBytes;
public static void SendEventMessage(int totalDownloadCount, int currentDownloadCount, long totalDownloadSizeBytes, long currentDownloadSizeBytes)
{
var msg = new DownloadProgressUpdate();
msg.TotalDownloadCount = totalDownloadCount;
msg.CurrentDownloadCount = currentDownloadCount;
msg.TotalDownloadSizeBytes = totalDownloadSizeBytes;
msg.CurrentDownloadSizeBytes = currentDownloadSizeBytes;
UniEvent.SendMessage(msg);
}
}
/// <summary>
/// 资源版本号更新失败
/// </summary>
public class PackageVersionUpdateFailed : IEventMessage
{
public static void SendEventMessage()
{
var msg = new PackageVersionUpdateFailed();
UniEvent.SendMessage(msg);
}
}
/// <summary>
/// 补丁清单更新失败
/// </summary>
public class PatchManifestUpdateFailed : IEventMessage
{
public static void SendEventMessage()
{
var msg = new PatchManifestUpdateFailed();
UniEvent.SendMessage(msg);
}
}
/// <summary>
/// 网络文件下载失败
/// </summary>
public class WebFileDownloadFailed : IEventMessage
{
public string FileName;
public string Error;
public static void SendEventMessage(string fileName, string error)
{
var msg = new WebFileDownloadFailed();
msg.FileName = fileName;
msg.Error = error;
UniEvent.SendMessage(msg);
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7bb954fb42c50874b8897756e8b5dae5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,22 @@
using UniFramework.Event;
public class SceneEventDefine
{
public class ChangeToHomeScene : IEventMessage
{
public static void SendEventMessage()
{
var msg = new ChangeToHomeScene();
UniEvent.SendMessage(msg);
}
}
public class ChangeToBattleScene : IEventMessage
{
public static void SendEventMessage()
{
var msg = new ChangeToBattleScene();
UniEvent.SendMessage(msg);
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c56a83939686d3a4aa76b7d4ec704889
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,52 @@
using UniFramework.Event;
public class UserEventDefine
{
/// <summary>
/// 用户开始下载网络文件
/// </summary>
public class UserBeginDownloadWebFiles : IEventMessage
{
public static void SendEventMessage()
{
var msg = new UserBeginDownloadWebFiles();
UniEvent.SendMessage(msg);
}
}
/// <summary>
/// 用户尝试再次更新静态版本
/// </summary>
public class UserTryUpdatePackageVersion : IEventMessage
{
public static void SendEventMessage()
{
var msg = new UserTryUpdatePackageVersion();
UniEvent.SendMessage(msg);
}
}
/// <summary>
/// 用户尝试再次更新补丁清单
/// </summary>
public class UserTryUpdatePatchManifest : IEventMessage
{
public static void SendEventMessage()
{
var msg = new UserTryUpdatePatchManifest();
UniEvent.SendMessage(msg);
}
}
/// <summary>
/// 用户尝试再次下载网络文件
/// </summary>
public class UserTryDownloadWebFiles : IEventMessage
{
public static void SendEventMessage()
{
var msg = new UserTryDownloadWebFiles();
UniEvent.SendMessage(msg);
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1bfe7ffc460fb234da96624844ab7e51
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: