Files
beyond/Assets/Scripts/TEMP_SCRIPTS/TEMP_LEVER_INTERACTION.cs
2025-05-30 18:14:48 +02:00

23 lines
391 B
C#

using UnityEngine;
public class LeverInteraction : MonoBehaviour
{
public GateController gate;
private bool isActivated = false;
void OnMouseDown()
{
if (!isActivated)
{
isActivated = true;
gate.OpenGate();
AnimateLever();
}
}
void AnimateLever()
{
transform.Rotate(-45f, 0f, 0f);
}
}