Arena version of Land_Of_Death (KF)
This commit is contained in:
22
Assets/Scripts/TEMP_SCRIPTS/TEMP_LEVER_INTERACTION.cs
Normal file
22
Assets/Scripts/TEMP_SCRIPTS/TEMP_LEVER_INTERACTION.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user