[战斗]====================放逐添加表现
parent
4be640d489
commit
f497a63e73
|
@ -11,12 +11,10 @@ end
|
||||||
--初始化后调用一次
|
--初始化后调用一次
|
||||||
function Exile:OnStart()
|
function Exile:OnStart()
|
||||||
self.target.isExile = true
|
self.target.isExile = true
|
||||||
self.ownPassiveList = self.target.passiveList
|
|
||||||
self.target.passiveList=nil
|
|
||||||
if self.caster.exileTargets then
|
if self.caster.exileTargets then
|
||||||
table.insert(self.caster.exileTargets,self.target)
|
table.insert(self.caster.exileTargets,self.target)
|
||||||
end
|
end
|
||||||
-- self.target.Event:SetIsTrigger(false)
|
self.target.Event:DispatchEvent(BattleEventName.RoleBeExile, self)
|
||||||
end
|
end
|
||||||
|
|
||||||
--间隔N帧触发,返回true时表示继续触发,返回false立刻触发OnEnd
|
--间隔N帧触发,返回true时表示继续触发,返回false立刻触发OnEnd
|
||||||
|
@ -26,14 +24,12 @@ end
|
||||||
|
|
||||||
--效果结束时调用一次
|
--效果结束时调用一次
|
||||||
function Exile:OnEnd()
|
function Exile:OnEnd()
|
||||||
LogError("放逐结束")
|
|
||||||
self.target.isExile = false
|
self.target.isExile = false
|
||||||
--self.target.Event:SetIsTrigger(true)
|
self.target.Event:DispatchEvent(BattleEventName.RoleExileEnd, self)
|
||||||
end
|
end
|
||||||
|
|
||||||
--只有当cover字段为true时触发,返回true则被新效果覆盖
|
--只有当cover字段为true时触发,返回true则被新效果覆盖
|
||||||
function Exile:OnCover(newBuff)
|
function Exile:OnCover(newBuff)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -164,6 +164,8 @@ BattleEventName = {
|
||||||
RecordBuff = indexAdd(), -- buff
|
RecordBuff = indexAdd(), -- buff
|
||||||
RecordSecKill = indexAdd(), -- 斩杀
|
RecordSecKill = indexAdd(), -- 斩杀
|
||||||
DisposeRoleCtrl_noheal = indexAdd(),--处理角色禁疗
|
DisposeRoleCtrl_noheal = indexAdd(),--处理角色禁疗
|
||||||
|
RoleBeExile = indexAdd(),--角色被放逐
|
||||||
|
RoleExileEnd = indexAdd(),--角色放逐结束
|
||||||
}
|
}
|
||||||
|
|
||||||
BattleMaxFrame = 1000000
|
BattleMaxFrame = 1000000
|
||||||
|
|
|
@ -133,7 +133,8 @@ function EnemyView:onCreate(go, role, position, root)
|
||||||
role.Event:AddEvent(BattleEventName.BeSeckill, self.onBeSecKill, self)
|
role.Event:AddEvent(BattleEventName.BeSeckill, self.onBeSecKill, self)
|
||||||
role.Event:AddEvent(BattleEventName.ShildTrigger, self.OnShieldTrigger, self)
|
role.Event:AddEvent(BattleEventName.ShildTrigger, self.OnShieldTrigger, self)
|
||||||
role.Event:AddEvent(BattleEventName.ShowHintText,self.OnShowHintText,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
|
if IsOpenBattleDebug then
|
||||||
local URoleProperty = go:GetComponent(typeof(RoleProperty))
|
local URoleProperty = go:GetComponent(typeof(RoleProperty))
|
||||||
|
@ -146,6 +147,7 @@ function EnemyView:onCreate(go, role, position, root)
|
||||||
self.URoleProperty:AddProperty(name, value)
|
self.URoleProperty:AddProperty(name, value)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -227,7 +229,16 @@ function EnemyView:Update()
|
||||||
end
|
end
|
||||||
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)
|
function EnemyView:DoScale(scale, dur, func)
|
||||||
|
|
||||||
|
@ -276,7 +287,11 @@ function EnemyView:SetHighLight(isLight, eScale, dur, func)
|
||||||
end
|
end
|
||||||
self.hlTween3 = DoTween.To(DG.Tweening.Core.DOGetter_float( function () return sc end),
|
self.hlTween3 = DoTween.To(DG.Tweening.Core.DOGetter_float( function () return sc end),
|
||||||
DG.Tweening.Core.DOSetter_float(function (progress)
|
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.GameObject, color)
|
||||||
Util.SetColor(self.RoleLiveGOGraphic, color)
|
Util.SetColor(self.RoleLiveGOGraphic, color)
|
||||||
end), ec, dur):SetEase(Ease.Linear)
|
end), ec, dur):SetEase(Ease.Linear)
|
||||||
|
|
|
@ -155,7 +155,8 @@ function PlayerView:onCreate(go, role, position, root)
|
||||||
role.Event:AddEvent(BattleEventName.BeSeckill, self.onBeSecKill, self)
|
role.Event:AddEvent(BattleEventName.BeSeckill, self.onBeSecKill, self)
|
||||||
role.Event:AddEvent(BattleEventName.ShildTrigger, self.OnShieldTrigger, self)
|
role.Event:AddEvent(BattleEventName.ShildTrigger, self.OnShieldTrigger, self)
|
||||||
role.Event:AddEvent(BattleEventName.ShowHintText,self.OnShowHintText,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
|
if IsOpenBattleDebug then
|
||||||
local URoleProperty = go:GetComponent(typeof(RoleProperty))
|
local URoleProperty = go:GetComponent(typeof(RoleProperty))
|
||||||
if not URoleProperty then
|
if not URoleProperty then
|
||||||
|
@ -270,7 +271,16 @@ function PlayerView:DoScale(scale, dur, func)
|
||||||
end)
|
end)
|
||||||
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)
|
function PlayerView:SetHighLight(isLight, eScale, dur, func)
|
||||||
-- 设置变灰
|
-- 设置变灰
|
||||||
|
|
Loading…
Reference in New Issue