ShaoNv
parent
b26838cd38
commit
24acdc63bd
|
@ -1,6 +1,7 @@
|
||||||
local this = {}
|
local this = {}
|
||||||
|
|
||||||
local FEAConfig = require("Modules/Battle/Config/FightEffectAudioConfig")
|
local FEAConfig = require("Modules/Battle/Config/FightEffectAudioConfig")
|
||||||
|
local iconAction = require("Modules/Fight/View/FightMapIconShowView")
|
||||||
local Bezier = require("Base.Bezier")
|
local Bezier = require("Base.Bezier")
|
||||||
|
|
||||||
local roleLiveGoLeft = {} --左方父节点
|
local roleLiveGoLeft = {} --左方父节点
|
||||||
|
@ -884,7 +885,8 @@ function this:randDeadTimes()
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:randDmg()
|
function this:randDmg()
|
||||||
return math.random(100, 2000)
|
local dmg = math.random(100, 2000)
|
||||||
|
return dmg
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:randbCrit()
|
function this:randbCrit()
|
||||||
|
@ -1259,8 +1261,7 @@ function this:ArtFloating(type, color, value, livego, targetIndex)
|
||||||
-- v:GetComponent("RectTransform").anchoredPosition = pt
|
-- v:GetComponent("RectTransform").anchoredPosition = pt
|
||||||
-- end
|
-- end
|
||||||
-- 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" }
|
local colorArray = { [1] = "anim_Red", [2] = "anim_White", [3] = "anim_Yellow", [4] = "anim_Green" }
|
||||||
for i = 1, #colorArray do
|
for i = 1, #colorArray do
|
||||||
|
@ -1273,10 +1274,18 @@ function this:ArtFloating(type, color, value, livego, targetIndex)
|
||||||
LogError("roleview color error!")
|
LogError("roleview color error!")
|
||||||
return
|
return
|
||||||
end
|
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
|
if anim then
|
||||||
anim:SetActive(true)
|
anim:SetActive(true)
|
||||||
--[[
|
|
||||||
if color + 1 == 1 then
|
if color + 1 == 1 then
|
||||||
anim:GetComponent("Text").font = poolManager:LoadAsset(GetPictureFont("x1_fnt_battle_rad") .. "_cfont",
|
anim:GetComponent("Text").font = poolManager:LoadAsset(GetPictureFont("x1_fnt_battle_rad") .. "_cfont",
|
||||||
PoolManager.AssetType.Other)
|
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",
|
anim:GetComponent("Text").font = poolManager:LoadAsset(GetPictureFont("X1_battle_font_yellow") .. "_cfont",
|
||||||
PoolManager.AssetType.Other)
|
PoolManager.AssetType.Other)
|
||||||
end
|
end
|
||||||
]]
|
|
||||||
-- local anim = Util.GetGameObject(go, "anim")
|
-- local anim = Util.GetGameObject(go, "anim")
|
||||||
anim:GetComponent("Text").text = text
|
anim:GetComponent("Text").text = text
|
||||||
anim:GetComponent("Canvas").sortingOrder = m_parent.sortingOrder + 15
|
anim:GetComponent("Canvas").sortingOrder = m_parent.sortingOrder + 15
|
||||||
anim:GetComponent("Animator"):Play(ArtFloatingAnim[type])
|
anim:GetComponent("Animator"):Play(ArtFloatingAnim[type])
|
||||||
end
|
end
|
||||||
|
--]]
|
||||||
|
|
||||||
self:AddDelayRecycleRes(floatingEffect, go, 2)
|
self:AddDelayRecycleRes(floatingEffect, go, 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue