diff --git a/UnityProject/Assets/AssetRaw/Audios/01.MP3 b/UnityProject/Assets/AssetRaw/Audios/01.MP3 deleted file mode 100644 index 4be753cd..00000000 Binary files a/UnityProject/Assets/AssetRaw/Audios/01.MP3 and /dev/null differ diff --git a/UnityProject/Assets/AssetRaw/Audios/01.MP3.meta b/UnityProject/Assets/AssetRaw/Audios/01.MP3.meta deleted file mode 100644 index 4fe51064..00000000 --- a/UnityProject/Assets/AssetRaw/Audios/01.MP3.meta +++ /dev/null @@ -1,23 +0,0 @@ -fileFormatVersion: 2 -guid: 8f22f622237b0754fb5631821a00e873 -AudioImporter: - externalObjects: {} - serializedVersion: 7 - defaultSettings: - serializedVersion: 2 - loadType: 0 - sampleRateSetting: 0 - sampleRateOverride: 44100 - compressionFormat: 1 - quality: 1 - conversionMode: 0 - preloadAudioData: 0 - platformSettingOverrides: {} - forceToMono: 0 - normalize: 1 - loadInBackground: 0 - ambisonic: 0 - 3D: 1 - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/AssetRaw/Audios/02.MP3 b/UnityProject/Assets/AssetRaw/Audios/02.MP3 deleted file mode 100644 index 2dee7413..00000000 Binary files a/UnityProject/Assets/AssetRaw/Audios/02.MP3 and /dev/null differ diff --git a/UnityProject/Assets/AssetRaw/Audios/02.MP3.meta b/UnityProject/Assets/AssetRaw/Audios/02.MP3.meta deleted file mode 100644 index 2ab9f2f3..00000000 --- a/UnityProject/Assets/AssetRaw/Audios/02.MP3.meta +++ /dev/null @@ -1,23 +0,0 @@ -fileFormatVersion: 2 -guid: 0fa2bbb05e9eb094b9bd79629e552d6a -AudioImporter: - externalObjects: {} - serializedVersion: 7 - defaultSettings: - serializedVersion: 2 - loadType: 0 - sampleRateSetting: 0 - sampleRateOverride: 44100 - compressionFormat: 1 - quality: 1 - conversionMode: 0 - preloadAudioData: 0 - platformSettingOverrides: {} - forceToMono: 0 - normalize: 1 - loadInBackground: 0 - ambisonic: 0 - 3D: 1 - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/AssetRaw/Audios/03.MP3 b/UnityProject/Assets/AssetRaw/Audios/03.MP3 deleted file mode 100644 index 14d774ee..00000000 Binary files a/UnityProject/Assets/AssetRaw/Audios/03.MP3 and /dev/null differ diff --git a/UnityProject/Assets/AssetRaw/Audios/03.MP3.meta b/UnityProject/Assets/AssetRaw/Audios/03.MP3.meta deleted file mode 100644 index cb22bbe3..00000000 --- a/UnityProject/Assets/AssetRaw/Audios/03.MP3.meta +++ /dev/null @@ -1,23 +0,0 @@ -fileFormatVersion: 2 -guid: 454540f9927cbf84bb8a9936e0dfbfc2 -AudioImporter: - externalObjects: {} - serializedVersion: 7 - defaultSettings: - serializedVersion: 2 - loadType: 0 - sampleRateSetting: 0 - sampleRateOverride: 44100 - compressionFormat: 1 - quality: 1 - conversionMode: 0 - preloadAudioData: 0 - platformSettingOverrides: {} - forceToMono: 0 - normalize: 1 - loadInBackground: 0 - ambisonic: 0 - 3D: 1 - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/AssetRaw/Audios/04.MP3 b/UnityProject/Assets/AssetRaw/Audios/04.MP3 deleted file mode 100644 index 8a11ce6f..00000000 Binary files a/UnityProject/Assets/AssetRaw/Audios/04.MP3 and /dev/null differ diff --git a/UnityProject/Assets/AssetRaw/Audios/04.MP3.meta b/UnityProject/Assets/AssetRaw/Audios/04.MP3.meta deleted file mode 100644 index 038f35e9..00000000 --- a/UnityProject/Assets/AssetRaw/Audios/04.MP3.meta +++ /dev/null @@ -1,23 +0,0 @@ -fileFormatVersion: 2 -guid: a32fe9b6f43c62649b92ca55350d1b20 -AudioImporter: - externalObjects: {} - serializedVersion: 7 - defaultSettings: - serializedVersion: 2 - loadType: 0 - sampleRateSetting: 0 - sampleRateOverride: 44100 - compressionFormat: 1 - quality: 1 - conversionMode: 0 - preloadAudioData: 0 - platformSettingOverrides: {} - forceToMono: 0 - normalize: 1 - loadInBackground: 0 - ambisonic: 0 - 3D: 1 - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/AssetRaw/Audios/05.MP3 b/UnityProject/Assets/AssetRaw/Audios/05.MP3 deleted file mode 100644 index 9fd663ca..00000000 Binary files a/UnityProject/Assets/AssetRaw/Audios/05.MP3 and /dev/null differ diff --git a/UnityProject/Assets/AssetRaw/Audios/05.MP3.meta b/UnityProject/Assets/AssetRaw/Audios/05.MP3.meta deleted file mode 100644 index 06148095..00000000 --- a/UnityProject/Assets/AssetRaw/Audios/05.MP3.meta +++ /dev/null @@ -1,23 +0,0 @@ -fileFormatVersion: 2 -guid: 88f223be6e551b24ab24d23eb6f2742f -AudioImporter: - externalObjects: {} - serializedVersion: 7 - defaultSettings: - serializedVersion: 2 - loadType: 0 - sampleRateSetting: 0 - sampleRateOverride: 44100 - compressionFormat: 1 - quality: 1 - conversionMode: 0 - preloadAudioData: 0 - platformSettingOverrides: {} - forceToMono: 0 - normalize: 1 - loadInBackground: 0 - ambisonic: 0 - 3D: 1 - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/AssetRaw/Audios/06.MP3 b/UnityProject/Assets/AssetRaw/Audios/06.MP3 deleted file mode 100644 index db70fb51..00000000 Binary files a/UnityProject/Assets/AssetRaw/Audios/06.MP3 and /dev/null differ diff --git a/UnityProject/Assets/AssetRaw/Audios/06.MP3.meta b/UnityProject/Assets/AssetRaw/Audios/06.MP3.meta deleted file mode 100644 index 6a722534..00000000 --- a/UnityProject/Assets/AssetRaw/Audios/06.MP3.meta +++ /dev/null @@ -1,23 +0,0 @@ -fileFormatVersion: 2 -guid: 2a34491a3a48aca45822d1ea3798e8bd -AudioImporter: - externalObjects: {} - serializedVersion: 7 - defaultSettings: - serializedVersion: 2 - loadType: 0 - sampleRateSetting: 0 - sampleRateOverride: 44100 - compressionFormat: 1 - quality: 1 - conversionMode: 0 - preloadAudioData: 0 - platformSettingOverrides: {} - forceToMono: 0 - normalize: 1 - loadInBackground: 0 - ambisonic: 0 - 3D: 1 - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/AssetRaw/Scenes/Game.unity b/UnityProject/Assets/AssetRaw/Scenes/Game.unity index 64cde679..144b6581 100644 --- a/UnityProject/Assets/AssetRaw/Scenes/Game.unity +++ b/UnityProject/Assets/AssetRaw/Scenes/Game.unity @@ -947,151 +947,6 @@ MonoBehaviour: mipBias: 0 varianceClampScale: 0.9 contrastAdaptiveSharpening: 0 ---- !u!1 &1152177062 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1152177063} - - component: {fileID: 1152177064} - m_Layer: 0 - m_Name: Textures - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1152177063 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1152177062} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -8141.9385, y: 628.5447, z: -2254.7744} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1152177064 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1152177062} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b06e2edd8d0f23d4181e2f63f3e3e7d4, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Texture2ds: - - Key: 1 - Textures: - - {fileID: 2800000, guid: b29866e3251cc724f89198683783c89b, type: 3} - - {fileID: 2800000, guid: 2b5ea677baca1f246b3e41e9aaf97009, type: 3} - - {fileID: 2800000, guid: 82964507858e96e48af4298aaf2c31d4, type: 3} - - {fileID: 2800000, guid: 3e1f9d697c83a2343b79639ec4096417, type: 3} - - {fileID: 2800000, guid: e1872998896157243a28dc2f64e1b6de, type: 3} - - {fileID: 2800000, guid: 742b6b4d0fe118a42a07d01f724adcd9, type: 3} - - {fileID: 2800000, guid: bd8bd0b7eaca47e498574c027008720c, type: 3} - - {fileID: 2800000, guid: 87987e11ecafe854f9753333dae2bed4, type: 3} - - {fileID: 2800000, guid: b0e29c66064cc2940b9a85cb02cf6637, type: 3} - - {fileID: 2800000, guid: 914fd48802314904dafa0426e58596d6, type: 3} - - {fileID: 2800000, guid: 0bff5d3292dc8a34abbdc238769ac0de, type: 3} - - {fileID: 2800000, guid: de85fb589e580a749b5a157f4b489ba1, type: 3} - - {fileID: 2800000, guid: 537695e4b52a39d4da558987bbeb8fa7, type: 3} - - {fileID: 2800000, guid: ac8c479d73336c54bb29e916c2356bb8, type: 3} - - {fileID: 2800000, guid: 07653aba3898b2748b7dcd2dd9919c7a, type: 3} - - {fileID: 2800000, guid: 372df1b5336aa844aa1f0763aa1b2383, type: 3} - - Key: 2 - Textures: - - {fileID: 2800000, guid: 5efe139d0e5a3e542bbca818b0aab478, type: 3} - - {fileID: 2800000, guid: 82cefe7292bd06548b838b1622bd881e, type: 3} - - {fileID: 2800000, guid: 4ce70b57a3086614fa82a83402a649ab, type: 3} - - {fileID: 2800000, guid: b22b4e595dee97649b60fdf6ba3d24cb, type: 3} - - {fileID: 2800000, guid: 8201d1ba30e9b0c4daa6249a7426a880, type: 3} - - {fileID: 2800000, guid: 253aa7e38951561479a4e9ad13ed15d5, type: 3} - - {fileID: 2800000, guid: 00870be63e80f4a42a15a59076a89718, type: 3} - - {fileID: 2800000, guid: 3c510dc37d90d4c41a92b6b102605496, type: 3} - - {fileID: 2800000, guid: a2d04ffdb8a7e514aa6dec882ffeb6b0, type: 3} - - {fileID: 2800000, guid: b145c63c0552110478791c8a3ccc18e3, type: 3} - - {fileID: 2800000, guid: 957d03c4217688b4095640e7412e2c80, type: 3} - - {fileID: 2800000, guid: 03fe06e6e6d598f49964b7e0e3641683, type: 3} - - {fileID: 2800000, guid: 86349efca7f025740b8a512ac81a52a0, type: 3} - - {fileID: 2800000, guid: 894ac69d786001640b4d34390687d970, type: 3} - - {fileID: 2800000, guid: 9ea8b1e3b06ff3c4a81b6ade5b8faafc, type: 3} - - {fileID: 2800000, guid: 8eef501b50c6b644787560a8ea55918b, type: 3} - - {fileID: 2800000, guid: c0ceb7721ee38884bb91318bf956e2f9, type: 3} - - {fileID: 2800000, guid: ceb3b165989add94aa9caaaa4de4dacc, type: 3} - - Key: 3 - Textures: - - {fileID: 2800000, guid: 747e6f2d3b1afa145bb9542fcf0101db, type: 3} - - {fileID: 2800000, guid: 7d2bc00329fb87e458aed2a4cc708626, type: 3} - - {fileID: 2800000, guid: 7e2e27c6c021c864fb9df9b89512f32e, type: 3} - - {fileID: 2800000, guid: c5caa7cb34a0d734da94f9a26a207903, type: 3} - - {fileID: 2800000, guid: 4a6799b710345de419e5a55a048aed64, type: 3} - - {fileID: 2800000, guid: fc5b2424e17bdcd4aa0b5ed9b5e96038, type: 3} - - {fileID: 2800000, guid: 53c9daf323d1f814b8293ee6e5be1015, type: 3} - - {fileID: 2800000, guid: f434a082bff8a1948a03240d19903f00, type: 3} - - {fileID: 2800000, guid: 4e9583ef86b34b444a9d37b404fb0304, type: 3} - - {fileID: 2800000, guid: 0991f7da97b80884d95b3875a9897bd0, type: 3} - - {fileID: 2800000, guid: fcbe89dc9a7e06d4b84e874844ef7a6a, type: 3} - - {fileID: 2800000, guid: be219f81446431048ba6dbc981dcaeb8, type: 3} - - {fileID: 2800000, guid: 7c2644602574b7241906596ae04708e9, type: 3} - - {fileID: 2800000, guid: cbacecd53a0325f438e9ccf701ae3a36, type: 3} - - {fileID: 2800000, guid: 8a18770f964dd28419a4e3c12a221381, type: 3} - - {fileID: 2800000, guid: 15b93897141548f4abc037beb179c9df, type: 3} - - Key: 4 - Textures: - - {fileID: 2800000, guid: 437a2f40c6e9c4f47a6739d4acff922b, type: 3} - - {fileID: 2800000, guid: 2fa1b1f97a6d8214cb6953a581618a26, type: 3} - - {fileID: 2800000, guid: c13aa23669717374ebc3f9ac3368e089, type: 3} - - {fileID: 2800000, guid: dd055c20f3d4b1b499165879faa8107c, type: 3} - - {fileID: 2800000, guid: 78755a9ba7f9a9849b76441e69e34806, type: 3} - - {fileID: 2800000, guid: c70b6bd33e4d307429940c11db812c63, type: 3} - - {fileID: 2800000, guid: 78a39b6c295a0254a931928281bd7a36, type: 3} - - {fileID: 2800000, guid: f01247a4b725d5b42949404bb638cb72, type: 3} - - {fileID: 2800000, guid: 3f25cd58e633bf24cb3d288c9ec3ffe0, type: 3} - - {fileID: 2800000, guid: 1750e6f3a446b7c489f66c5f6bf7dc79, type: 3} - - {fileID: 2800000, guid: 74777a48035fbf842b900b91779ced20, type: 3} - - {fileID: 2800000, guid: 9b60c634910dfa848abe4f6450c380f6, type: 3} - - {fileID: 2800000, guid: f31b18b1683fefe4d9463bf1b45d6544, type: 3} - - {fileID: 2800000, guid: adf675e2bed79ea4e9e1533c54377301, type: 3} - - {fileID: 2800000, guid: 23f7ce1b4af66b54d9b7394d5a5e0658, type: 3} - - {fileID: 2800000, guid: 22d6bf4268556d147966bf1dfa6291b9, type: 3} - - Key: 5 - Textures: - - {fileID: 2800000, guid: fa0744a66ad93bc428ca61404dcfe421, type: 3} - - {fileID: 2800000, guid: 78f97fd6cdc314645ab79bcc2ada91f8, type: 3} - - {fileID: 2800000, guid: 3d627eac614ba004cb6411209d555bf0, type: 3} - - {fileID: 2800000, guid: ad1b8c1e04391fb4b8044fd585c3334a, type: 3} - - {fileID: 2800000, guid: b707840494fc50f4f8b44d30f278fd2b, type: 3} - - {fileID: 2800000, guid: 38ad48ffafd149d42b262256dee5dd12, type: 3} - - {fileID: 2800000, guid: 6e349e23f145b1641b6197a98e5f08b5, type: 3} - - {fileID: 2800000, guid: d4464e5c99e79e742927ef17b3a6fb70, type: 3} - - {fileID: 2800000, guid: 36c7f85c4f7e0e444893a4091e502c3b, type: 3} - - {fileID: 2800000, guid: c4549d2e86ac3b844b0d865b327b0e14, type: 3} - - {fileID: 2800000, guid: 03d571e9d3526cc49b1db97fe60c4656, type: 3} - - {fileID: 2800000, guid: dd3162f078a3038448c247290c3e87a6, type: 3} - - {fileID: 2800000, guid: b53ca6300df3ddc4d8bf06dd621d7d7b, type: 3} - - {fileID: 2800000, guid: b312763b5b7913843ac78ddd522dc910, type: 3} - - {fileID: 2800000, guid: 4519d7db929abcd448beb4e6a27dea74, type: 3} - - {fileID: 2800000, guid: 7d10def0c2ea89341bdf17a018dfe801, type: 3} - - {fileID: 2800000, guid: 175124e5dd19b1a4b81979e4b8dd9cf6, type: 3} - - {fileID: 2800000, guid: 386464e48cc77cf469d2c78ce2321a4f, type: 3} - - {fileID: 2800000, guid: 0c62bc9571afe534381aa6e37bd7a5e1, type: 3} - - {fileID: 2800000, guid: 4156a10818c7af74c9effcdaf4286273, type: 3} - - {fileID: 2800000, guid: f82b52583bca21542bb986c3592565c3, type: 3} - - {fileID: 2800000, guid: 80c0683957d72b440ae750ac9c3a364a, type: 3} - - {fileID: 2800000, guid: c03c8d36457f5c342ae66b85e5a5fc3a, type: 3} - - {fileID: 2800000, guid: 44af6cae64f98bf42a408d645b8c342f, type: 3} --- !u!1 &1247778323 GameObject: m_ObjectHideFlags: 0 @@ -2235,4 +2090,3 @@ SceneRoots: - {fileID: 1737773174} - {fileID: 139729468} - {fileID: 546399796} - - {fileID: 1152177063} diff --git a/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab b/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab index a4bb8b12..3140adb4 100644 --- a/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab +++ b/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab @@ -557,7 +557,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 0} + m_Material: {fileID: 2100000, guid: 9e94ac6e3aa7e7644b72793b6c2df5e4, type: 2} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} @@ -565,7 +565,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: b29866e3251cc724f89198683783c89b, type: 3} + m_Sprite: {fileID: 0} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs index 8033de4a..1ddc0161 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs @@ -74,11 +74,14 @@ namespace GameLogic m_tmpSign.text = DataGameSceneManager.Instance.m_Strs[i]; m_tmpAllValue.text = m_AllPush.ToString(); - // 根据当前动画Id 获取纹理列表 - TextureEntry textureEntry = DataGameSceneManager.Instance.m_TextureManager.GetTexture("1"); + //// 根据当前动画Id 获取纹理列表 + //TextureEntry textureEntry = DataGameSceneManager.Instance.m_TextureManager.GetTexture("1"); - // 播放序列图 - PlayTextureSequence(textureEntry, 0.05f, true); + //// 播放序列图 + //PlayTextureSequence(textureEntry, 0.05f, true); + + // 播放序列图,通过Gpu的形式 + LoadTextureMatRes(1); } @@ -163,92 +166,98 @@ namespace GameLogic m_rectCar.localPosition = localPosition; } - /// - /// 开始播放 TextureEntry 的序列图 - /// - /// 要播放的 TextureEntry - /// 每帧的时间间隔(秒) - /// 是否循环播放 - public void PlayTextureSequence(TextureEntry textureEntry, float interval, bool loop = true) + + private void LoadTextureMatRes(int key) { - if (textureEntry == null || textureEntry.Textures == null || textureEntry.Textures.Count == 0) - { - Debug.LogWarning("TextureEntry 或其 Textures 列表为空,无法播放序列图。"); - return; - } - - m_CurrentTextureEntry = textureEntry; - m_FrameInterval = interval; - m_Loop = loop; - m_CurrentTextureIndex = 0; - m_TimeSinceLastFrame = 0f; - m_IsPlaying = true; - - // 立即显示第一帧 - UpdateTexture(); + m_ImgSprite.material = GameModule.Resource.LoadAsset("0" + key); } - /// - /// 停止播放序列图 - /// - public void StopTextureSequence() - { - m_IsPlaying = false; - } + ///// + ///// 开始播放 TextureEntry 的序列图 + ///// + ///// 要播放的 TextureEntry + ///// 每帧的时间间隔(秒) + ///// 是否循环播放 + //public void PlayTextureSequence(TextureEntry textureEntry, float interval, bool loop = true) + //{ + // if (textureEntry == null || textureEntry.Textures == null || textureEntry.Textures.Count == 0) + // { + // Debug.LogWarning("TextureEntry 或其 Textures 列表为空,无法播放序列图。"); + // return; + // } - /// - /// 更新纹理播放逻辑 - /// - private void UpdateTextureSequence(float deltaTime) - { - if (!m_IsPlaying || m_CurrentTextureEntry == null || m_CurrentTextureEntry.Textures == null) - return; + // m_CurrentTextureEntry = textureEntry; + // m_FrameInterval = interval; + // m_Loop = loop; + // m_CurrentTextureIndex = 0; + // m_TimeSinceLastFrame = 0f; + // m_IsPlaying = true; - // 累加时间 - m_TimeSinceLastFrame += deltaTime; + // // 立即显示第一帧 + // UpdateTexture(); + //} - // 如果时间超过帧间隔,切换到下一帧 - if (m_TimeSinceLastFrame >= m_FrameInterval) - { - m_TimeSinceLastFrame -= m_FrameInterval; // 重置时间 - m_CurrentTextureIndex++; + ///// + ///// 停止播放序列图 + ///// + //public void StopTextureSequence() + //{ + // m_IsPlaying = false; + //} - // 如果到达末尾 - if (m_CurrentTextureIndex >= m_CurrentTextureEntry.Textures.Count) - { - if (m_Loop) - { - m_CurrentTextureIndex = 0; // 循环播放 - } - else - { - StopTextureSequence(); // 停止播放 - return; - } - } + ///// + ///// 更新纹理播放逻辑 + ///// + //private void UpdateTextureSequence(float deltaTime) + //{ + // if (!m_IsPlaying || m_CurrentTextureEntry == null || m_CurrentTextureEntry.Textures == null) + // return; - // 更新纹理 - UpdateTexture(); - } - } - /// - /// 更新当前显示的纹理 - /// - private void UpdateTexture() - { - if (m_CurrentTextureEntry == null || m_CurrentTextureEntry.Textures == null || m_CurrentTextureIndex >= m_CurrentTextureEntry.Textures.Count) - return; + // // 累加时间 + // m_TimeSinceLastFrame += deltaTime; - Texture2D currentTexture = m_CurrentTextureEntry.Textures[m_CurrentTextureIndex]; - if (currentTexture != null) - { - m_ImgSprite.sprite = Sprite.Create( - currentTexture, - new Rect(0, 0, currentTexture.width, currentTexture.height), - new Vector2(0.5f, 0.5f) - ); - } - } + // // 如果时间超过帧间隔,切换到下一帧 + // if (m_TimeSinceLastFrame >= m_FrameInterval) + // { + // m_TimeSinceLastFrame -= m_FrameInterval; // 重置时间 + // m_CurrentTextureIndex++; + + // // 如果到达末尾 + // if (m_CurrentTextureIndex >= m_CurrentTextureEntry.Textures.Count) + // { + // if (m_Loop) + // { + // m_CurrentTextureIndex = 0; // 循环播放 + // } + // else + // { + // StopTextureSequence(); // 停止播放 + // return; + // } + // } + + // // 更新纹理 + // UpdateTexture(); + // } + //} + ///// + ///// 更新当前显示的纹理 + ///// + //private void UpdateTexture() + //{ + // if (m_CurrentTextureEntry == null || m_CurrentTextureEntry.Textures == null || m_CurrentTextureIndex >= m_CurrentTextureEntry.Textures.Count) + // return; + + // Texture2D currentTexture = m_CurrentTextureEntry.Textures[m_CurrentTextureIndex]; + // if (currentTexture != null) + // { + // m_ImgSprite.sprite = Sprite.Create( + // currentTexture, + // new Rect(0, 0, currentTexture.width, currentTexture.height), + // new Vector2(0.5f, 0.5f) + // ); + // } + //} /// /// Unity 的 Update 方法 @@ -258,8 +267,8 @@ namespace GameLogic base.OnUpdate(); - // 更新序列图播放逻辑 - UpdateTextureSequence(Time.deltaTime); + //// 更新序列图播放逻辑 + //UpdateTextureSequence(Time.deltaTime); } diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs index 52301bf1..0a5c8e88 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs @@ -31,7 +31,7 @@ namespace GameLogic public List m_GiftItemDatas = new List(); public MeshRenderer m_PanelBg; - public TextureManager m_TextureManager; + //public TextureManager m_TextureManager; private int m_UpdateShowEmoTimer = -1; @@ -59,7 +59,7 @@ namespace GameLogic private void FindGameComponent() { m_PanelBg = GameObject.Find("Plane").GetComponent(); - m_TextureManager = GameObject.Find("Textures").GetComponent(); + //m_TextureManager = GameObject.Find("Textures").GetComponent(); } private void InitGameTeam()