mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-16 16:34:41 +01:00
20 lines
465 B
C#
20 lines
465 B
C#
using UnityEngine;
|
|
|
|
namespace CinemaDirector
|
|
{
|
|
[CutsceneItem("Navigation", "Set Destination", new CutsceneItemGenre[] { CutsceneItemGenre.ActorItem })]
|
|
public class SetDestinationEvent : CinemaActorEvent
|
|
{
|
|
public Vector3 target;
|
|
|
|
public override void Trigger(GameObject actor)
|
|
{
|
|
UnityEngine.AI.NavMeshAgent component = actor.GetComponent<UnityEngine.AI.NavMeshAgent>();
|
|
if (component != null)
|
|
{
|
|
component.SetDestination(target);
|
|
}
|
|
}
|
|
}
|
|
}
|