24 lines
533 B
C#
24 lines
533 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using BITKit.Sensors;
|
|
using NodeCanvas.Framework;
|
|
using UnityEngine;
|
|
namespace BITKit.NodeCanvas
|
|
{
|
|
/// <summary>
|
|
/// 智能目标检测,包括了以下行为:
|
|
/// <para>监测目标集群</para>
|
|
/// </summary>
|
|
public class SmartTargetDetectionNode : ActionTask
|
|
{
|
|
public BBParameter<SmartTargetSensor> sensor;
|
|
public BBParameter<Transform> target;
|
|
protected override void OnExecute()
|
|
{
|
|
target.SetValue(sensor.value.CurrentTarget);
|
|
EndAction();
|
|
}
|
|
}
|
|
}
|
|
|