1
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "GameFramework",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"CameraShake",
|
||||
"Unity.Addressables",
|
||||
"Unity.ResourceManager",
|
||||
"Unity.TextMeshPro",
|
||||
"UnityEngine.UI",
|
||||
"Unity.InputSystem",
|
||||
"Unity.VisualScripting.Core",
|
||||
"Unity.RenderPipelines.Universal.Runtime"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": true,
|
||||
"overrideReferences": true,
|
||||
"precompiledReferences": [
|
||||
"Newtonsoft.Json.dll",
|
||||
"DOTween.dll"
|
||||
],
|
||||
"autoReferenced": false,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cccf16d657460e743a3fc8d85e462fc9
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -12,6 +13,9 @@ using UnityEngine;
|
||||
/// </summary>
|
||||
public class BulletPool : Singleton<BulletPool>
|
||||
{
|
||||
/// <summary>子弹回池前的状态重置委托:由热更侧 BullitMove 注入,框架层不反向依赖热更类型</summary>
|
||||
public static Action<GameObject> ResetBulletState;
|
||||
|
||||
// prefab.GetInstanceID() → 该 prefab 的池
|
||||
private Dictionary<int, BulletPoolData> dic = new Dictionary<int, BulletPoolData>();
|
||||
|
||||
@@ -92,9 +96,8 @@ public class BulletPool : Singleton<BulletPool>
|
||||
return;
|
||||
}
|
||||
|
||||
// 重置子弹状态(若有 BullitMove 组件)
|
||||
var bm = obj.GetComponent<BullitMove>();
|
||||
if (bm != null) bm.ResetState();
|
||||
// 重置子弹状态(由热更侧注入:通常是 BullitMove.ResetState)
|
||||
ResetBulletState?.Invoke(obj);
|
||||
|
||||
data.PushObj(obj);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
@@ -58,6 +59,9 @@ public class PoolData
|
||||
|
||||
public class Pool : Singleton<Pool>
|
||||
{
|
||||
/// <summary>鱼 prefab 获取委托:由热更侧 FishResourcesData 初始化时注入,框架层不反向依赖热更类型</summary>
|
||||
public static Func<int, GameObject> GetFishPrefab;
|
||||
|
||||
public Dictionary<int, PoolData> dic = new Dictionary<int, PoolData>();//生成一个字典
|
||||
private GameObject poolObj;//Scene窗口中的“pool”总收纳盒
|
||||
|
||||
@@ -80,12 +84,13 @@ public class Pool : Singleton<Pool>
|
||||
}
|
||||
else
|
||||
{
|
||||
GameObject temp = FishResourcesData.GetFishPrefab(id);
|
||||
//if (rotation == Quaternion.identity)
|
||||
//{
|
||||
// rotation = temp.transform.rotation;
|
||||
//}
|
||||
obj = Object.Instantiate(temp, position, rotation) as GameObject;//没有就读取一个,不用存入字典
|
||||
GameObject temp = GetFishPrefab != null ? GetFishPrefab(id) : null;
|
||||
if (temp == null)
|
||||
{
|
||||
Debug.LogError($"[Pool] 找不到鱼 prefab, fishNumber={id}");
|
||||
return null;
|
||||
}
|
||||
obj = GameObject.Instantiate(temp, position, rotation) as GameObject;//没有就读取一个,不用存入字典
|
||||
obj.name = id.ToString();
|
||||
}
|
||||
return obj;
|
||||
@@ -103,19 +108,14 @@ public class Pool : Singleton<Pool>
|
||||
}
|
||||
else
|
||||
{
|
||||
//GameObject temp = FishResourcesData.GetFishPrefab(id);
|
||||
//if (rotation == Quaternion.identity)
|
||||
//{
|
||||
// rotation = temp.transform.rotation;
|
||||
//}
|
||||
var prefab = FishResourcesData.GetFishPrefab(id);
|
||||
var prefab = GetFishPrefab != null ? GetFishPrefab(id) : null;
|
||||
if (prefab == null)
|
||||
{
|
||||
Debug.LogError($"[Pool] 找不到鱼 prefab, fishNumber={id}");
|
||||
return null;
|
||||
}
|
||||
// ⭐ 无位置实例化(保留预制体自带的位置/深度),再只覆盖 x/y,z 用预制体自带的
|
||||
obj = Object.Instantiate(prefab, parent) as GameObject;//没有就读取一个,不用存入字典
|
||||
obj = GameObject.Instantiate(prefab, parent) as GameObject;//没有就读取一个,不用存入字典
|
||||
obj.transform.rotation = rotation;
|
||||
obj.transform.position = new Vector3(position.x, position.y, obj.transform.position.z);
|
||||
obj.SetActive(true);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"name": "Game.Hotfix.Editor.StaticTool",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GameFramework",
|
||||
"Game.Hotfix",
|
||||
"CameraShake",
|
||||
"spine-unity",
|
||||
|
||||
+1
@@ -2,6 +2,7 @@
|
||||
"name": "Game.Hotfix.Editor.AnimMapBaker",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GameFramework",
|
||||
"Game.Hotfix",
|
||||
"CameraShake",
|
||||
"spine-unity",
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"name": "Game.Hotfix.Editor.Animation",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GameFramework",
|
||||
"Game.Hotfix",
|
||||
"CameraShake",
|
||||
"spine-unity",
|
||||
|
||||
@@ -14,8 +14,19 @@ public class AudioManager : MonoSingleton<AudioManager>
|
||||
{
|
||||
Dictionary<AudioType,AudioSource> dic_audioList=new Dictionary<AudioType, AudioSource> ();
|
||||
public AudioMixer audioMixer;
|
||||
|
||||
//public AudioMixer mixer;
|
||||
|
||||
// ⭐ 音频资源字典由热更侧 AudioResourcesData 在加载/卸载时写入、重建。
|
||||
// 放在框架层是为了让 AudioManager 不反向依赖热更类型(程序集解耦)。
|
||||
/// <summary>音效ID → AudioClip(默认音频 + 当前玩法音频)</summary>
|
||||
public static Dictionary<int, AudioClip> ClipDic = new Dictionary<int, AudioClip>();
|
||||
/// <summary>音效资源名 → 音效ID(tbaudio.json 映射)</summary>
|
||||
public static Dictionary<string, int> NameToIdDic = new Dictionary<string, int>();
|
||||
|
||||
/// <summary>该音效ID是否已有对应 AudioClip</summary>
|
||||
public bool HasClip(int audioID)
|
||||
{
|
||||
return ClipDic != null && ClipDic.ContainsKey(audioID);
|
||||
}
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
@@ -65,10 +76,10 @@ public class AudioManager : MonoSingleton<AudioManager>
|
||||
{
|
||||
if (audioID == 0)
|
||||
return;
|
||||
if (AudioResourcesData.audioClipDic.ContainsKey(audioID))
|
||||
if (ClipDic.ContainsKey(audioID))
|
||||
{
|
||||
|
||||
AudioClip audioClip = AudioResourcesData.audioClipDic[audioID];
|
||||
AudioClip audioClip = ClipDic[audioID];
|
||||
AudioType audioType = AudioType.BG;
|
||||
if (dic_audioList.ContainsKey(audioType))
|
||||
{
|
||||
@@ -98,10 +109,10 @@ public class AudioManager : MonoSingleton<AudioManager>
|
||||
{
|
||||
if (audioID == 0)
|
||||
return;
|
||||
if (AudioResourcesData.audioClipDic.ContainsKey(audioID))
|
||||
if (ClipDic.ContainsKey(audioID))
|
||||
{
|
||||
|
||||
AudioClip audioClip = AudioResourcesData.audioClipDic[audioID];
|
||||
AudioClip audioClip = ClipDic[audioID];
|
||||
AudioType audioType = AudioType.FX;
|
||||
if (dic_audioList.ContainsKey(audioType))
|
||||
{
|
||||
@@ -175,7 +186,7 @@ public class AudioManager : MonoSingleton<AudioManager>
|
||||
public void PlayerFXByName(string audioName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(audioName)) return;
|
||||
if (AudioResourcesData.name_IDDic != null && AudioResourcesData.name_IDDic.TryGetValue(audioName, out int audioID))
|
||||
if (NameToIdDic != null && NameToIdDic.TryGetValue(audioName, out int audioID))
|
||||
{
|
||||
PlayerFX(audioID);
|
||||
}
|
||||
|
||||
+1
@@ -2,6 +2,7 @@
|
||||
"name": "Game.Hotfix.Editor.MissingScript",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GameFramework",
|
||||
"Game.Hotfix",
|
||||
"CameraShake",
|
||||
"spine-unity",
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"name": "Game.Hotfix.Editor.Sprite",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GameFramework",
|
||||
"Game.Hotfix",
|
||||
"CameraShake",
|
||||
"spine-unity",
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"name": "Game.Hotfix.Editor.TextMeshPro",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GameFramework",
|
||||
"Game.Hotfix",
|
||||
"CameraShake",
|
||||
"spine-unity",
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"name": "Game.Hotfix.Editor.UITool",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GameFramework",
|
||||
"Game.Hotfix",
|
||||
"CameraShake",
|
||||
"spine-unity",
|
||||
|
||||
@@ -31,7 +31,7 @@ public class UIClickSound : MonoBehaviour, IPointerClickHandler
|
||||
if (AudioManager.Instance == null) return;
|
||||
|
||||
// 音效尚未加载(如启动早期默认音频未就绪)时静默跳过,避免连点刷错误日志
|
||||
if (AudioResourcesData.audioClipDic == null || !AudioResourcesData.audioClipDic.ContainsKey(clickAudioID))
|
||||
if (!AudioManager.Instance.HasClip(clickAudioID))
|
||||
return;
|
||||
|
||||
AudioManager.Instance.PlayerFX(clickAudioID);
|
||||
|
||||
@@ -90,6 +90,38 @@ public enum UIPanel
|
||||
#endregion
|
||||
}
|
||||
|
||||
// ==================== 热更面板接口 ====================
|
||||
// 框架层(AOT)不能直接引用热更侧的面板类型(Game.Hotfix),否则程序集形成反向依赖。
|
||||
// 这里用接口把"框架需要调用的那几个面板能力"抽象出来,由热更侧面板类实现。
|
||||
// UIManager 用 GetComponent<接口>() 拿到实例并调用,运行时依旧是同一个组件对象。
|
||||
|
||||
/// <summary>过场/加载面板接口(热更侧 LoadingPanel 实现)</summary>
|
||||
public interface ILoadingPanel
|
||||
{
|
||||
/// <summary>设置并播放过场视频</summary>
|
||||
void PlayVideo(VideoClip clip);
|
||||
/// <summary>设置背景图</summary>
|
||||
void SetBackground(Sprite sprite);
|
||||
/// <summary>注册播放结束回调</summary>
|
||||
void SetOnEnd(Action action);
|
||||
/// <summary>进度值 0~100,100 时播放完并销毁</summary>
|
||||
void LoadBar(int count);
|
||||
}
|
||||
|
||||
/// <summary>提示弹窗接口(热更侧 TiShi 实现)</summary>
|
||||
public interface ITiShi
|
||||
{
|
||||
void Init(string text, Action onConfirmAction, bool showClose);
|
||||
void Init(string text, Action onConfirmAction, Action onClose, bool showClose);
|
||||
}
|
||||
|
||||
/// <summary>奖励弹窗接口(热更侧 HuoDe 实现)。dataList 实际类型为 List<BackPackPropItemData></summary>
|
||||
public interface IHuoDe
|
||||
{
|
||||
void Init(object dataList, Action onCloseAction);
|
||||
void Close();
|
||||
}
|
||||
|
||||
public class UIManager : MonoSingleton<UIManager>
|
||||
{
|
||||
// 已加载的面板实例 主面板列表
|
||||
@@ -170,25 +202,24 @@ public class UIManager : MonoSingleton<UIManager>
|
||||
_loadingShown = true;
|
||||
}
|
||||
|
||||
public LoadingPanel ShowLoadPanel(VideoClip videoClip, Action action=null)
|
||||
public ILoadingPanel ShowLoadPanel(VideoClip videoClip, Action action=null)
|
||||
{
|
||||
ShowAsync(UIPanel.LoginPanel);
|
||||
|
||||
GameObject load = Instantiate(loadPanel, uiRoot);
|
||||
var loadScript = load.GetComponent<LoadingPanel>();
|
||||
var loadScript = load.GetComponent<ILoadingPanel>();
|
||||
load.transform.GetChild(0).gameObject.SetActive(true);
|
||||
loadScript.player.clip = videoClip;
|
||||
loadScript.player.Play();
|
||||
loadScript.actionEnd = action;
|
||||
loadScript.PlayVideo(videoClip);
|
||||
loadScript.SetOnEnd(action);
|
||||
return loadScript;
|
||||
}
|
||||
public LoadingPanel ShowLoadPanel(Sprite sprite, Action action = null)
|
||||
public ILoadingPanel ShowLoadPanel(Sprite sprite, Action action = null)
|
||||
{
|
||||
GameObject load = Instantiate(loadPanel, uiRoot);
|
||||
var loadScript = load.GetComponent<LoadingPanel>();
|
||||
var loadScript = load.GetComponent<ILoadingPanel>();
|
||||
load.transform.GetChild(1).gameObject.SetActive(true);
|
||||
loadScript.image_Bg.sprite = sprite;
|
||||
loadScript.actionEnd = action;
|
||||
loadScript.SetBackground(sprite);
|
||||
loadScript.SetOnEnd(action);
|
||||
return loadScript;
|
||||
|
||||
}
|
||||
@@ -309,9 +340,9 @@ public class UIManager : MonoSingleton<UIManager>
|
||||
/// <summary>
|
||||
/// 显示"恭喜获得"奖励面板(随时访问,类似公告)。10秒未关闭则自动关闭。
|
||||
/// </summary>
|
||||
/// <param name="backPackPropItemDatas">奖励道具数据列表</param>
|
||||
/// <param name="backPackPropItemDatas">奖励道具数据列表(实际类型 List<BackPackPropItemData>,为跨程序集解耦用 object 承载)</param>
|
||||
/// <param name="onCloseAction">关闭面板时回调(处理特殊情况)</param>
|
||||
public void ShowHuoDe(List<BackPackPropItemData> backPackPropItemDatas, Action onCloseAction = null)
|
||||
public void ShowHuoDe(object backPackPropItemDatas, Action onCloseAction = null)
|
||||
{
|
||||
StartCoroutine(IEShowHuoDe(backPackPropItemDatas, onCloseAction));
|
||||
}
|
||||
@@ -330,7 +361,7 @@ public class UIManager : MonoSingleton<UIManager>
|
||||
}
|
||||
var obj = Instantiate(TiShiParefab, uiRoot);
|
||||
obj.transform.SetAsLastSibling();
|
||||
var tishi = obj.GetComponent<TiShi>();
|
||||
var tishi = obj.GetComponent<ITiShi>();
|
||||
if (tishi != null)
|
||||
tishi.Init(text, onConfirmAction, showClose);
|
||||
}
|
||||
@@ -352,11 +383,11 @@ public class UIManager : MonoSingleton<UIManager>
|
||||
}
|
||||
var obj = Instantiate(TiShiParefab, uiRoot);
|
||||
obj.transform.SetAsLastSibling();
|
||||
var tishi = obj.GetComponent<TiShi>();
|
||||
var tishi = obj.GetComponent<ITiShi>();
|
||||
if (tishi != null)
|
||||
tishi.Init(text, onConfirmAction, onClose, showClose);
|
||||
}
|
||||
IEnumerator IEShowHuoDe(List<BackPackPropItemData> backPackPropItemDatas, Action onCloseAction)
|
||||
IEnumerator IEShowHuoDe(object backPackPropItemDatas, Action onCloseAction)
|
||||
{
|
||||
if (HuoDeParefab == null)
|
||||
{
|
||||
@@ -365,7 +396,7 @@ public class UIManager : MonoSingleton<UIManager>
|
||||
}
|
||||
var obj = Instantiate(HuoDeParefab, uiRoot);
|
||||
obj.transform.SetAsLastSibling();
|
||||
var huode = obj.GetComponent<HuoDe>();
|
||||
var huode = obj.GetComponent<IHuoDe>();
|
||||
if (huode != null)
|
||||
huode.Init(backPackPropItemDatas, onCloseAction);
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"name": "Game.Hotfix",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GameFramework",
|
||||
"CameraShake",
|
||||
"spine-unity",
|
||||
"com.Tivadar.Best.WebSockets",
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots: []
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3712bcf2c8e1be048bc5044b53e8b455
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -579,7 +579,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 132536, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22400762, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
@@ -587,11 +587,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22426080, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22426080, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0.78070176
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22426080, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
@@ -599,51 +599,51 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22428984, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22428984, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22428984, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 165.4
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22428984, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 36
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22428984, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 720.3
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22428984, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -18
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22455554, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22455554, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22455554, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 165.4
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22455554, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 36
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22455554, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 885.7
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22455554, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -18
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
@@ -727,147 +727,147 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22468896, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22468896, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22468896, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 165.4
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22468896, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 36
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22468896, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 1216.5
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22468896, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -18
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22485076, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22485076, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22485076, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: -28
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22488670, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22488670, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22488670, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 165.4
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22488670, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 36
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22488670, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 248.09999
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22488670, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -18
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22495692, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22495692, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22495692, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 165.4
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22495692, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 36
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22495692, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 1051.1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22495692, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -18
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224619367409363176, guid: 67117722a812a2e46ab8cb8eafbf5f5e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224619367409363176, guid: 67117722a812a2e46ab8cb8eafbf5f5e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224619367409363176, guid: 67117722a812a2e46ab8cb8eafbf5f5e,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 306.8
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224619367409363176, guid: 67117722a812a2e46ab8cb8eafbf5f5e,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 36
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224619367409363176, guid: 67117722a812a2e46ab8cb8eafbf5f5e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 484.19998
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224619367409363176, guid: 67117722a812a2e46ab8cb8eafbf5f5e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -18
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224856348943071238, guid: 67117722a812a2e46ab8cb8eafbf5f5e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224856348943071238, guid: 67117722a812a2e46ab8cb8eafbf5f5e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224856348943071238, guid: 67117722a812a2e46ab8cb8eafbf5f5e,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 165.4
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224856348943071238, guid: 67117722a812a2e46ab8cb8eafbf5f5e,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 36
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224856348943071238, guid: 67117722a812a2e46ab8cb8eafbf5f5e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 82.7
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 224856348943071238, guid: 67117722a812a2e46ab8cb8eafbf5f5e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -18
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 958269219681220773, guid: 67117722a812a2e46ab8cb8eafbf5f5e,
|
||||
type: 3}
|
||||
|
||||
@@ -142,6 +142,16 @@ public class BullitMove : MonoBehaviour
|
||||
ApplySortOrder();
|
||||
}
|
||||
|
||||
/// <summary>把"回池重置"钩子注入框架层 BulletPool(框架层不能反向引用 BullitMove)</summary>
|
||||
static BullitMove()
|
||||
{
|
||||
BulletPool.ResetBulletState = go =>
|
||||
{
|
||||
var bm = go != null ? go.GetComponent<BullitMove>() : null;
|
||||
if (bm != null) bm.ResetState();
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>对象池回收前调用:重置所有运行时状态,避免复用时残留旧数据</summary>
|
||||
public void ResetState()
|
||||
{
|
||||
|
||||
@@ -588,7 +588,7 @@ public class GameManager : MonoSingleton<GameManager>
|
||||
public Button btn_Skip;
|
||||
public VideoClip startVideoClip;
|
||||
|
||||
IEnumerator yanchi(LoadingPanel loadingPanel)
|
||||
IEnumerator yanchi(ILoadingPanel loadingPanel)
|
||||
{
|
||||
yield return new WaitForSeconds(5);
|
||||
if (btn_Skip != null) btn_Skip.gameObject.SetActive(true);
|
||||
|
||||
@@ -15,8 +15,8 @@ public class AudioResourcesData
|
||||
{
|
||||
public int audioID;
|
||||
public string audioResourcesPath;
|
||||
public static Dictionary<string, int> name_IDDic=new Dictionary<string, int>();
|
||||
public static Dictionary<int, AudioClip> audioClipDic=new Dictionary<int, AudioClip>();
|
||||
// ⭐ 音效字典存放在框架层 AudioManager(框架层不反向依赖 AudioResourcesData):
|
||||
// AudioManager.NameToIdDic = 资源名→ID,AudioManager.ClipDic = ID→AudioClip
|
||||
static Dictionary<int, AudioClip> audioClipDefaultDic=new Dictionary<int, AudioClip>();
|
||||
static Dictionary<int, AudioClip> audioClipGameDic=new Dictionary<int, AudioClip>();
|
||||
const string Audio_AALabel="Audio";
|
||||
@@ -46,24 +46,24 @@ public class AudioResourcesData
|
||||
Debug.Log("加载文件音频ID: " + item.audioID);
|
||||
Debug.Log(item.audioID + "加载文件音频路径: " + item.audioResourcesPath);
|
||||
|
||||
name_IDDic[item.audioResourcesPath]=item.audioID;
|
||||
AudioManager.NameToIdDic[item.audioResourcesPath]=item.audioID;
|
||||
}
|
||||
var keys = new List<string> { Audio_AALabel, "Default" };
|
||||
_defaultAudioHandle = Addressables.LoadAssetsAsync<AudioClip>(keys, audio =>
|
||||
{
|
||||
Debug.Log("加载音频: " + audio.name);
|
||||
if (name_IDDic.ContainsKey(audio.name))
|
||||
if (AudioManager.NameToIdDic.ContainsKey(audio.name))
|
||||
{
|
||||
Debug.Log("加载音频ID: " + name_IDDic[audio.name]);
|
||||
audioClipDefaultDic.Add(name_IDDic[audio.name],audio);
|
||||
Debug.Log("加载音频ID: " + AudioManager.NameToIdDic[audio.name]);
|
||||
audioClipDefaultDic.Add(AudioManager.NameToIdDic[audio.name],audio);
|
||||
}
|
||||
}, MergeMode.Intersection);
|
||||
await _defaultAudioHandle.Task;
|
||||
foreach (var item in audioClipDefaultDic)
|
||||
{
|
||||
audioClipDic.Add(item.Key, item.Value);
|
||||
AudioManager.ClipDic.Add(item.Key, item.Value);
|
||||
}
|
||||
Debug.Log("加载了:"+ audioClipDic.Count);
|
||||
Debug.Log("加载了:"+ AudioManager.ClipDic.Count);
|
||||
}
|
||||
//public static async Task LoadAudioGame()
|
||||
//{
|
||||
@@ -116,9 +116,9 @@ public class AudioResourcesData
|
||||
// 句柄保存到 _gameAudioHandle,离房时 UnLoadAudioGame 真正释放 → 鱼包才能卸载
|
||||
_gameAudioHandle = Addressables.LoadAssetsAsync<AudioClip>(keys, audio =>
|
||||
{
|
||||
if (name_IDDic != null && name_IDDic.ContainsKey(audio.name))
|
||||
if (AudioManager.NameToIdDic != null && AudioManager.NameToIdDic.ContainsKey(audio.name))
|
||||
{
|
||||
audioClipGameDic[name_IDDic[audio.name]] = audio;
|
||||
audioClipGameDic[AudioManager.NameToIdDic[audio.name]] = audio;
|
||||
}
|
||||
}, MergeMode.Intersection);
|
||||
|
||||
@@ -137,17 +137,17 @@ public class AudioResourcesData
|
||||
await _gameAudioHandle.Task;
|
||||
}
|
||||
|
||||
audioClipDic = new Dictionary<int, AudioClip>();
|
||||
AudioManager.ClipDic = new Dictionary<int, AudioClip>();
|
||||
if (audioClipDefaultDic != null)
|
||||
{
|
||||
foreach (var item in audioClipDefaultDic)
|
||||
audioClipDic[item.Key] = item.Value;
|
||||
AudioManager.ClipDic[item.Key] = item.Value;
|
||||
}
|
||||
foreach (var item in audioClipGameDic)
|
||||
{
|
||||
audioClipDic[item.Key] = item.Value;
|
||||
AudioManager.ClipDic[item.Key] = item.Value;
|
||||
}
|
||||
Debug.Log("加载音频数量: " + audioClipDic.Count);
|
||||
Debug.Log("加载音频数量: " + AudioManager.ClipDic.Count);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -166,9 +166,9 @@ public class AudioResourcesData
|
||||
audioClipGameDic.Clear();
|
||||
|
||||
// 重建总字典:只保留默认音频
|
||||
audioClipDic = new Dictionary<int, AudioClip>(audioClipDefaultDic);
|
||||
AudioManager.ClipDic = new Dictionary<int, AudioClip>(audioClipDefaultDic);
|
||||
|
||||
Debug.Log("卸载完成,当前音频数量:" + audioClipDic.Count);
|
||||
Debug.Log("卸载完成,当前音频数量:" + AudioManager.ClipDic.Count);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,8 @@ public class FishResourcesData
|
||||
private static Dictionary<string,int> FishResourcesSpriteDic;//Spritepath--id
|
||||
static FishResourcesData()
|
||||
{
|
||||
// ⭐ 把鱼 prefab 获取钩子注入框架层对象池(框架层不能反向引用 FishResourcesData)
|
||||
Pool.GetFishPrefab = GetFishPrefab;
|
||||
Init();
|
||||
}
|
||||
async static void Init()
|
||||
|
||||
@@ -240,7 +240,7 @@ RectTransform:
|
||||
m_GameObject: {fileID: 8222732459988217625}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.6, y: 0.6, z: 0.6}
|
||||
m_LocalScale: {x: 0.4, y: 0.4, z: 0.4}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children:
|
||||
- {fileID: 3252193072664515267}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"name": "Game.Hotfix.Editor.JiXieXie",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GameFramework",
|
||||
"Game.Hotfix",
|
||||
"CameraShake",
|
||||
"spine-unity",
|
||||
|
||||
+1
@@ -2,6 +2,7 @@
|
||||
"name": "Game.Hotfix.Editor.LieYanFengBao",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GameFramework",
|
||||
"Game.Hotfix",
|
||||
"CameraShake",
|
||||
"spine-unity",
|
||||
|
||||
@@ -7,7 +7,7 @@ using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class HuoDe : MonoBehaviour
|
||||
public class HuoDe : MonoBehaviour, IHuoDe
|
||||
{
|
||||
public Button btn_Close;
|
||||
public BackPackPropItem backPackPropItemPrefab;
|
||||
@@ -45,11 +45,12 @@ public class HuoDe : MonoBehaviour
|
||||
/// 按奖励数据列表克隆预制体并初始化,并播放出现动画→待机循环。
|
||||
/// 道具在出现动画播放 showPropsDelay 秒后才显示,避免 spine 停滞。
|
||||
/// </summary>
|
||||
/// <param name="dataList">奖励道具数据列表</param>
|
||||
/// <param name="dataList">奖励道具数据列表(实际类型 List<BackPackPropItemData>,框架层用 object 承载以解耦程序集)</param>
|
||||
/// <param name="onCloseAction">关闭面板时回调(处理特殊情况)</param>
|
||||
public void Init(List<BackPackPropItemData> dataList, Action onCloseAction = null)
|
||||
public void Init(object dataList, Action onCloseAction = null)
|
||||
{
|
||||
action = onCloseAction;
|
||||
var typedList = dataList as List<BackPackPropItemData>;
|
||||
|
||||
// 清空旧列表
|
||||
if (backPackPropItemParent != null)
|
||||
@@ -63,7 +64,7 @@ public class HuoDe : MonoBehaviour
|
||||
backPackPropItemParent.gameObject.SetActive(false);
|
||||
|
||||
PlayAppearThenLoop();
|
||||
StartCoroutine(IEShowPropsAfterDelay(dataList));
|
||||
StartCoroutine(IEShowPropsAfterDelay(typedList));
|
||||
}
|
||||
|
||||
private IEnumerator IEShowPropsAfterDelay(List<BackPackPropItemData> dataList)
|
||||
|
||||
@@ -6,13 +6,32 @@ using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.Video;
|
||||
|
||||
public class LoadingPanel : MonoBehaviour
|
||||
public class LoadingPanel : MonoBehaviour, ILoadingPanel
|
||||
{
|
||||
public VideoPlayer player;
|
||||
public Image image_Bg;
|
||||
public Action actionEnd;
|
||||
public float fadeTime = 1.3f;
|
||||
|
||||
/// <summary>设置并播放过场视频</summary>
|
||||
public void PlayVideo(VideoClip clip)
|
||||
{
|
||||
player.clip = clip;
|
||||
player.Play();
|
||||
}
|
||||
|
||||
/// <summary>设置背景图</summary>
|
||||
public void SetBackground(Sprite sprite)
|
||||
{
|
||||
image_Bg.sprite = sprite;
|
||||
}
|
||||
|
||||
/// <summary>注册播放结束回调</summary>
|
||||
public void SetOnEnd(Action action)
|
||||
{
|
||||
actionEnd = action;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// ⭐ 视频播放期间预载大厅主面板:把 HomeUIRes 的加载提前到这段视频等待时间里,
|
||||
|
||||
@@ -4,7 +4,7 @@ using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class TiShi : MonoBehaviour
|
||||
public class TiShi : MonoBehaviour, ITiShi
|
||||
{
|
||||
public Button btn_Close;
|
||||
public Button btn_QueRen;
|
||||
|
||||
Reference in New Issue
Block a user