Files
BH3/Assets/Plugins/Assembly-CSharp-firstpass/CinemaDirector/RigidbodySleepEvent.cs
2025-08-13 09:26:42 +08:00

33 lines
625 B
C#

using UnityEngine;
namespace CinemaDirector
{
[CutsceneItem("Physics", "Sleep", new CutsceneItemGenre[] { CutsceneItemGenre.ActorItem })]
public class RigidbodySleepEvent : CinemaActorEvent
{
public override void Trigger(GameObject actor)
{
if (actor != null)
{
Rigidbody component = actor.GetComponent<Rigidbody>();
if (component != null)
{
component.Sleep();
}
}
}
public override void Reverse(GameObject actor)
{
if (actor != null)
{
Rigidbody component = actor.GetComponent<Rigidbody>();
if (component != null)
{
component.WakeUp();
}
}
}
}
}