- 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.
23 lines
521 B
C#
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();
|
|
}
|
|
}
|
|
}
|
|
}
|