IndieGame/client/Assets/ParadoxNotion/NodeCanvas/Tasks/Actions/GameObject/GetGameObjectPosition.cs

26 lines
591 B
C#
Raw Normal View History

2024-10-11 10:12:15 +08:00
using NodeCanvas.Framework;
using ParadoxNotion.Design;
using UnityEngine;
namespace NodeCanvas.Tasks.Actions
{
[System.Obsolete("Use Get Property instead")]
[Category("GameObject")]
public class GetGameObjectPosition : ActionTask<Transform>
{
[BlackboardOnly]
public BBParameter<Vector3> saveAs;
protected override string info {
get { return "Get " + agentInfo + " position as " + saveAs; }
}
protected override void OnExecute() {
saveAs.value = agent.position;
EndAction();
}
}
}