挂机打boss 伤害字显示修改
parent
ed52d28aa0
commit
7f62ec9ca4
|
|
@ -3082,7 +3082,7 @@ rankKingList={ [1] = { bgImage = "r_zjm_paihangbang_banner004_zh", name = "星
|
|||
[35] = { bgImage = "", name = "" ,rankType = RANK_TYPE.GUILD_CAR_DELEAY_SINGLE,activiteId = 0,isRankingMainPanelShow = 4,RankingListMainSortId = 0},
|
||||
[36] = { bgImage = "", name = "" ,rankType = RANK_TYPE.GUILD_CAR_DELEAY_GUILD,activiteId = 0,isRankingMainPanelShow = 4,RankingListMainSortId = 0},
|
||||
[37] = { bgImage = "", name = "探索排行" ,rankType = RANK_TYPE.ExploreRank,activiteId = 0,isRankingMainPanelShow = false},
|
||||
[38] = { bgImage = "r_zjm_paihangbang_banner04_zh", name = Language[12096] ,rankType = RANK_TYPE.FIGHT_LEVEL_RANK,activiteId = 0,isRankingMainPanelShow = 0,RankingListMainSortId = 1},
|
||||
[38] = { bgImage = "r_zjm_paihangbang_banner04_zh", name = Language[12096] ,rankType = RANK_TYPE.FIGHT_LEVEL_RANK,activiteId = 0,isRankingMainPanelShow = 1,RankingListMainSortId = 1},
|
||||
[39] = { bgImage = "", name = "升星排行" ,rankType = RANK_TYPE.UpStar,activiteId = 0,isRankingMainPanelShow = 4,RankingListMainSortId = 0},
|
||||
[40] = { bgImage = "", name = "装备排行" ,rankType = RANK_TYPE.EquipRank,activiteId = 0,isRankingMainPanelShow = 4,RankingListMainSortId = 0},
|
||||
[41] = { bgImage = "", name = "魂印排行" ,rankType = RANK_TYPE.SoulSign,activiteId = 0,isRankingMainPanelShow = 4,RankingListMainSortId = 0},
|
||||
|
|
|
|||
|
|
@ -251,5 +251,46 @@ function FloatNode:ArtFloating(type, color, value,frameColor)
|
|||
end
|
||||
|
||||
|
||||
function FloatNode:ArtFloatingOnHook(type, color, value,frameColor)
|
||||
local go = BattleManager.LoadAsset(floatingEffect)
|
||||
go.transform:SetParent(self.RootPanel.transform)
|
||||
go.transform.localScale = Vector3.one * 0.5
|
||||
go.transform.position = self.GameObject.transform.position
|
||||
go:SetActive(true)
|
||||
|
||||
if Time.realtimeSinceStartup - self.LastFloatingTime < BattleLogic.GameDeltaTime then
|
||||
self.FloatingCount = self.FloatingCount + 1
|
||||
else
|
||||
self.FloatingCount = 0
|
||||
end
|
||||
self.LastFloatingTime = Time.realtimeSinceStartup
|
||||
local v2 = go:GetComponent("RectTransform").anchoredPosition
|
||||
--v2 = v2 + Vector2.New(0, self.owner.role.camp * 100 + 100)
|
||||
--go:GetComponent("RectTransform").anchoredPosition = v2 + Vector2.New(0, 50) * (self.FloatingCount+1)
|
||||
local x = Random.RangeInt(-250,250)
|
||||
local y = Random.RangeInt(150,350)
|
||||
go:GetComponent("RectTransform").anchoredPosition = v2 + Vector2.New(x, y)
|
||||
local sp, text = self:GetArtText(type, color, value)
|
||||
local anim = Util.GetGameObject(go, "anim")
|
||||
-- 伤害文字
|
||||
local img = Util.GetGameObject(anim, "Image"):GetComponent("Image")
|
||||
if sp and sp ~= "" then
|
||||
img.sprite = self.spLoader:LoadSprite(sp)
|
||||
img.gameObject:SetActive(true)
|
||||
else
|
||||
img.gameObject:SetActive(false)
|
||||
end
|
||||
-- 伤害数值
|
||||
local animTxt = Util.GetGameObject(go, "anim/anim")
|
||||
local animTxtC = animTxt:GetComponent("Text")
|
||||
animTxtC.text = text
|
||||
--主要用于给白色字体染色成其他颜色,color 参数只能填白色
|
||||
|
||||
|
||||
-- 层级和动画
|
||||
anim:GetComponent("Canvas").sortingOrder = BattleManager.GetBattleSorting() + 100
|
||||
anim:GetComponent("Animator"):Play(ArtFloatingAnim[type])
|
||||
|
||||
BattleManager.AddDelayRecycleRes(floatingEffect, go, 2)
|
||||
end
|
||||
return FloatNode
|
||||
|
|
@ -11,6 +11,7 @@ local fightLevelConfig = ConfigManager.GetConfig(ConfigName.MainLevelConfig)
|
|||
local fightLevelSetConfig = ConfigManager.GetConfig(ConfigName.MainLevelSettingConfig)
|
||||
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||
local aaa=ConfigManager.GetConfigData(ConfigName.SpecialConfig,180).Value
|
||||
|
||||
local roleConfig=ConfigManager.GetConfig(ConfigName.RoleConfig)
|
||||
local curSoliderStageConfig
|
||||
local cost=string.split(aaa,"#")
|
||||
|
|
@ -57,10 +58,14 @@ local fightAnim = {
|
|||
[4] = "bnoss",
|
||||
[1] = "idle",
|
||||
}
|
||||
-- local mapNpc = "live2d_npc_map"
|
||||
-- local mapNpc2 = "live2d_npc_map_nv"
|
||||
-- local npc
|
||||
|
||||
local heroSpineList={}
|
||||
local timeStamp=4
|
||||
local specialConfig=ConfigManager.GetConfigData(ConfigName.SpecialConfig,179)
|
||||
if specialConfig and specialConfig.Value then
|
||||
timeStamp=tonumber(specialConfig.Value)
|
||||
end
|
||||
|
||||
--初始化组件(用于子类重写)
|
||||
function FightPointPassMainPanel:InitComponent()
|
||||
|
||||
|
|
@ -134,8 +139,8 @@ function FightPointPassMainPanel:InitComponent()
|
|||
|
||||
--this.funcBtnList[16] = invadeMonster.btnRewardOnline
|
||||
--this.funcBtnList[19] = invadeMonster.btnRewrdChapter
|
||||
this.funcBtnList[12] = this.btnDailyMission
|
||||
|
||||
--this.funcBtnList[12] = this.btnDailyMission
|
||||
this.btnDailyMission:SetActive(false)
|
||||
-- 主线任务显示
|
||||
this.mainTask = Util.GetGameObject(self.gameObject, "Bg/RightDown/mainTask")
|
||||
this.goVipButton = Util.GetGameObject(self.gameObject, "Bg/RightDown/mainTask/progressLayout")
|
||||
|
|
@ -549,7 +554,7 @@ function this.ShowBattleInfo()
|
|||
cd=cd+1
|
||||
--每隔三秒攻击一次
|
||||
|
||||
if cd==3 then
|
||||
if cd==timeStamp then
|
||||
--英雄攻击
|
||||
for i=1,6 do
|
||||
if this.heroList[i].spine then
|
||||
|
|
@ -567,7 +572,7 @@ function this.ShowBattleInfo()
|
|||
--LogError("prolist[2]==============="..proList[2])
|
||||
--for i=1,5 do
|
||||
bossHp=bossHp-proList[2]
|
||||
this.Floater:ArtFloating(ArtFloatingType.Damage,ArtFloatingColor.White,proList[2])
|
||||
this.Floater:ArtFloatingOnHook(ArtFloatingType.Damage,ArtFloatingColor.White,proList[2])
|
||||
--end
|
||||
isHit=true
|
||||
if isHit then
|
||||
|
|
@ -599,7 +604,7 @@ function this.ShowBattleInfo()
|
|||
--LogError("aaa.data.attributes[2].value=="..aaa.data.attributes[2].value)
|
||||
local attack=math.floor(aaa.data.attributes[2].value*(1+add))
|
||||
bossHp=bossHp-attack
|
||||
this.Floater:ArtFloating(ArtFloatingType.Damage,ArtFloatingColor.White,attack)
|
||||
this.Floater:ArtFloatingOnHook(ArtFloatingType.Damage,ArtFloatingColor.White,attack)
|
||||
-- end
|
||||
end)
|
||||
--end
|
||||
|
|
@ -640,6 +645,8 @@ function this.ShowBattleInfo()
|
|||
this.bossLiveGO.transform.localScale=Vector3.one * roleConfig[curSoliderStageConfig.Hero].enemy_liveScale*0.5
|
||||
bossSpine=this.bossLiveGO:GetComponent("SkeletonGraphic")
|
||||
end
|
||||
--刷新挂机奖励
|
||||
this.IntiReward()
|
||||
end
|
||||
this.timer:Start()
|
||||
cd=0
|
||||
|
|
@ -986,7 +993,8 @@ function this.BtnsIsOpen()
|
|||
local isOpen = ActTimeCtrlManager.SingleFuncState(i)
|
||||
v:SetActive(isOpen)
|
||||
end
|
||||
this.btnRank.gameObject:SetActive(ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.ALLRANKING))
|
||||
--this.btnRank.gameObject:SetActive(ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.ALLRANKING))
|
||||
this.btnRank.gameObject:SetActive(false)
|
||||
end
|
||||
|
||||
function this.IntiReward()
|
||||
|
|
|
|||
Loading…
Reference in New Issue