added buttons to the inside of the elevator aswell. Started configuring firing mechanism
This commit is contained in:
@@ -7,7 +7,9 @@ public class ElevatorCaller : MonoBehaviour
|
||||
// Start is called before the first frame update
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
print(other);
|
||||
SpringyButtonPhysics button = other.GetComponent<SpringyButtonPhysics>();
|
||||
if (button == null) return;
|
||||
else button.Pressed();
|
||||
}
|
||||
void Start()
|
||||
{
|
||||
|
||||
@@ -59,4 +59,8 @@ public class SpringyButtonPhysics : MonoBehaviour {
|
||||
Vector3 worldPos = buttonDirectionRoot.TransformPoint(newLocalPos);
|
||||
rb.MovePosition(worldPos);
|
||||
}
|
||||
public void Pressed()
|
||||
{
|
||||
Debug.Log("Button is pressed");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user