using UnityEngine; namespace CinemaDirector { /// /// Event to wake up the rigidbody of a given actor. /// [CutsceneItemAttribute("Physics", "Wake Up", CutsceneItemGenre.ActorItem)] public class RigidbodyWakeUpEvent : CinemaActorEvent { /// /// Trigger this event and wake up the rigidbody component of the given actor. /// /// The actor to wake up. public override void Trigger(GameObject actor) { Rigidbody rb = actor.GetComponent(); if (rb != null) { rb.WakeUp(); } } /// /// Trigger this event and wake up the rigidbody component of the given actor. /// /// The actor to wake up. public override void Reverse(GameObject actor) { Rigidbody rb = actor.GetComponent(); if (rb != null) { rb.Sleep(); } } } }