BITFALL/Assets/BITKit/UnityPluginsSupport/NodeCanvas/Pathfinding/SetNavMeshAgentOptions.cs

26 lines
607 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using NodeCanvas.Framework;
using ParadoxNotion.Design;
using UnityEngine;
using UnityEngine.AI;
namespace BITKit.NodeCanvas.Pathfinding
{
[Category("Pathfinding")]
public class SetNavMeshAgentOptions : ActionTask<NavMeshAgent>
{
public BBParameter<bool> overrideUpdateRotation = false;
public BBParameter<bool> overrideUpdatePosition = false;
protected override void OnExecute()
{
agent.updateRotation = overrideUpdateRotation.value;
agent.updatePosition = overrideUpdatePosition.value;
EndAction();
}
}
}