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.

42 lines
1.0 KiB
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);
target.timeline.IsRunning = true;
Util.AddStaggerBuff(target.ID(), -1f);
}
public override void OnStay()
{
Util.Print("Throwing target: " + target.ID());
if (!target.hp.IsAlive)
BreakSkill();
}
public override void OnLeave()
{
target.timeline.IsRunning = false;
Util.AddStaggerBuff(target.ID(), 2f);
}
private void BreakSkill()
{
TimelineManager.Instance.EndSkillTimeline(Owner);
}
}
}