28 lines
755 B
C#
28 lines
755 B
C#
using Opsive.BehaviorDesigner.Runtime.Tasks;
|
|
using Opsive.BehaviorDesigner.Runtime.Tasks.Actions;
|
|
using Opsive.GraphDesigner.Runtime;
|
|
using Opsive.GraphDesigner.Runtime.Variables;
|
|
using Opsive.Shared.Utility;
|
|
using UnityEngine;
|
|
|
|
namespace Cielonos.MainGame.Characters.AI
|
|
{
|
|
[Description("获取玩家对象。")]
|
|
[NodeIcon("Assets/Sprites/Icon/Aim01.png")]
|
|
[Category("Cielonos")]
|
|
public class GetPlayer : AutomataActionBase
|
|
{
|
|
public SharedVariable<GameObject> player;
|
|
|
|
public override TaskStatus OnUpdate()
|
|
{
|
|
player.Value = MainGameManager.Player.gameObject;
|
|
return TaskStatus.Success;
|
|
}
|
|
|
|
public override void Reset()
|
|
{
|
|
player = null;
|
|
}
|
|
}
|
|
} |