[战斗]====================放逐添加表现

dev_chengFeng
wangzhenxing 2021-03-27 20:22:14 +08:00
parent 4be640d489
commit f497a63e73
4 changed files with 34 additions and 11 deletions

View File

@ -11,12 +11,10 @@ end
--初始化后调用一次
function Exile:OnStart()
self.target.isExile = true
self.ownPassiveList = self.target.passiveList
self.target.passiveList=nil
if self.caster.exileTargets then
table.insert(self.caster.exileTargets,self.target)
end
-- self.target.Event:SetIsTrigger(false)
self.target.Event:DispatchEvent(BattleEventName.RoleBeExile, self)
end
--间隔N帧触发返回true时表示继续触发返回false立刻触发OnEnd
@ -26,14 +24,12 @@ end
--效果结束时调用一次
function Exile:OnEnd()
LogError("放逐结束")
self.target.isExile = false
--self.target.Event:SetIsTrigger(true)
self.target.Event:DispatchEvent(BattleEventName.RoleExileEnd, self)
end
--只有当cover字段为true时触发返回true则被新效果覆盖
function Exile:OnCover(newBuff)
return true
end

View File

@ -164,6 +164,8 @@ BattleEventName = {
RecordBuff = indexAdd(), -- buff
RecordSecKill = indexAdd(), -- 斩杀
DisposeRoleCtrl_noheal = indexAdd(),--处理角色禁疗
RoleBeExile = indexAdd(),--角色被放逐
RoleExileEnd = indexAdd(),--角色放逐结束
}
BattleMaxFrame = 1000000

View File

@ -133,7 +133,8 @@ function EnemyView:onCreate(go, role, position, root)
role.Event:AddEvent(BattleEventName.BeSeckill, self.onBeSecKill, self)
role.Event:AddEvent(BattleEventName.ShildTrigger, self.OnShieldTrigger, self)
role.Event:AddEvent(BattleEventName.ShowHintText,self.OnShowHintText,self)
role.Event:AddEvent(BattleEventName.RoleBeExile,self.OnRoleExile,self)
role.Event:AddEvent(BattleEventName.RoleExileEnd,self.OnRoleExileEnd,self)
if IsOpenBattleDebug then
local URoleProperty = go:GetComponent(typeof(RoleProperty))
@ -146,6 +147,7 @@ function EnemyView:onCreate(go, role, position, root)
self.URoleProperty:AddProperty(name, value)
end)
end
end
--
@ -227,7 +229,16 @@ function EnemyView:Update()
end
end
--角色被放逐
function EnemyView:OnRoleExile(role)
local color = Color.New(1,1,1,0.4)
Util.SetColor(self.RoleLiveGOGraphic, color)
end
--角色放逐结束
function EnemyView:OnRoleExileEnd(role)
local color = Color.New(1, 1, 1, 1)
Util.SetColor(self.RoleLiveGOGraphic, color)
end
-- 缩放
function EnemyView:DoScale(scale, dur, func)
@ -276,7 +287,11 @@ function EnemyView:SetHighLight(isLight, eScale, dur, func)
end
self.hlTween3 = DoTween.To(DG.Tweening.Core.DOGetter_float( function () return sc end),
DG.Tweening.Core.DOSetter_float(function (progress)
local color = Color.New(progress, progress, progress, 1)
local aaa=1
if self.role.isExile then
aaa=0.4
end
local color = Color.New(progress, progress, progress,aaa)
Util.SetColor(self.GameObject, color)
Util.SetColor(self.RoleLiveGOGraphic, color)
end), ec, dur):SetEase(Ease.Linear)

View File

@ -155,7 +155,8 @@ function PlayerView:onCreate(go, role, position, root)
role.Event:AddEvent(BattleEventName.BeSeckill, self.onBeSecKill, self)
role.Event:AddEvent(BattleEventName.ShildTrigger, self.OnShieldTrigger, self)
role.Event:AddEvent(BattleEventName.ShowHintText,self.OnShowHintText,self)
role.Event:AddEvent(BattleEventName.RoleBeExile,self.OnRoleExile,self)
role.Event:AddEvent(BattleEventName.RoleExileEnd,self.OnRoleExileEnd,self)
if IsOpenBattleDebug then
local URoleProperty = go:GetComponent(typeof(RoleProperty))
if not URoleProperty then
@ -270,7 +271,16 @@ function PlayerView:DoScale(scale, dur, func)
end)
end
--角色被放逐
function PlayerView:OnRoleExile(role)
local color = Color.New(1, 1, 1, 0.4)
Util.SetColor(self.liveRender, color)
end
--角色放逐结束
function PlayerView:OnRoleExileEnd(role)
local color = Color.New(1, 1, 1, 1)
Util.SetColor(self.liveRender, color)
end
-- 设置高亮
function PlayerView:SetHighLight(isLight, eScale, dur, func)
-- 设置变灰