2
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
988 B
C#

using UnityEngine;
namespace Game
{
public class ClipThrowControl : TimelineClipBase
{
private ThrowControlClip _mRealAsset;
private GameEntity target;
public override void OnEnter()
{
target = Util.GetEntity(Owner.skill.ThrowTarget);
if (target == null || !target.hasTimeline)
{
BreakSkill();
return;
}
TimelineManager.Instance.EndSkillTimeline(target);
2 years ago
target.iD.Data.IsFreeControl = false;
Util.AddStaggerBuff(target.ID(), -1f);
}
public override void OnStay()
{
if (!target.hp.IsAlive)
BreakSkill();
}
public override void OnLeave()
{
2 years ago
target.iD.Data.IsFreeControl = true;
Util.AddStaggerBuff(target.ID(), 2f);
}
private void BreakSkill()
{
Owner.timeline.IsEnd = true;
}
}
}