[AI] Behavior Actions 시스템 추가
Ultraworked with [Sisyphus](https://github.com/code-yeonggu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using Unity.Behavior;
|
||||
using UnityEngine;
|
||||
using Action = Unity.Behavior.Action;
|
||||
using Unity.Properties;
|
||||
|
||||
[Serializable, GeneratePropertyBag]
|
||||
[NodeDescription(name: "StopMovement", story: "이동 정지", category: "Action", id: "1a0e2eb87421ed94502031790df56f37")]
|
||||
public partial class StopMovementAction : Action
|
||||
{
|
||||
|
||||
protected override Status OnStart()
|
||||
{
|
||||
UnityEngine.AI.NavMeshAgent agent = GameObject.GetComponent<UnityEngine.AI.NavMeshAgent>();
|
||||
|
||||
if (agent != null)
|
||||
{
|
||||
agent.isStopped = true;
|
||||
}
|
||||
|
||||
return Status.Success;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user