game: run completion/failure trigger scripts
This commit is contained in:
parent
a00f8c9b7c
commit
d5e7a9970a
File diff suppressed because one or more lines are too long
20
RunningLateGame/Assets/Scripts/RunCompletionTrigger.cs
Normal file
20
RunningLateGame/Assets/Scripts/RunCompletionTrigger.cs
Normal file
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* author: sai puay
|
||||
* date: 11/8/2024
|
||||
* description: game run completion trigger collision
|
||||
*/
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// game run completion trigger collision class
|
||||
/// </summary>
|
||||
public class RunCompletionTrigger : MonoBehaviour
|
||||
{
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
GameManager.Instance.SetDisplayState(GameManager.DisplayState.OverlayCompleteUnderTimeMenu);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 770ec800e73f4df89e7c6a433fdf29a4
|
||||
timeCreated: 1723352274
|
19
RunningLateGame/Assets/Scripts/RunFailureTrigger.cs
Normal file
19
RunningLateGame/Assets/Scripts/RunFailureTrigger.cs
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* author: sai puay
|
||||
* date: 11/8/2024
|
||||
* description: game run failure trigger collision
|
||||
*/
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// game run failure trigger collision
|
||||
/// </summary>
|
||||
public class RunFailureTrigger : MonoBehaviour
|
||||
{
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
GameManager.Instance.SetDisplayState(GameManager.DisplayState.OverlayFailedOverTimeMenu);
|
||||
}
|
||||
}
|
3
RunningLateGame/Assets/Scripts/RunFailureTrigger.cs.meta
Normal file
3
RunningLateGame/Assets/Scripts/RunFailureTrigger.cs.meta
Normal file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ade9f10562b4490b8142692ad54654c3
|
||||
timeCreated: 1723352378
|
Reference in a new issue