From 29d396dfa126ec71e193537081dd656a34de5e09 Mon Sep 17 00:00:00 2001 From: "SD-20250424WZPW\\Administrator" Date: Tue, 6 May 2025 14:51:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=9D=E5=A7=8B=E6=8E=A8?= =?UTF-8?q?=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HotFix/GameLogic/Actor/ActorHItem.cs | 101 +----------------- 1 file changed, 5 insertions(+), 96 deletions(-) diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs index 1ddc0161..add2c4fb 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs @@ -32,7 +32,7 @@ namespace GameLogic public int m_Index; private List m_ListUnitPlayDatas = new List(); - private int m_AddPush = 0; // 初始推力值 + private int m_AddPush = 10; // 初始推力值 private long m_AllPush = 0; // 当前总值 private int m_AllAddPush = 0;//永久增加推力值 @@ -74,12 +74,6 @@ 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"); - - //// 播放序列图 - //PlayTextureSequence(textureEntry, 0.05f, true); - // 播放序列图,通过Gpu的形式 LoadTextureMatRes(1); } @@ -167,97 +161,15 @@ namespace GameLogic } + /// + /// 加载动图 + /// + /// private void LoadTextureMatRes(int key) { m_ImgSprite.material = GameModule.Resource.LoadAsset("0" + key); } - ///// - ///// 开始播放 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; - // } - - // m_CurrentTextureEntry = textureEntry; - // m_FrameInterval = interval; - // m_Loop = loop; - // m_CurrentTextureIndex = 0; - // m_TimeSinceLastFrame = 0f; - // m_IsPlaying = true; - - // // 立即显示第一帧 - // UpdateTexture(); - //} - - ///// - ///// 停止播放序列图 - ///// - //public void StopTextureSequence() - //{ - // m_IsPlaying = false; - //} - - ///// - ///// 更新纹理播放逻辑 - ///// - //private void UpdateTextureSequence(float deltaTime) - //{ - // if (!m_IsPlaying || m_CurrentTextureEntry == null || m_CurrentTextureEntry.Textures == null) - // return; - - // // 累加时间 - // m_TimeSinceLastFrame += deltaTime; - - // // 如果时间超过帧间隔,切换到下一帧 - // 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 方法 @@ -266,9 +178,6 @@ namespace GameLogic { base.OnUpdate(); - - //// 更新序列图播放逻辑 - //UpdateTextureSequence(Time.deltaTime); }