Final touches

This commit is contained in:
Pasha Bibko
2025-04-28 10:16:14 +01:00
parent 16bcb9b203
commit f4d15f33e7
12 changed files with 1719 additions and 675 deletions

View File

@@ -4,6 +4,22 @@ public partial class PlayerMovement : MonoBehaviour
{
private void OnTriggerStay(Collider other)
{
if (m_IsDead)
{
return;
}
if (other.CompareTag("Finish"))
{
m_IsDead = true;
m_GameCanvas.enabled = false;
m_CompletedCanvas.enabled = true;
float timeTaken = Time.time - m_StartTime;
m_CompletedText.text = "Congratulations you beat 'The Mobius Line'\nYou took " + timeTaken.ToString("0.00") + " seconds\nPress R to restart and try to get a faster time";
}
// Stops it trying to find the normals of portals
if (other.CompareTag("Portal")) { return; }