diff --git a/Assets/ManagedResources/~Lua/Modules/Fight/View/FightPointMapOnHook.lua b/Assets/ManagedResources/~Lua/Modules/Fight/View/FightPointMapOnHook.lua index f7a4603e65..c333f322b6 100644 --- a/Assets/ManagedResources/~Lua/Modules/Fight/View/FightPointMapOnHook.lua +++ b/Assets/ManagedResources/~Lua/Modules/Fight/View/FightPointMapOnHook.lua @@ -1,6 +1,7 @@ local this = {} local FEAConfig = require("Modules/Battle/Config/FightEffectAudioConfig") +local iconAction = require("Modules/Fight/View/FightMapIconShowView") local Bezier = require("Base.Bezier") local roleLiveGoLeft = {} --左方父节点 @@ -884,7 +885,8 @@ function this:randDeadTimes() end function this:randDmg() - return math.random(100, 2000) + local dmg = math.random(100, 2000) + return dmg end function this:randbCrit() @@ -1259,8 +1261,7 @@ function this:ArtFloating(type, color, value, livego, targetIndex) -- v:GetComponent("RectTransform").anchoredPosition = pt -- end -- end - - local text = self:GetArtText(type, color, value) + --local text = self:GetArtText(type, color, value) local colorArray = { [1] = "anim_Red", [2] = "anim_White", [3] = "anim_Yellow", [4] = "anim_Green" } for i = 1, #colorArray do @@ -1273,10 +1274,18 @@ function this:ArtFloating(type, color, value, livego, targetIndex) LogError("roleview color error!") return end - local anim = Util.GetGameObject(go, colorArray[color + 1]) + + Util.GetGameObject(go, "anim/Image"):SetActive(false) + local dmg = this.randDmg() + Util.GetGameObject(go, "anim/anim"):GetComponent("Text").text = iconAction.DecodeHurt(dmg, dmg > 1000, 0) + go:SetActive(true) + + --local anim = Util.GetGameObject(go, colorArray[color + 1]) + --[[ + local anim = Util.GetGameObject(go, "anim1") if anim then anim:SetActive(true) - --[[ + if color + 1 == 1 then anim:GetComponent("Text").font = poolManager:LoadAsset(GetPictureFont("x1_fnt_battle_rad") .. "_cfont", PoolManager.AssetType.Other) @@ -1287,12 +1296,14 @@ function this:ArtFloating(type, color, value, livego, targetIndex) anim:GetComponent("Text").font = poolManager:LoadAsset(GetPictureFont("X1_battle_font_yellow") .. "_cfont", PoolManager.AssetType.Other) end - ]] + -- local anim = Util.GetGameObject(go, "anim") anim:GetComponent("Text").text = text anim:GetComponent("Canvas").sortingOrder = m_parent.sortingOrder + 15 anim:GetComponent("Animator"):Play(ArtFloatingAnim[type]) end + --]] + self:AddDelayRecycleRes(floatingEffect, go, 2) end