mirror of
https://github.com/PashaBibko/The-Mobius-Line.git
synced 2026-04-04 01:49:07 +00:00
Final touches
This commit is contained in:
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user