first commit

This commit is contained in:
2026-06-04 15:45:39 +03:00
commit e12fcea2e8
73 changed files with 9576 additions and 0 deletions
+70
View File
@@ -0,0 +1,70 @@
using UnityEngine;
public class NarrativeEventManager : MonoBehaviour
{
public HintManager hintManager;
public GameObject secretChest;
public Light secretLight;
public Transform exitDoor;
public Vector3 doorOpenOffset = new Vector3(0f, 2.6f, 0f);
private bool statueEventCompleted;
private bool sceneFinished;
private Vector3 closedDoorPosition;
private void Start()
{
if (exitDoor != null)
{
closedDoorPosition = exitDoor.position;
}
if (secretChest != null)
{
secretChest.SetActive(false);
}
if (secretLight != null)
{
secretLight.enabled = false;
}
}
public void OnStatueInteracted()
{
if (statueEventCompleted)
{
return;
}
statueEventCompleted = true;
hintManager?.ShowHint("В стене открылся тайный механизм...", 3.5f);
// This is the simple narrative payoff: reveal reward, add light, and open the exit.
if (secretChest != null)
{
secretChest.SetActive(true);
}
if (secretLight != null)
{
secretLight.enabled = true;
}
if (exitDoor != null)
{
exitDoor.position = closedDoorPosition + doorOpenOffset;
}
}
public void FinishScene()
{
if (sceneFinished)
{
return;
}
sceneFinished = true;
hintManager?.ShowHint("Артефакт найден. Сцена завершена.", 4f);
}
}