Made the elevator button-functional. Needs some fine-tuning and audio work.
This commit is contained in:
@@ -4,12 +4,20 @@ using UnityEngine;
|
||||
|
||||
public class ElevatorCaller : MonoBehaviour
|
||||
{
|
||||
|
||||
// Start is called before the first frame update
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
SpringyButtonPhysics button = other.GetComponent<SpringyButtonPhysics>();
|
||||
//Debug.Log(other);
|
||||
ElevatorSpringyButton button = other.GetComponent<ElevatorSpringyButton>();
|
||||
if (button == null) return;
|
||||
else button.Pressed();
|
||||
else
|
||||
{
|
||||
|
||||
button.Pressed();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
void Start()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user