using UnityEngine; namespace CinemaDirector { /// /// An event for calling the game object send message method. /// Cannot be reversed. /// [CutsceneItemAttribute("Game Object", "Send Message", CutsceneItemGenre.ActorItem)] public class SendMessageGameObject : CinemaActorEvent { public string MethodName = string.Empty; public object Parameter = null; public SendMessageOptions SendMessageOptions = SendMessageOptions.DontRequireReceiver; /// /// Trigger this event and send the message. /// /// the actor to send the message to. public override void Trigger(GameObject actor) { if (actor != null) { actor.SendMessage(MethodName, Parameter, SendMessageOptions); } } } }