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

18 lines
524 B

using BehaviorDesigner.Runtime.Tasks;
namespace CoreGame.Render
{
public class MoveTargetAction : Action
{
public override TaskStatus OnUpdate()
{
var ownerEnt = Owner.GetEntity<CombatEntity>();
var ent = ownerEnt.aI.TargetEnt;
if (ent.IsValid() == false)
return TaskStatus.Failure;
ownerEnt.navAgentProxy.SetDestination(ent.transformProxy.position, ent.property.MoveSpeed);
return TaskStatus.Success;
}
}
}