33 lines
595 B
C#
33 lines
595 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class ElevatorCaller : MonoBehaviour
|
|
{
|
|
|
|
// Start is called before the first frame update
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
//Debug.Log(other);
|
|
ElevatorSpringyButton button = other.GetComponent<ElevatorSpringyButton>();
|
|
if (button == null) return;
|
|
else
|
|
{
|
|
|
|
button.Pressed();
|
|
}
|
|
|
|
|
|
}
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|