diff --git a/302/Assets/.DS_Store b/302/Assets/.DS_Store index e9a2614..9f41ba6 100644 Binary files a/302/Assets/.DS_Store and b/302/Assets/.DS_Store differ diff --git a/302/Assets/Scripts/.DS_Store b/302/Assets/Scripts/.DS_Store index 37b396c..5bee4f1 100644 Binary files a/302/Assets/Scripts/.DS_Store and b/302/Assets/Scripts/.DS_Store differ diff --git a/302/Assets/Scripts/Fire.cs b/302/Assets/Scripts/Fire.cs index 3229fa7..30a51d9 100644 --- a/302/Assets/Scripts/Fire.cs +++ b/302/Assets/Scripts/Fire.cs @@ -4,14 +4,14 @@ public class Fire : MonoBehaviour { [SerializeField] private float extinguishTime = 2f; - private Anomaly26Manager anomalyManager; + private Anomaly26Controller anomalyManager; private float currentExtinguishTime = 0f; private bool isBeingExtinguished = false; private void Start() { - anomalyManager = FindObjectOfType(); + anomalyManager = FindObjectOfType(); if (anomalyManager) { } diff --git a/302/Assets/Scripts/SideGirl.cs b/302/Assets/Scripts/SideGirl.cs index 7c30228..48fafb9 100644 --- a/302/Assets/Scripts/SideGirl.cs +++ b/302/Assets/Scripts/SideGirl.cs @@ -8,13 +8,13 @@ public class SideGirl : InteractableObject private MeshRenderer meshRenderer; private bool hasInteracted = false; - private Anomaly5Manager anomalyManager; + private Anomaly05Controller anomalyManager; private void Awake() { meshRenderer = GetComponent(); // Anomaly5Manager 찾기 - anomalyManager = FindObjectOfType(); + anomalyManager = FindObjectOfType(); } public override void OnInteract() diff --git a/302/Assets/Scripts/SpecificAnomalyManager/.DS_Store b/302/Assets/Scripts/SpecificAnomalyManager/.DS_Store new file mode 100644 index 0000000..a9521ad Binary files /dev/null and b/302/Assets/Scripts/SpecificAnomalyManager/.DS_Store differ diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly4Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly04Controller.cs similarity index 92% rename from 302/Assets/Scripts/SpecificAnomalyManager/Anomaly4Controller.cs rename to 302/Assets/Scripts/SpecificAnomalyManager/Anomaly04Controller.cs index 6997617..a4696b7 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly4Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly04Controller.cs @@ -2,14 +2,27 @@ using System.Collections.Generic; using System.Collections; -public class Anomaly4Controller : MonoBehaviour +public class Anomaly04Controller : AbstractAnomalyComposite { + public override string Name { get; } = "Anomaly04Controller"; private GameObject mainLaptop; private List laptopList = new List(); void OnEnable() { + StartAnomaly(); + } + + public override bool StartAnomaly() { + bool res = base.StartAnomaly(); StartCoroutine(InitializeSequence()); + return res; + } + + public override bool ResetAnomaly() { + bool res = base.ResetAnomaly(); + StartCoroutine(ScreenChangeSequence()); + return res; } private IEnumerator InitializeSequence() @@ -94,12 +107,11 @@ private IEnumerator InitializeSequence() } // 5단계: 화면 변경 시퀀스 시작 - StartCoroutine(ScreenChangeSequence()); + ResetAnomaly(); } private IEnumerator ScreenChangeSequence() { - // 기존 ScreenChangeSequence 코드는 그대로 유지 yield return new WaitForSeconds(5f); Debug.Log("First screen change after 5 seconds"); diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly4Controller.cs.meta b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly04Controller.cs.meta similarity index 100% rename from 302/Assets/Scripts/SpecificAnomalyManager/Anomaly4Controller.cs.meta rename to 302/Assets/Scripts/SpecificAnomalyManager/Anomaly04Controller.cs.meta diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly5Manager.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly05Controller.cs similarity index 85% rename from 302/Assets/Scripts/SpecificAnomalyManager/Anomaly5Manager.cs rename to 302/Assets/Scripts/SpecificAnomalyManager/Anomaly05Controller.cs index 445110d..1829f44 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly5Manager.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly05Controller.cs @@ -2,16 +2,18 @@ using System.Collections.Generic; using UnityEngine; -public class Anomaly5Manager : MonoBehaviour +public class Anomaly05Controller : AbstractAnomalyComposite { + public override string Name { get; } = "Anomaly05Controller"; [SerializeField] private float moveDistance = 5f; [SerializeField] private Vector3 spawnPosition; [SerializeField] private GameObject sideGirlPrefab; [SerializeField] private AudioSource audioSource; private GameObject sideGirl; - void Start() + protected override bool Awake_() { + bool res = base.Awake_(); sideGirl = GameObject.FindGameObjectWithTag("sideGirl"); if(sideGirl != null) { @@ -26,6 +28,7 @@ void Start() } StartCoroutine(PlayMusicAfterDelay()); + return res; } IEnumerator PlayMusicAfterDelay() diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly5Manager.cs.meta b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly05Controller.cs.meta similarity index 100% rename from 302/Assets/Scripts/SpecificAnomalyManager/Anomaly5Manager.cs.meta rename to 302/Assets/Scripts/SpecificAnomalyManager/Anomaly05Controller.cs.meta diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly7Manager.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly07Controller.cs similarity index 93% rename from 302/Assets/Scripts/SpecificAnomalyManager/Anomaly7Manager.cs rename to 302/Assets/Scripts/SpecificAnomalyManager/Anomaly07Controller.cs index f70de12..b45fbdb 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly7Manager.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly07Controller.cs @@ -1,6 +1,6 @@ using UnityEngine; -public class Anomaly7Manager : MonoBehaviour +public class Anomaly07Controller : MonoBehaviour { [Header("Russian Roulette Settings")] [SerializeField] private GameObject gunPrefab; diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly7Manager.cs.meta b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly07Controller.cs.meta similarity index 100% rename from 302/Assets/Scripts/SpecificAnomalyManager/Anomaly7Manager.cs.meta rename to 302/Assets/Scripts/SpecificAnomalyManager/Anomaly07Controller.cs.meta diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly9Manager.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly09Controller.cs similarity index 99% rename from 302/Assets/Scripts/SpecificAnomalyManager/Anomaly9Manager.cs rename to 302/Assets/Scripts/SpecificAnomalyManager/Anomaly09Controller.cs index 8f3f53a..143c4d4 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly9Manager.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly09Controller.cs @@ -2,7 +2,7 @@ using System.Collections; using System.Collections.Generic; -public class Anomaly9Manager : MonoBehaviour +public class Anomaly09Controller : MonoBehaviour { [Header("Anomaly Settings")] public float anomalyDelay = 15f; diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly9Manager.cs.meta b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly09Controller.cs.meta similarity index 100% rename from 302/Assets/Scripts/SpecificAnomalyManager/Anomaly9Manager.cs.meta rename to 302/Assets/Scripts/SpecificAnomalyManager/Anomaly09Controller.cs.meta diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly14Manager.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly14Controller.cs similarity index 97% rename from 302/Assets/Scripts/SpecificAnomalyManager/Anomaly14Manager.cs rename to 302/Assets/Scripts/SpecificAnomalyManager/Anomaly14Controller.cs index 3dc6de4..209c1e6 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly14Manager.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly14Controller.cs @@ -4,7 +4,7 @@ using UnityEngine; -public class Anomaly14Manager : MonoBehaviour +public class Anomaly14Controller : MonoBehaviour { public GameObject SweaterSitGirlPrefab; public GameObject DifferentPrefab; // 다른 종류의 프리팹 diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly14Manager.cs.meta b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly14Controller.cs.meta similarity index 100% rename from 302/Assets/Scripts/SpecificAnomalyManager/Anomaly14Manager.cs.meta rename to 302/Assets/Scripts/SpecificAnomalyManager/Anomaly14Controller.cs.meta diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly25Manager.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly25Controller.cs similarity index 97% rename from 302/Assets/Scripts/SpecificAnomalyManager/Anomaly25Manager.cs rename to 302/Assets/Scripts/SpecificAnomalyManager/Anomaly25Controller.cs index 91dfc15..593aa84 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly25Manager.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly25Controller.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using UnityEngine; -public class Anomaly25Manager : MonoBehaviour +public class Anomaly25Controller : MonoBehaviour { public AudioSource audioSource; // Inspector에서 할당 diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly25Manager.cs.meta b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly25Controller.cs.meta similarity index 100% rename from 302/Assets/Scripts/SpecificAnomalyManager/Anomaly25Manager.cs.meta rename to 302/Assets/Scripts/SpecificAnomalyManager/Anomaly25Controller.cs.meta diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly26Manager.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly26Controller.cs similarity index 98% rename from 302/Assets/Scripts/SpecificAnomalyManager/Anomaly26Manager.cs rename to 302/Assets/Scripts/SpecificAnomalyManager/Anomaly26Controller.cs index 655575a..94d2300 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly26Manager.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly26Controller.cs @@ -2,7 +2,7 @@ using System.Collections; using System.Collections.Generic; -public class Anomaly26Manager : MonoBehaviour +public class Anomaly26Controller : MonoBehaviour { [Header("Fire Settings")] [SerializeField] private GameObject firePrefab; diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly26Manager.cs.meta b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly26Controller.cs.meta similarity index 100% rename from 302/Assets/Scripts/SpecificAnomalyManager/Anomaly26Manager.cs.meta rename to 302/Assets/Scripts/SpecificAnomalyManager/Anomaly26Controller.cs.meta