Wszystkie funkcjonalnosci git, potrzeba poprawy UI
This commit is contained in:
28
Assets/Scripts/ExperimentalSceneScripts/FinalFlagTrigger.cs
Normal file
28
Assets/Scripts/ExperimentalSceneScripts/FinalFlagTrigger.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class FinalFlagTrigger : MonoBehaviour
|
||||
{
|
||||
[Header("End Scene Settings")]
|
||||
public string thankYouSceneName = "ThankYouScene"; // Nazwa sceny z podziêkowaniami
|
||||
|
||||
private bool _hasTriggered = false;
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Player") && !_hasTriggered)
|
||||
{
|
||||
_hasTriggered = true;
|
||||
Debug.Log("[FinalFlagTrigger] Gracz dotar³ do koñca! Zatrzymujê badanie.");
|
||||
|
||||
// 1. Zatrzymujemy zapis do plików CSV w Mened¿erze
|
||||
if (ExperimentManager.Instance != null)
|
||||
{
|
||||
ExperimentManager.Instance.StopLogging();
|
||||
}
|
||||
|
||||
// 2. £adujemy scenê koñcow¹
|
||||
SceneManager.LoadScene(thankYouSceneName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 011468f91b44a8d4ab948e154dbf8634
|
||||
Reference in New Issue
Block a user