TheStable/Assets/MyroP/Arcade/Melon/Code/GameOverCollider.cs
Jamie Greunbaum 542e04afed - Replaced one skee-ball machine with two arcade machines.
- Added Black Horse And The Cherry Tree by KT Tunstall to the horse playlist.
- Added Buckin' My Horse by Sir Mix-A-Lot to the horse playlist.
2026-02-11 02:58:41 -05:00

23 lines
521 B
C#

using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
namespace myro.arcade
{
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class GameOverCollider : UdonSharpBehaviour
{
public MelonGameLoop MelonGameLoopInstance;
private void OnCollisionEnter(Collision collision)
{
Fruit anotherFruit = collision.gameObject.GetComponent<Fruit>();
if (anotherFruit != null && MelonGameLoopInstance.GetGameState() != GameState.FINISH)
{
MelonGameLoopInstance.GameOver();
}
}
}
}