diff --git a/302/Assets/Prefabs/AnomalyControllers/DefaultManager.prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly00Controller.prefab similarity index 85% rename from 302/Assets/Prefabs/AnomalyControllers/DefaultManager.prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly00Controller.prefab index c204171..3ec163b 100644 --- a/302/Assets/Prefabs/AnomalyControllers/DefaultManager.prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly00Controller.prefab @@ -9,9 +9,9 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 2638910833924830472} - - component: {fileID: 2638910833924830473} + - component: {fileID: 8384682866583191229} m_Layer: 0 - m_Name: DefaultManager + m_Name: Anomaly00Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -32,7 +32,7 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &2638910833924830473 +--- !u!114 &8384682866583191229 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -41,6 +41,6 @@ MonoBehaviour: m_GameObject: {fileID: 2638910833924830479} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 82bc633e53b744d7e9052bc7c316aa26, type: 3} + m_Script: {fileID: 11500000, guid: 103d4e2d80438de4d8d26e138c2b3080, type: 3} m_Name: m_EditorClassIdentifier: diff --git a/302/Assets/Prefabs/AnomalyControllers/DefaultManager.prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly00Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/DefaultManager.prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly00Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (1).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly01Controller.prefab similarity index 97% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (1).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly01Controller.prefab index 672b186..e316619 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (1).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly01Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 8029531248133384329} - component: {fileID: 8029531248133384328} m_Layer: 0 - m_Name: AnomalyManager (1) + m_Name: Anomaly01Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (1).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly01Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (1).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly01Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (2).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly02Controller.prefab similarity index 97% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (2).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly02Controller.prefab index d282b4d..431cf66 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (2).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly02Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 7880928048431957976} - component: {fileID: -1342136143625530433} m_Layer: 0 - m_Name: AnomalyManager (2) + m_Name: Anomaly02Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (2).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly02Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (2).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly02Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (3).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly03Controller.prefab similarity index 97% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (3).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly03Controller.prefab index 835c3e7..66e0a25 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (3).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly03Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 8155634044022115139} - component: {fileID: 6771753627572306098} m_Layer: 0 - m_Name: AnomalyManager (3) + m_Name: Anomaly03Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (3).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly03Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (3).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly03Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (4).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly04Controller.prefab similarity index 97% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (4).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly04Controller.prefab index 8c435ea..5fc6574 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (4).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly04Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 4293575878796340971} - component: {fileID: 4293575878796340970} m_Layer: 0 - m_Name: AnomalyManager (4) + m_Name: Anomaly04Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (4).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly04Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (4).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly04Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (5).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly05Controller.prefab similarity index 99% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (5).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly05Controller.prefab index f3faeb1..391e2d2 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (5).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly05Controller.prefab @@ -12,7 +12,7 @@ GameObject: - component: {fileID: 2816538696318972851} - component: {fileID: 3342415142694045387} m_Layer: 0 - m_Name: AnomalyManager (5) + m_Name: Anomaly05Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (5).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly05Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (5).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly05Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (6).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly06Controller.prefab similarity index 97% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (6).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly06Controller.prefab index eab1551..db6e68b 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (6).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly06Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 8069798235795724848} - component: {fileID: -5694855411504203049} m_Layer: 0 - m_Name: AnomalyManager (6) + m_Name: Anomaly06Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (6).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly06Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (6).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly06Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (7).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly07Controller.prefab similarity index 97% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (7).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly07Controller.prefab index f105188..e098b72 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (7).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly07Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 2503749442268196574} - component: {fileID: 2503749442268196569} m_Layer: 0 - m_Name: AnomalyManager (7) + m_Name: Anomaly07Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (7).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly07Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (7).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly07Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (8).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly08Controller.prefab similarity index 98% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (8).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly08Controller.prefab index 0687abf..e664ac5 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (8).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly08Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 7849916854690944652} - component: {fileID: 7849916854690944653} m_Layer: 0 - m_Name: AnomalyManager (8) + m_Name: Anomaly08Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (8).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly08Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (8).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly08Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (9).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly09Controller.prefab similarity index 98% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (9).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly09Controller.prefab index 8d36cc6..55d013c 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (9).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly09Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 2226821773270315678} - component: {fileID: 2226821773270315679} m_Layer: 0 - m_Name: AnomalyManager (9) + m_Name: Anomaly09Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (9).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly09Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (9).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly09Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (10).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly10Controller.prefab similarity index 97% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (10).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly10Controller.prefab index 776c300..8f73f3d 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (10).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly10Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 242199192578515326} - component: {fileID: -4456860463678520930} m_Layer: 0 - m_Name: AnomalyManager (10) + m_Name: Anomaly10Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (10).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly10Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (10).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly10Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (11).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly11Controller.prefab similarity index 97% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (11).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly11Controller.prefab index aafde74..67cc582 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (11).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly11Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 2999912811296015234} - component: {fileID: 2999912811296015261} m_Layer: 0 - m_Name: AnomalyManager (11) + m_Name: Anomaly11Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (11).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly11Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (11).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly11Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (12).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly12Controller.prefab similarity index 97% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (12).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly12Controller.prefab index b72256b..18a242a 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (12).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly12Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 290677001697144120} - component: {fileID: 290677001697144121} m_Layer: 0 - m_Name: AnomalyManager (12) + m_Name: Anomaly12Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (12).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly12Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (12).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly12Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (13).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly13Controller.prefab similarity index 97% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (13).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly13Controller.prefab index 8ee6a6f..6a50cdb 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (13).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly13Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 5926823780813230198} - component: {fileID: 5926823780813230197} m_Layer: 0 - m_Name: AnomalyManager (13) + m_Name: Anomaly13Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (13).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly13Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (13).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly13Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (14).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly14Controller.prefab similarity index 99% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (14).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly14Controller.prefab index 3dbea17..60f5f58 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (14).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly14Controller.prefab @@ -12,7 +12,7 @@ GameObject: - component: {fileID: 4663006683020231267} - component: {fileID: 1627576399264982474} m_Layer: 0 - m_Name: AnomalyManager (14) + m_Name: Anomaly14Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (14).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly14Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (14).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly14Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (15).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly15Controller.prefab similarity index 98% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (15).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly15Controller.prefab index 03254bc..41b384f 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (15).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly15Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 8678062959089499938} - component: {fileID: 8678062959089499937} m_Layer: 0 - m_Name: AnomalyManager (15) + m_Name: Anomaly15Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (15).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly15Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (15).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly15Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (16).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly16Controller.prefab similarity index 99% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (16).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly16Controller.prefab index 36ab6f2..6a92d03 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (16).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly16Controller.prefab @@ -13,7 +13,7 @@ GameObject: - component: {fileID: 2166861079969279419} - component: {fileID: -2178821574986488351} m_Layer: 0 - m_Name: AnomalyManager (16) + m_Name: Anomaly16Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (16).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly16Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (16).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly16Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (17).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly17Controller.prefab similarity index 98% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (17).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly17Controller.prefab index d97f215..c8b0582 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (17).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly17Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 190014940232167715} - component: {fileID: 190014940232167714} m_Layer: 0 - m_Name: AnomalyManager (17) + m_Name: Anomaly17Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (17).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly17Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (17).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly17Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (18).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly18Controller.prefab similarity index 98% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (18).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly18Controller.prefab index 1ce6543..ea75df5 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (18).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly18Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 2594707081102709241} - component: {fileID: -7257790672791855} m_Layer: 0 - m_Name: AnomalyManager (18) + m_Name: Anomaly18Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (18).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly18Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (18).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly18Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (19).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly19Controller.prefab similarity index 97% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (19).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly19Controller.prefab index bacc165..9019a48 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (19).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly19Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 5785941547889943524} - component: {fileID: 1931854943782471330} m_Layer: 0 - m_Name: AnomalyManager (19) + m_Name: Anomaly19Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (19).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly19Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (19).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly19Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (20).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly20Controller.prefab similarity index 98% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (20).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly20Controller.prefab index 83600e4..78b4a71 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (20).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly20Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 8886156794611203334} - component: {fileID: 746222989119768169} m_Layer: 0 - m_Name: AnomalyManager (20) + m_Name: Anomaly20Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (20).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly20Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (20).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly20Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (21).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly21Controller.prefab similarity index 97% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (21).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly21Controller.prefab index 22bb93b..e043cd3 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (21).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly21Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 2913831600299549789} - component: {fileID: 2913831600299549786} m_Layer: 0 - m_Name: AnomalyManager (21) + m_Name: Anomaly21Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (21).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly21Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (21).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly21Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (22).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly22Controller.prefab similarity index 98% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (22).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly22Controller.prefab index c532f4b..850476d 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (22).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly22Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 8172314385303719708} - component: {fileID: 8172314385303719709} m_Layer: 0 - m_Name: AnomalyManager (22) + m_Name: Anomaly22Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (22).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly22Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (22).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly22Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (23).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly23Controller.prefab similarity index 97% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (23).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly23Controller.prefab index 26a3b94..f035845 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (23).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly23Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 7967237053195646304} - component: {fileID: 9000146529396228395} m_Layer: 0 - m_Name: AnomalyManager (23) + m_Name: Anomaly23Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (23).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly23Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (23).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly23Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (24).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly24Controller.prefab similarity index 97% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (24).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly24Controller.prefab index 9a198ea..74b95a3 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (24).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly24Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 3286476098505687296} - component: {fileID: 3286476098505687297} m_Layer: 0 - m_Name: AnomalyManager (24) + m_Name: Anomaly24Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (24).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly24Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (24).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly24Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (25).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly25Controller.prefab similarity index 99% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (25).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly25Controller.prefab index 7e032c5..282eb7e 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (25).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly25Controller.prefab @@ -12,7 +12,7 @@ GameObject: - component: {fileID: 9154281157216446298} - component: {fileID: -8715984475781782138} m_Layer: 0 - m_Name: AnomalyManager (25) + m_Name: Anomaly25Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (25).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly25Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (25).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly25Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (26).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly26Controller.prefab similarity index 99% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (26).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly26Controller.prefab index 6888849..cb036e1 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (26).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly26Controller.prefab @@ -12,7 +12,7 @@ GameObject: - component: {fileID: 3029320929590298613} - component: {fileID: -5739081890370854840} m_Layer: 0 - m_Name: AnomalyManager (26) + m_Name: Anomaly26Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (26).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly26Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (26).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly26Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (27).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly27Controller.prefab similarity index 97% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (27).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly27Controller.prefab index 1279273..1180fae 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (27).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly27Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 121491297669831474} - component: {fileID: 121491297669831475} m_Layer: 0 - m_Name: AnomalyManager (27) + m_Name: Anomaly27Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (27).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly27Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (27).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly27Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (28).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly28Controller.prefab similarity index 97% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (28).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly28Controller.prefab index 39d15ac..01df541 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (28).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly28Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 5650449145146738953} - component: {fileID: 5650449145146738952} m_Layer: 0 - m_Name: AnomalyManager (28) + m_Name: Anomaly28Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (28).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly28Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (28).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly28Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (29).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly29Controller.prefab similarity index 99% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (29).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly29Controller.prefab index 60557ae..564cc11 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (29).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly29Controller.prefab @@ -12,7 +12,7 @@ GameObject: - component: {fileID: 3233071982878084976} - component: {fileID: 212718662064770136} m_Layer: 0 - m_Name: AnomalyManager (29) + m_Name: Anomaly29Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (29).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly29Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (29).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly29Controller.prefab.meta diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (30).prefab b/302/Assets/Prefabs/AnomalyControllers/Anomaly30Controller.prefab similarity index 98% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (30).prefab rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly30Controller.prefab index 8b51990..676c3d3 100644 --- a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (30).prefab +++ b/302/Assets/Prefabs/AnomalyControllers/Anomaly30Controller.prefab @@ -11,7 +11,7 @@ GameObject: - component: {fileID: 5605359256125054965} - component: {fileID: 5605359256125054962} m_Layer: 0 - m_Name: AnomalyManager (30) + m_Name: Anomaly30Controller m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/302/Assets/Prefabs/AnomalyControllers/AnomalyManager (30).prefab.meta b/302/Assets/Prefabs/AnomalyControllers/Anomaly30Controller.prefab.meta similarity index 100% rename from 302/Assets/Prefabs/AnomalyControllers/AnomalyManager (30).prefab.meta rename to 302/Assets/Prefabs/AnomalyControllers/Anomaly30Controller.prefab.meta diff --git a/302/Assets/Scenes/DefaultGameScene.unity b/302/Assets/Scenes/DefaultGameScene.unity index 090adfc..b89ea73 100644 --- a/302/Assets/Scenes/DefaultGameScene.unity +++ b/302/Assets/Scenes/DefaultGameScene.unity @@ -1266,7 +1266,7 @@ GameObject: m_CorrespondingSourceObject: {fileID: 589333374628169546, guid: 9e5b64cc1f2ea46498fc5952bf0d5895, type: 3} m_PrefabInstance: {fileID: 1162939157} m_PrefabAsset: {fileID: 0} ---- !u!114 &80334034 +--- !u!114 &80334031 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1275,7 +1275,7 @@ MonoBehaviour: m_GameObject: {fileID: 80334030} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9a55ff71c373727419603887e590ca1a, type: 3} + m_Script: {fileID: 11500000, guid: 4b540547a9e7bfd4f92514a389b8db70, type: 3} m_Name: m_EditorClassIdentifier: --- !u!1001 &82428849 @@ -3461,7 +3461,6 @@ MonoBehaviour: promptMessage: "\uD074\uB9AD\uD558\uC5EC \uC0C1\uD638\uC791\uC6A9" interactionRange: 2 sleepPrompt: "\uB178\uD2B8\uBD81\uC73C\uB85C \uC7A0\uC790\uAE30" - playerController: {fileID: 1169446210} setStageClear: 0 --- !u!65 &202566268 BoxCollider: @@ -4566,7 +4565,6 @@ MonoBehaviour: promptMessage: "\uD074\uB9AD\uD558\uC5EC \uC0C1\uD638\uC791\uC6A9" interactionRange: 2 sleepPrompt: "\uB178\uD2B8\uBD81\uC73C\uB85C \uC7A0\uC790\uAE30" - playerController: {fileID: 1169446210} setStageClear: 0 --- !u!65 &231943381 BoxCollider: @@ -6092,7 +6090,6 @@ MonoBehaviour: promptMessage: "\uD074\uB9AD\uD558\uC5EC \uC0C1\uD638\uC791\uC6A9" interactionRange: 2 sleepPrompt: "\uB178\uD2B8\uBD81\uC73C\uB85C \uC7A0\uC790\uAE30" - playerController: {fileID: 1169446210} setStageClear: 0 --- !u!65 &279936515 BoxCollider: @@ -10209,7 +10206,6 @@ MonoBehaviour: promptMessage: "\uD074\uB9AD\uD558\uC5EC \uC0C1\uD638\uC791\uC6A9" interactionRange: 2 sleepPrompt: "\uB178\uD2B8\uBD81\uC73C\uB85C \uC7A0\uC790\uAE30" - playerController: {fileID: 1169446210} setStageClear: 0 --- !u!65 &473065237 BoxCollider: @@ -11246,7 +11242,7 @@ GameObject: m_CorrespondingSourceObject: {fileID: 8253366189145917135, guid: 4dbfb06eecc5e57499f6ea0d7a944a7d, type: 3} m_PrefabInstance: {fileID: 1487742019} m_PrefabAsset: {fileID: 0} ---- !u!114 &550563612 +--- !u!114 &550563609 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -11255,19 +11251,7 @@ MonoBehaviour: m_GameObject: {fileID: 550563608} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c74fcacda5ca304409e13b81453d92a2, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &550563613 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 550563608} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6aa0d459c4e2b834fad9092d089c5c87, type: 3} + m_Script: {fileID: 11500000, guid: 4b540547a9e7bfd4f92514a389b8db70, type: 3} m_Name: m_EditorClassIdentifier: --- !u!1001 &552901641 @@ -26146,7 +26130,7 @@ GameObject: - component: {fileID: 1169446213} - component: {fileID: 1169446212} - component: {fileID: 1169446211} - - component: {fileID: 1169446210} + - component: {fileID: 1169446215} - component: {fileID: 1169446214} m_Layer: 0 m_Name: Player @@ -26155,42 +26139,6 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!114 &1169446210 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1169446209} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 10c7fe8c31e314305b57f6249c073190, type: 3} - m_Name: - m_EditorClassIdentifier: - walkSpeed: 3 - runSpeed: 6 - mouseSensitivity: 6 - maxVerticalAngle: 80 - minVerticalAngle: -80 - walkBobSpeed: 10 - walkBobAmount: 0.05 - runBobSpeed: 14 - runBobAmount: 0.1 - cameraHeight: 3 - footstepSound: {fileID: 8300000, guid: 1aaf62174d59e4c40a611ec28b401000, type: 3} - walkVolume: 0.5 - runVolume: 0.7 - walkPitch: 1 - runPitch: 1.6 - walkStepInterval: 0.5 - runStepInterval: 0.3 - sleepAnimationDuration: 3 - wakeUpAnimationDuration: 3 - sleepCameraAngle: 60 - sleepCameraHeight: 2 - deathAnimationDuration: 2 - deathCameraAngle: -90 - deathCameraHeight: 0.3 --- !u!54 &1169446211 Rigidbody: m_ObjectHideFlags: 0 @@ -26249,11 +26197,46 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 6704a8d79f1f14bb6b60ed859cba1f65, type: 3} m_Name: m_EditorClassIdentifier: - interactionRange: 6 - interactableLayer: + distanceInteractionMax: 6 + layer: serializedVersion: 2 m_Bits: 8 - interactionCursor: {fileID: 924724807} +--- !u!114 &1169446215 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1169446209} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6e34750f3735fc4449406d425cd429fe, type: 3} + m_Name: + m_EditorClassIdentifier: + walkSpeed: 3 + runSpeed: 6 + mouseSensitivity: 6 + maxVerticalAngle: 80 + minVerticalAngle: -80 + walkBobSpeed: 10 + walkBobAmount: 0.05 + runBobSpeed: 14 + runBobAmount: 0.1 + cameraHeight: 3 + footstepSound: {fileID: 8300000, guid: 1aaf62174d59e4c40a611ec28b401000, type: 3} + walkVolume: 0.5 + runVolume: 0.7 + walkPitch: 1 + runPitch: 1.6 + walkStepInterval: 0.5 + runStepInterval: 0.3 + sleepAnimationDuration: 3 + wakeUpAnimationDuration: 3 + sleepCameraAngle: 60 + sleepCameraHeight: 2 + deathAnimationDuration: 2 + deathCameraAngle: -90 + deathCameraHeight: 0.3 --- !u!1 &1170134093 GameObject: m_ObjectHideFlags: 0 @@ -32975,7 +32958,7 @@ MonoBehaviour: m_GameObject: {fileID: 1042280326} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 48c9e4b5058bb344389c1cfed59a4c2e, type: 3} + m_Script: {fileID: 11500000, guid: 4b540547a9e7bfd4f92514a389b8db70, type: 3} m_Name: m_EditorClassIdentifier: --- !u!1001 &1482182348 @@ -35145,7 +35128,7 @@ GameObject: m_CorrespondingSourceObject: {fileID: 5499406867248628635, guid: 9e5b64cc1f2ea46498fc5952bf0d5895, type: 3} m_PrefabInstance: {fileID: 1162939157} m_PrefabAsset: {fileID: 0} ---- !u!114 &1636694569 +--- !u!114 &1636694566 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -35154,7 +35137,7 @@ MonoBehaviour: m_GameObject: {fileID: 1636694565} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9a55ff71c373727419603887e590ca1a, type: 3} + m_Script: {fileID: 11500000, guid: 4b540547a9e7bfd4f92514a389b8db70, type: 3} m_Name: m_EditorClassIdentifier: --- !u!1001 &1638073350 @@ -35353,6 +35336,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4165c4d609d744a73ae0630863a0d750, type: 3} m_Name: m_EditorClassIdentifier: + numStage: 8 --- !u!4 &1646071860 Transform: m_ObjectHideFlags: 0 @@ -43222,7 +43206,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7c2ce232bfcee40989338ae684665221, type: 3} m_Name: m_EditorClassIdentifier: - anomalyPrefabs: + prefabs: - {fileID: 2638910833924830479, guid: f7b226ef0310953459ac93c68b15d9cc, type: 3} - {fileID: 8029531248133384330, guid: 3ddbcb1b5c4f04b45909d0075f680cb9, type: 3} - {fileID: 7880928048431957977, guid: d4696fd3b056d31448f49f7de66a6344, type: 3} @@ -43254,10 +43238,10 @@ MonoBehaviour: - {fileID: 5650449145146738954, guid: 11a50fb479ce40a4698c9b8f9816f567, type: 3} - {fileID: 3233071982878084982, guid: 5156428cd2b781d4dabf6a30befa7685, type: 3} - {fileID: 5605359256125054964, guid: 48c8f10abe45bef4098efae902701f34, type: 3} - checkSpecificAnomaly: 1 - checkIntersect: 0 - SpecificAnomalyNum: 21 - currentAnomalyInstance: {fileID: 8678062959089499939, guid: 6aadfcd777444a24180cf51012c6e89c, type: 3} + numStage: 8 + numAnomaly: 31 + testMode: 0 + testAnomalyID: 0 --- !u!4 &1964216256 Transform: m_ObjectHideFlags: 0 @@ -47652,7 +47636,6 @@ MonoBehaviour: promptMessage: "\uD074\uB9AD\uD558\uC5EC \uC0C1\uD638\uC791\uC6A9" interactionRange: 2 sleepPrompt: "\uB178\uD2B8\uBD81\uC73C\uB85C \uC7A0\uC790\uAE30" - playerController: {fileID: 1169446210} setStageClear: 0 --- !u!65 &1987485592528700427 BoxCollider: @@ -47761,7 +47744,7 @@ PrefabInstance: - target: {fileID: 7190499244416527787, guid: e98bfaaf0938845d098edce033f7e7a2, type: 3} propertyPath: playerController value: - objectReference: {fileID: 1169446210} + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: e98bfaaf0938845d098edce033f7e7a2, type: 3} --- !u!1 &2527128357329061376 diff --git a/302/Assets/Scenes/GameEndingScene.unity b/302/Assets/Scenes/GameEndingScene.unity index 2476658..66b4a62 100644 --- a/302/Assets/Scenes/GameEndingScene.unity +++ b/302/Assets/Scenes/GameEndingScene.unity @@ -21008,10 +21008,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 2960778f4e9343349a587d3d39be1a05, type: 3} m_Name: m_EditorClassIdentifier: - promptMessage: "\uD074\uB9AD\uD558\uC5EC \uC0C1\uD638\uC791\uC6A9" - interactionRange: 2 - nameCamera: Main Camera - thresholdDistance: 10 --- !u!1001 &1027390622 PrefabInstance: m_ObjectHideFlags: 0 @@ -23498,8 +23494,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d5f5a6a7b1f18884e843839632af5a6d, type: 3} m_Name: m_EditorClassIdentifier: - nameLeft: SlideLeft - nameRight: SlideRight + names: [] numSlide: 15 numStage: 8 --- !u!4 &1164630180 @@ -33039,11 +33034,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 33b91f25b1ae6fa4d9727b23d45aab6a, type: 3} m_Name: m_EditorClassIdentifier: - position: {x: 0, y: 0, z: 0} - direction: {x: 0, y: 0, z: 0} - valueNormal: 0 - valueAnomaly: 0 - duration: 0 --- !u!1001 &1679000449 PrefabInstance: m_ObjectHideFlags: 0 @@ -43700,6 +43690,10 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 7013931049770212150, guid: e98bfaaf0938845d098edce033f7e7a2, type: 3} + propertyPath: m_Enabled + value: 0 + objectReference: {fileID: 0} - target: {fileID: 7013931049770212150, guid: e98bfaaf0938845d098edce033f7e7a2, type: 3} propertyPath: screenImage value: @@ -43712,11 +43706,17 @@ PrefabInstance: propertyPath: m_StaticEditorFlags value: 8 objectReference: {fileID: 0} + - target: {fileID: 7190499244416527787, guid: e98bfaaf0938845d098edce033f7e7a2, type: 3} + propertyPath: m_Enabled + value: 0 + objectReference: {fileID: 0} - target: {fileID: 7190499244416527787, guid: e98bfaaf0938845d098edce033f7e7a2, type: 3} propertyPath: playerController value: objectReference: {fileID: 1169446210} - m_RemovedComponents: [] + m_RemovedComponents: + - {fileID: 7013931049770212150, guid: e98bfaaf0938845d098edce033f7e7a2, type: 3} + - {fileID: 7190499244416527787, guid: e98bfaaf0938845d098edce033f7e7a2, type: 3} m_SourcePrefab: {fileID: 100100000, guid: e98bfaaf0938845d098edce033f7e7a2, type: 3} --- !u!33 &4416639437346922720 MeshFilter: diff --git a/302/Assets/Scripts/AbstractAnomalyComposite.cs b/302/Assets/Scripts/AbstractAnomalyComposite.cs index 268a193..581290a 100644 --- a/302/Assets/Scripts/AbstractAnomalyComposite.cs +++ b/302/Assets/Scripts/AbstractAnomalyComposite.cs @@ -168,6 +168,17 @@ protected override bool Awake_() return res; } + // `Start` 메시지 용 메서드 + protected override bool Start_() + { + bool res = base.Start_(); + + // TODO: `Start` 메시지에서 해야할 것 넣기. 없으면 메서드를 아예 지워도 됨. + // 함수가 제대로 작동했으면 `true`를, 아니면 `false`를 반환. + + return res; + } + // 필드를 초기화하는 메서드 protected override bool InitFields() { diff --git a/302/Assets/Scripts/AbstractAnomalyInteractable.cs b/302/Assets/Scripts/AbstractAnomalyInteractable.cs index afdd510..afc45d9 100644 --- a/302/Assets/Scripts/AbstractAnomalyInteractable.cs +++ b/302/Assets/Scripts/AbstractAnomalyInteractable.cs @@ -127,6 +127,17 @@ protected override bool Awake_() return res; } + // `Start` 메시지 용 메서드 + protected override bool Start_() + { + bool res = base.Start_(); + + // TODO: `Start` 메시지에서 해야할 것 넣기. 없으면 메서드를 아예 지워도 됨. + // 함수가 제대로 작동했으면 `true`를, 아니면 `false`를 반환. + + return res; + } + // 필드를 초기화하는 메서드 protected override bool InitFields() { diff --git a/302/Assets/Scripts/AbstractAnomalyObject.cs b/302/Assets/Scripts/AbstractAnomalyObject.cs index 9a5879f..d5fd9c5 100644 --- a/302/Assets/Scripts/AbstractAnomalyObject.cs +++ b/302/Assets/Scripts/AbstractAnomalyObject.cs @@ -47,6 +47,17 @@ protected override bool Awake_() return res; } + // `Start` 메시지 용 메서드 + protected override bool Start_() + { + bool res = base.Start_(); + + // TODO: `Start` 메시지에서 해야할 것 넣기. 없으면 메서드를 아예 지워도 됨. + // 함수가 제대로 작동했으면 `true`를, 아니면 `false`를 반환. + + return res; + } + // 필드를 초기화하는 메서드 protected override bool InitFields() { diff --git a/302/Assets/Scripts/AbstractBehaviour.cs b/302/Assets/Scripts/AbstractBehaviour.cs index e040a43..d48954a 100644 --- a/302/Assets/Scripts/AbstractBehaviour.cs +++ b/302/Assets/Scripts/AbstractBehaviour.cs @@ -24,12 +24,28 @@ void Awake() } } + void Start() + { + Log("Call `Start_` begin"); + if (Start_()) { + Log("Call `Start_` success"); + } else { + Log("Call `Start_` failed", mode: 1); + } + } + /******************* * virtual methods * *******************/ // `Awake` 메시지 용 메서드 protected virtual bool Awake_() + { + return true; + } + + // `Start` 메시지 용 메서드 + protected virtual bool Start_() { bool res = true; @@ -98,6 +114,17 @@ protected override bool Awake_() return res; } + // `Start` 메시지 용 메서드 + protected override bool Start_() + { + bool res = base.Start_(); + + // TODO: `Start` 메시지에서 해야할 것 넣기. 없으면 메서드를 아예 지워도 됨. + // 함수가 제대로 작동했으면 `true`를, 아니면 `false`를 반환. + + return res; + } + // 필드를 초기화하는 메서드 protected override bool InitFields() { @@ -141,6 +168,17 @@ protected override bool Awake_() return res; } + // `Start` 메시지 용 메서드 + protected override bool Start_() + { + bool res = base.Start_(); + + // TODO: `Start` 메시지에서 해야할 것 넣기. 없으면 메서드를 아예 지워도 됨. + // 함수가 제대로 작동했으면 `true`를, 아니면 `false`를 반환. + + return res; + } + // 필드를 초기화하는 메서드 protected override bool InitFields() { diff --git a/302/Assets/Scripts/AnomalyManager.cs b/302/Assets/Scripts/AnomalyManager.cs index 4e0e015..766f3f8 100644 --- a/302/Assets/Scripts/AnomalyManager.cs +++ b/302/Assets/Scripts/AnomalyManager.cs @@ -1,120 +1,209 @@ using UnityEngine; -using System.Collections; using System.Collections.Generic; -using UnityEngine.SceneManagement; -public class AnomalyManager : MonoBehaviour +public class AnomalyManager : AbstractStageObserver { + private HashSet ANOMALIES_NOT_YET = new HashSet { 4, 5, 7, 9, 14, 25, 26 }; + + /********** + * fields * + **********/ + + // 이상현상 컨트롤러 프리팹 + public GameObject[] prefabs; + + // 개수 + public int numStage; + public int numAnomaly; + + // 테스트용 수치 + public int testMode; + public int testAnomalyID; + + // 난수 + private SCH_Random _random; + + // 이상현상 색인 배열 + private int[] _anomalyList; + + /************** + * properties * + **************/ + + // 클래스 이름 + public override string Name { get; } = "AnomalyManager"; + + // 클래스 인스턴스 public static AnomalyManager Instance { get; private set; } - public GameObject[] anomalyPrefabs; // Anomaly1Manager ~ Anomaly31Manager 프리팹 보관용 리스트 - private List anomalyList = new List(); // 이상현상 리스트 - private const int AnomalyCount = 8; // 사이즈 8 - private System.Random random = new System.Random(); - public bool checkSpecificAnomaly; - public bool checkIntersect; - public int SpecificAnomalyNum; - public GameObject currentAnomalyInstance; // 현재 활성화된 이상현상 인스턴스 - // 하나의 AnomalyManager만 보장 - private void Awake() + + /************************************* + * implementation: AbstractBehaviour * + *************************************/ + + // `Awake` 메시지 용 메서드 + protected override bool Awake_() { - if (Instance == null) - { + bool res = false; + + if (Instance == null) { + Log($"`Instance` has not been set => set `Instance` as `{Name}`"); Instance = this; DontDestroyOnLoad(gameObject); - GenerateAnomalyList(); - } - else - { + res = base.Awake_(); + } else { + Log($"`Instance` has already been set => destroy `{gameObject.name}`"); Destroy(gameObject); } - // 프리팹이 설정되어 있는지 확인 - if (anomalyPrefabs == null || anomalyPrefabs.Length == 0) - { - Debug.LogError("Anomaly prefabs are missing! Please assign prefabs in the Inspector."); + + return res; + } + + // 필드를 초기화하는 메서드 + protected override bool InitFields() + { + bool res = base.InitFields(); + + _random = new SCH_Random(); + + _anomalyList = new int[numStage]; + + return res; + } + + /***************************************** + * implementation: AbstractStageObserver * + *****************************************/ + + // 단계 변경 시 불리는 메서드 + public override bool UpdateStage() + { + bool res = base.UpdateStage(); + + if (GameManager.Instance.Stage == 1) { + Log("Call `GenerateList` begin"); + if (GenerateList()) { + Log("Call `GenerateList` sucess"); + } else { + Log("Call `GenerateList` failed", mode: 1); + res = false; + } } + + return res; } - // 이상현상 리스트 생성 - private void GenerateAnomalyList() + + /*************** + * new methods * + ***************/ + + // 이상현상 컨트롤러를 생성 후 반환하는 메서드 + public AbstractAnomalyObject GetAnomalyController() { - anomalyList.Clear(); - HashSet uniqueNumbers = new HashSet(); - bool hasHighAnomaly = false; + GameObject obj; + AbstractAnomalyObject controller = null; + int stage = GameManager.Instance.Stage; - for (int i = 0; i < AnomalyCount; i++) - { - int anomaly; - if (!checkSpecificAnomaly) - { - do - { - anomaly = GenerateRandomAnomaly(); - } while (i > 0 && anomaly == anomalyList[i - 1] // 연속 방지 - || (anomaly != 0 && !uniqueNumbers.Add(anomaly))); // 중복 방지 - - if (anomaly >= 21) - { - hasHighAnomaly = true; - } + if (stage == 0) { + obj = Instantiate(prefabs[0]); + if (obj != null) { + controller = obj.GetComponent(); + } else { + Log($"Find `AbstractAnomalyObject` for {obj.name} failed", mode: 2); } - else - { - if(checkIntersect && i%2==1) anomaly = 0; - else anomaly = SpecificAnomalyNum; + } else if (stage > 0 && stage <= numStage) { + obj = Instantiate(prefabs[_anomalyList[stage - 1]]); + if (obj != null) { + controller = obj.GetComponent(); + } else { + Log($"Find `AbstractAnomalyObject` for {obj.name} failed", mode: 2); } - anomalyList.Add(anomaly); + } else { + Log($"Invalid stage: {stage}", mode: 2); } - if(!hasHighAnomaly) - { - int randomIndex = random.Next(0, AnomalyCount); - int highAnomaly = random.Next(21, 32); - anomalyList[randomIndex] = highAnomaly; - } - Debug.Log($"[AnomalyManager] Generated Anomaly List: {string.Join(", ", anomalyList)}"); + return controller; } - // 20% 확률로 0, 나머지 확률로 1~31의 이상현상을 생성 - private int GenerateRandomAnomaly() + + // 이상현상 색인 리스트를 생성하는 메서드 + private bool GenerateList() { - return random.Next(0, 100) < 20 ? 0 : random.Next(1, 31); + bool res = true; + + switch (testMode) { + case 0: + GenerateAnomalyListNormal(); + break; + case 1: + GenerateAnomalyListTest1(); + break; + case 2: + GenerateAnomalyListTest2(); + break; + default: + Log("Generate `_anomalyList` failed", mode: 1); + res = false; + break; + } + + return res; } - // 현재 스테이지에 맞는 이상현상을 로드 - public void CheckAndInstantiateAnomaly() + + // 일반 이상현상 색인 리스트를 생성하는 메서드 + private void GenerateAnomalyListNormal() { - int stageIndex = GameManager.Instance.GetCurrentStage() - 1; - if (stageIndex >= anomalyList.Count) - { - Debug.LogError("Invalid stage index in anomaly list."); - return; - } - else if (stageIndex == -1) - { - Debug.Log($"[AnomalyManager] Current Stage : {GameManager.Instance.GetCurrentStage()}"); - currentAnomalyInstance = Instantiate(anomalyPrefabs[0]); - return; - } - int anomaly = anomalyList[stageIndex]; - Debug.Log($"[AnomalyManager] Current Stage: {GameManager.Instance.GetCurrentStage()}, Anomaly Number: {anomaly}"); - // 특정 인덱스에 해당하는 이상현상 프리팹만 인스턴스화 - if (anomaly >= 0 && anomaly < anomalyPrefabs.Length && anomalyPrefabs[anomaly] != null) - { - currentAnomalyInstance = Instantiate(anomalyPrefabs[anomaly]); - if (currentAnomalyInstance == null) - { - Debug.LogError("Failed to instantiate anomaly prefab."); - } - else - { - Debug.Log("Anomaly instantiated successfully."); + bool hasHighAnomaly = false; + + while (!hasHighAnomaly) { + int idxLastZero = -2; + + _anomalyList = _random.Permutation(numAnomaly - 1, numStage); + for (int idx = 0; idx < numStage; idx++) { + if (idx - idxLastZero > 1 && _random.UniformDist(0.0, 1.0) < 0.2) { + // 직전 단계가 제0번이 아닌 경우 20 %의 확률로 제0번 생성 + _anomalyList[idx] = 0; + idxLastZero = idx; + } else { + // 0번을 위한 색인 조정 + _anomalyList[idx] += 1; + + if (ANOMALIES_NOT_YET.Contains(_anomalyList[idx])) { + _anomalyList[idx] = 0; + } + + // 적대적 이상현상 포함 확인 + if (_anomalyList[idx] > 20) { + hasHighAnomaly = true; + } + } } } - else - { - Debug.LogError($"Anomaly prefab for anomaly {anomaly} is missing or not assigned in the prefab list."); + + Log($"Generate `_anomalyList` success: [{string.Join(", ", _anomalyList)}]"); + } + + // 테스트용 이상현상 색인 리스트를 생성하는 메서드 1 + private void GenerateAnomalyListTest1() + { + for (int idx = 0; idx < numStage; idx++) { + // 원하는 이상현상이 계속 나오도록 + _anomalyList[idx] = testAnomalyID; } + + Log($"Generate `_anomalyList` success: [{string.Join(", ", _anomalyList)}]"); } - // 스테이지 실패 시 이상현상 리스트 재 생성 - public void ResetAnomaliesOnFailure() + + // 테스트용 이상현상 색인 리스트를 생성하는 메서드 2 + private void GenerateAnomalyListTest2() { - GenerateAnomalyList(); + for (int idx = 0; idx < numStage; idx++) { + // 원하는 이상현상과 제0번이 번갈아 나오도록 + if (idx % 2 == 0) { + _anomalyList[idx] = testAnomalyID; + } else { + _anomalyList[idx] = 0; + } + } + + Log($"Generate `_anomalyList` success: [{string.Join(", ", _anomalyList)}]"); } -} \ No newline at end of file +} diff --git a/302/Assets/Scripts/DefaultManager.cs b/302/Assets/Scripts/DefaultManager.cs deleted file mode 100644 index 99dc763..0000000 --- a/302/Assets/Scripts/DefaultManager.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class DefaultManager : MonoBehaviour -{ - // Start is called before the first frame update - void Start() - { - GameManager.Instance.SetStageClear(); - } - - // Update is called once per frame - void Update() - { - - } -} diff --git a/302/Assets/Scripts/EndingDoor.cs b/302/Assets/Scripts/EndingDoor.cs index a0b6515..91ca8a9 100644 --- a/302/Assets/Scripts/EndingDoor.cs +++ b/302/Assets/Scripts/EndingDoor.cs @@ -58,12 +58,6 @@ private IEnumerator StartEnding(GameObject player) yield return null; } - PlayerController playerController = player.GetComponent(); - if (playerController != null) - { - Destroy(playerController); - } - yield return new WaitForSeconds(1f); if (endingAudioSource != null && endingMusic != null) diff --git a/302/Assets/Scripts/FireExtinguisher.cs b/302/Assets/Scripts/FireExtinguisher.cs index b1ac161..c8ec3ce 100644 --- a/302/Assets/Scripts/FireExtinguisher.cs +++ b/302/Assets/Scripts/FireExtinguisher.cs @@ -1,4 +1,5 @@ using UnityEngine; +using UnityEngine.SceneManagement; public class FireExtinguisher : InteractableObject { @@ -50,27 +51,27 @@ private void Update() } } -private void CheckFireCollision() -{ - Collider[] hitColliders = Physics.OverlapSphere( - nozzle.transform.position, - extinguishRadius, - fireLayer - ); - - foreach (Collider col in hitColliders) + private void CheckFireCollision() { - Fire fire = col.GetComponent(); - if (fire != null) + Collider[] hitColliders = Physics.OverlapSphere( + nozzle.transform.position, + extinguishRadius, + fireLayer + ); + + foreach (Collider col in hitColliders) { - fire.StartExtinguishing(); // Extinguish() 대신 StartExtinguishing() 호출 + Fire fire = col.GetComponent(); + if (fire != null) + { + fire.StartExtinguishing(); // Extinguish() 대신 StartExtinguishing() 호출 + } } } -} private void PickUp() { - PlayerController player = FindObjectOfType(); + PlayerManager player = PlayerManager.Instance; if (player != null) { isHeld = true; @@ -92,7 +93,8 @@ public void PutDown() isHeld = false; transform.SetParent(null); - + SceneManager.MoveGameObjectToScene(gameObject, SceneManager.GetActiveScene()); + rb.isKinematic = false; coll.enabled = true; @@ -101,7 +103,7 @@ public void PutDown() transform.position = playerCameraTransform.position + playerCameraTransform.forward * 1f; transform.rotation = Quaternion.Euler(0f, transform.eulerAngles.y, 0f); - PlayerController player = FindObjectOfType(); + PlayerManager player = PlayerManager.Instance; if (player != null) { player.SetHeldItem(null); diff --git a/302/Assets/Scripts/GameManager.cs b/302/Assets/Scripts/GameManager.cs index 3ac7f11..0382ccb 100644 --- a/302/Assets/Scripts/GameManager.cs +++ b/302/Assets/Scripts/GameManager.cs @@ -10,7 +10,7 @@ public class GameManager : AbstractBehaviour // 신 이름 private const string DEFAULT_SCENE = "DefaultGameScene"; - private const string ENDING_SCENE = "GameEnding Scene"; + private const string ENDING_SCENE = "GameEndingScene"; /**************** * enumerations * @@ -20,10 +20,6 @@ public enum GameState { Playing, Ending, - - // deprecated states - Sleeping, - GameOver, Paused } @@ -31,8 +27,11 @@ public enum GameState * fields * **********/ + // 단계 수 + public int numStage; + // 이상현상 컨트롤러 -/* private AbstractAnomalyObject _anomalyController; */ + private AbstractAnomalyObject _anomalyController; /************** * properties * @@ -98,7 +97,7 @@ public bool SetStageClear() bool res = true; IsCleared = true; -/* if (_anomalyController != null) { + if (_anomalyController != null) { Log($"Call `{_anomalyController.Name}.ResetAnomaly` begin"); if (_anomalyController.ResetAnomaly()) { Log($"Call `{_anomalyController.Name}.ResetAnomaly` success"); @@ -109,7 +108,7 @@ public bool SetStageClear() } else { Log($"Call `ResetAnomaly` of the anomaly controller failed", mode: 2); res = false; - } */ + } return res; } @@ -119,14 +118,6 @@ public bool Sleep() { bool res = true; -/* Log("Call `PlayerManager.Sleep` begin"); - if (PlayerManager.Instance.Sleep()) { - Log("Call `PlayerManager.Sleep` success"); - } else { - Log("Call `PlayerManager.Sleep` failed", mode: 2); - res = false; - } */ - if (IsCleared) { Log("Stage clear => next stage"); Stage++; @@ -136,7 +127,7 @@ public bool Sleep() Stage = 1; } - if (Stage <= 8) { + if (Stage <= numStage) { Log("Call `StartStage` asynchronously"); StartCoroutine(StartStage()); } else { @@ -157,14 +148,6 @@ public bool GameOver() { bool res = true; -/* Log("Call `PlayerManager.GameOver` begin"); - if (PlayerManager.Instance.GameOver()) { - Log("Call `PlayerManager.GameOver` success"); - } else { - Log("Call `PlayerManager.GameOver` failed", mode: 2); - res = false; - } */ - Stage = 1; IsCleared = false; @@ -191,22 +174,9 @@ private IEnumerator StartStage() for (int idx = 0; idx < observers.Length; idx++) { observers[idx].UpdateStage(); } - if (Stage == 1) { - AnomalyManager.Instance.ResetAnomaliesOnFailure(); - } - -/* _anomalyController = AnomalyManager.Instance.GetAnomalyController(); - _anomalyController.StartAnomaly(); */ - AnomalyManager.Instance.CheckAndInstantiateAnomaly(); -/* Log("Call `PlayerManager.WakeUp` begin"); - if (PlayerManager.Instance.WakeUp()) { - Log("Call `PlayerManager.WakeUp` success"); - } else { - Log("Call `PlayerManager.WakeUp` failed", mode: 2); - res = false; - } */ - FindObjectOfType().WakeUp(); + _anomalyController = AnomalyManager.Instance.GetAnomalyController(); + _anomalyController.StartAnomaly(); } // 엔딩을 시작하는 메서드 @@ -220,6 +190,24 @@ private bool StartEnding() return res; } + // 일시정지하는 메서드 + public void PauseGame() + { + if (State == GameState.Playing) { + State = GameState.Paused; + Time.timeScale = 0.0f; + } + } + + // 재개하는 메서드 + public void ResumeGame() + { + if (State == GameState.Paused) { + State = GameState.Playing; + Time.timeScale = 1.0f; + } + } + /********************** * deprecated methods * **********************/ @@ -259,20 +247,4 @@ public void RestartGame() Log("Call `StartStage` asynchronously"); StartCoroutine(StartStage()); } - - public void PauseGame() - { - if (State == GameState.Playing) { - State = GameState.Paused; - Time.timeScale = 0; - } - } - - public void ResumeGame() - { - if (State == GameState.Paused) { - State = GameState.Playing; - Time.timeScale = 1; - } - } } diff --git a/302/Assets/Scripts/InteractionController.cs b/302/Assets/Scripts/InteractionController.cs deleted file mode 100644 index 903c25a..0000000 --- a/302/Assets/Scripts/InteractionController.cs +++ /dev/null @@ -1,87 +0,0 @@ -using UnityEngine; -using UnityEngine.UI; - -public class InteractionController : MonoBehaviour -{ - [SerializeField] private float interactionRange = 6f; - [SerializeField] private LayerMask interactableLayer; - [SerializeField] private Image interactionCursor; - - private Camera playerCamera; - private IInteractable currentInteractable; - - private void Start() - { - playerCamera = GetComponentInChildren(); - if(playerCamera == null) - Debug.LogError("Camera not found!"); - - if(interactionCursor == null) - Debug.LogError("Cursor image not assigned!"); - else - interactionCursor.gameObject.SetActive(false); - - // 레이어마스크 값 확인 - Debug.Log($"LayerMask value: {interactableLayer.value}"); - } - - private void Update() - { - Ray ray = playerCamera.ViewportPointToRay(new Vector3(0.5f, 0.5f, 0f)); - RaycastHit hit; - - // 모든 레이어에 대한 레이캐스트 먼저 체크 - if (Physics.Raycast(ray, out hit, interactionRange)) - { - // Debug.Log($"Hit something: {hit.collider.gameObject.name} on layer: {hit.collider.gameObject.layer}"); - } - - // Interactable 레이어에 대한 레이캐스트 - if (Physics.Raycast(ray, out hit, interactionRange, interactableLayer)) - { - // Debug.Log($"Hit interactable: {hit.collider.gameObject.name}"); - - IInteractable interactable = hit.collider.GetComponent(); - // modified by 신채환 - // CanInteract 메서드가 거리를 인자로 받도록 변경 - if (interactable != null && interactable.CanInteract(hit.distance)) - { - currentInteractable = interactable; - interactionCursor.gameObject.SetActive(true); - - if (Input.GetMouseButtonDown(0)) - { - currentInteractable.OnInteract(); - } - return; - } - } - - // 아무것도 못 찾았을 때 - if (currentInteractable != null || interactionCursor.gameObject.activeSelf) - { - currentInteractable = null; - interactionCursor.gameObject.SetActive(false); - } - } - - private void OnDrawGizmos() - { - if (playerCamera == null) return; - - Ray ray = playerCamera.ViewportPointToRay(new Vector3(0.5f, 0.5f, 0f)); - RaycastHit hit; - - if (Physics.Raycast(ray, out hit, interactionRange)) - { - Gizmos.color = Color.green; - Gizmos.DrawLine(ray.origin, hit.point); - Gizmos.DrawWireSphere(hit.point, 0.1f); - } - else - { - Gizmos.color = Color.red; - Gizmos.DrawRay(ray.origin, ray.direction * interactionRange); - } - } -} \ No newline at end of file diff --git a/302/Assets/Scripts/InteractionManager.cs b/302/Assets/Scripts/InteractionManager.cs new file mode 100644 index 0000000..afded85 --- /dev/null +++ b/302/Assets/Scripts/InteractionManager.cs @@ -0,0 +1,111 @@ +using UnityEngine; +using UnityEngine.UI; + +public class InteractionManager : AbstractStageObserver +{ + /********** + * fields * + **********/ + + [SerializeField] private float distanceInteractionMax; + [SerializeField] private LayerMask layer; + + private Camera playerCamera; + private Image cursor; + + /************** + * properties * + **************/ + + // 클래스 이름 + public override string Name { get; } = "InteractionManager"; + + /************ + * messages * + ************/ + + void OnDrawGizmos() + { + if (playerCamera != null) { + Ray ray = playerCamera.ViewportPointToRay(new Vector3(0.5f, 0.5f, 0.0f)); + RaycastHit hit; + + if (Physics.Raycast(ray, out hit, distanceInteractionMax)) { + Gizmos.color = Color.green; + Gizmos.DrawLine(ray.origin, hit.point); + Gizmos.DrawWireSphere(hit.point, 0.1f); + } else { + Gizmos.color = Color.red; + Gizmos.DrawRay(ray.origin, ray.direction * distanceInteractionMax); + } + } + } + + void Update() + { + if (cursor != null) { + if (PlayerManager.Instance.State == PlayerManager.PlayerState.Normal) { + Ray ray = playerCamera.ViewportPointToRay(new Vector3(0.5f, 0.5f, 0.0f)); + RaycastHit hit; + + if (Physics.Raycast(ray, out hit, distanceInteractionMax, layer)) { + IInteractable interactable = hit.collider.GetComponent(); + + if (interactable != null && interactable.CanInteract(hit.distance)) { + cursor.gameObject.SetActive(true); + if (Input.GetMouseButtonDown(0)) { + interactable.OnInteract(); + } + + return; + } + } + } + + cursor.gameObject.SetActive(false); + } + } + + /************************************* + * implementation: AbstractBehaviour * + *************************************/ + + // 필드를 초기화하는 메서드 + protected override bool InitFields() + { + bool res = base.InitFields(); + + playerCamera = GetComponentInChildren(); + if (playerCamera != null) { + Log($"Find `Camera` success: {playerCamera.name}"); + } else { + Log("Find `Camera` failed"); + } + + return res; + } + + /***************************************** + * implementation: AbstractStageObserver * + *****************************************/ + + // 단계 변경 시 불리는 메서드 + public override bool UpdateStage() + { + GameObject obj = GameObject.Find("Cursor"); + bool res = base.UpdateStage(); + + if (obj != null) { + cursor = obj.GetComponent(); + if (cursor != null) { + Log("Find `Image` success"); + } else { + Log("Find `Image` failed", mode: 1); + } + } else { + Log("Find `Image` failed", mode: 1); + } + + return res; + } +} diff --git a/302/Assets/Scripts/InteractionController.cs.meta b/302/Assets/Scripts/InteractionManager.cs.meta similarity index 100% rename from 302/Assets/Scripts/InteractionController.cs.meta rename to 302/Assets/Scripts/InteractionManager.cs.meta diff --git a/302/Assets/Scripts/MainSpotlight.cs b/302/Assets/Scripts/MainSpotlight.cs index 87c343d..43b0085 100644 --- a/302/Assets/Scripts/MainSpotlight.cs +++ b/302/Assets/Scripts/MainSpotlight.cs @@ -19,7 +19,6 @@ public class MainSpotlight : InteractableObject [SerializeField] private float spotAngle = 35f; private Light spotLight; - private PlayerController playerController; private Camera playerCamera; private bool isDancing = false; private Vector3 originalPlayerPosition; @@ -47,13 +46,12 @@ private void SetupLight() private void Start() { promptMessage = "클릭하여 춤추기"; - playerController = FindObjectOfType(); - playerCamera = playerController.GetComponentInChildren(); + playerCamera = PlayerManager.Instance.GetComponentInChildren(); } public override void OnInteract() { - if (!isDancing && playerController != null) + if (!isDancing && PlayerManager.Instance != null) { StartCoroutine(DanceSequence()); GameManager.Instance.SetStageClear(); @@ -65,22 +63,22 @@ private IEnumerator DanceSequence() isDancing = true; canInteract = false; - originalPlayerPosition = playerController.transform.position; - playerController.enabled = false; + originalPlayerPosition = PlayerManager.Instance.transform.position; + PlayerManager.Instance.SetSpecialState(true); // 춤출 위치로 이동 float moveProgress = 0f; while (moveProgress < 1f) { moveProgress += Time.deltaTime * moveSpeed; - playerController.transform.position = Vector3.Lerp( + PlayerManager.Instance.transform.position = Vector3.Lerp( originalPlayerPosition, dancePosition, moveProgress ); // -X축을 바라보도록 회전하고 카메라 각도 조정 - playerController.transform.rotation = Quaternion.Euler(0f, 270f, 0f); + PlayerManager.Instance.transform.rotation = Quaternion.Euler(0f, 270f, 0f); playerCamera.transform.localRotation = Quaternion.Euler(0f, 0f, 0f); // 정면을 바라보도록 yield return null; @@ -105,11 +103,11 @@ private IEnumerator DanceSequence() new Vector3(0f, bobOffset, swayOffset) + transform.forward * forwardOffset; - playerController.transform.position = newPosition; + PlayerManager.Instance.transform.position = newPosition; // 미세한 좌우 회전 float rotationOffset = Mathf.Sin(danceTimer * swaySpeed) * 15f; - playerController.transform.rotation = Quaternion.Euler(0f, 270f + rotationOffset, 0f); + PlayerManager.Instance.transform.rotation = Quaternion.Euler(0f, 270f + rotationOffset, 0f); playerCamera.transform.localRotation = Quaternion.Euler(0f, 0f, 0f); // 계속 정면 유지 yield return null; @@ -120,14 +118,14 @@ private IEnumerator DanceSequence() while (moveProgress < 1f) { moveProgress += Time.deltaTime * moveSpeed; - playerController.transform.position = Vector3.Lerp( - playerController.transform.position, + PlayerManager.Instance.transform.position = Vector3.Lerp( + PlayerManager.Instance.transform.position, originalPlayerPosition, moveProgress ); - playerController.transform.rotation = Quaternion.Lerp( - playerController.transform.rotation, + PlayerManager.Instance.transform.rotation = Quaternion.Lerp( + PlayerManager.Instance.transform.rotation, Quaternion.Euler(0f, 0f, 0f), moveProgress ); @@ -135,7 +133,7 @@ private IEnumerator DanceSequence() yield return null; } - playerController.enabled = true; + PlayerManager.Instance.SetSpecialState(false); isDancing = false; canInteract = true; } diff --git a/302/Assets/Scripts/PlayerManager.cs b/302/Assets/Scripts/PlayerManager.cs new file mode 100644 index 0000000..d5e0853 --- /dev/null +++ b/302/Assets/Scripts/PlayerManager.cs @@ -0,0 +1,555 @@ +using UnityEngine; +using System.Collections; + +public class PlayerManager : AbstractStageObserver +{ + /**************** + * enumerations * + ****************/ + + public enum PlayerState + { + Normal, + Waking, + Sleeping, + GameOver, + Special + } + + /********** + * fields * + **********/ + + [Header("Movement")] + public float walkSpeed; + public float runSpeed; + + [Header("Camera")] + public float mouseSensitivity; + public float maxVerticalAngle; + public float minVerticalAngle; + public float walkBobSpeed; + public float walkBobAmount; + public float runBobSpeed; + public float runBobAmount; + public float cameraHeight; + + [Header("Audio Settings")] + public AudioClip footstepSound; + [Range(0f, 1f)] public float walkVolume; + [Range(0f, 1f)] public float runVolume; + public float walkPitch; + public float runPitch; + + [Header("Footsteps")] + public float walkStepInterval; + public float runStepInterval; + + [Header("Sleep Animation")] + public float sleepAnimationDuration; + public float wakeUpAnimationDuration; + public float sleepCameraAngle; // 완전히 아래를 보는 각도 + public float sleepCameraHeight; // 엎드렸을 때의 카메라 높이 + + [Header("Death Animation")] + public float deathAnimationDuration = 2f; + public float deathCameraAngle; // 뒤로 넘어갈 때의 각도 + public float deathCameraHeight; // 쓰러졌을 때의 카메라 높이 + + private Camera playerCamera; + private FireExtinguisher heldItem; + private Rigidbody rb; + private CapsuleCollider capsuleCollider; + private AudioSource audioSource; + private ScreenFader screenFader; + private float verticalRotation; + private float currentSpeed; + private float stepTimer; + private float bobTimer; + private Vector3 originalCameraPos; + private Vector3 moveDirection; + private bool isMoving; + + /************** + * properties * + **************/ + + // 클래스 이름 + public override string Name { get; } = "PlayerManager"; + + // 클래스 인스턴스 + public static PlayerManager Instance { get; private set; } + + // 플레이어 상태 + public PlayerState State { get; private set; } + + /************ + * messages * + ************/ + + void FixedUpdate() + { + if (State == PlayerState.Normal) { + HandleMovement(); + } + } + + void Start() + { + SetupComponents(); + SetupPhysics(); + Cursor.lockState = CursorLockMode.Locked; + } + + void Update() + { + if (State == PlayerState.Normal) { + HandleInput(); + HandleCamera(); + } + } + + /************************************ + * implementaion: AbstractBehaviour * + ************************************/ + + // `Awake` 메시지 용 메서드 + protected override bool Awake_() + { + bool res = false; + + if (Instance == null) { + Log($"`Instance` has not been set => set `Instance` as `{Name}`"); + Instance = this; + DontDestroyOnLoad(gameObject); + res = base.Awake_(); + } else { + Log($"`Instance` has already been set => destroy `{gameObject.name}`"); + Destroy(gameObject); + } + + return res; + } + + // 필드를 초기화하는 메서드 + protected override bool InitFields() + { + bool res = base.InitFields(); + + screenFader = FindObjectOfType(); + if (screenFader == null) { + GameObject obj = new GameObject("ScreenFader"); + + screenFader = obj.AddComponent(); + } + + return res; + } + + /***************************************** + * implementation: AbstractStageObserver * + *****************************************/ + + // 단계 변경 시 불리는 메서드 + public override bool UpdateStage() + { + bool res = base.UpdateStage(); + + Log("Call `WakeUpAnimation` asynchronously"); + StartCoroutine(WakeUpAnimation()); + + return res; + } + + /*************** + * new methods * + ***************/ + + // 잠들 시 호출되는 메서드 + public bool Sleep() + { + bool res = true; + + if (State == PlayerState.Normal) { + Log("`State` is `PlayerState.Normal` => Call `SleepAnimation` asynchronously"); + StartCoroutine(SleepAnimation()); + } else { + Log("`State` is not `PlayerState.Normal` => Ignore"); + } + + return res; + } + + // 게임오버 시 호출되는 메서드 + public bool GameOver() + { + bool res = true; + + if (State == PlayerState.Normal) { + Log("`State` is `PlayerState.Normal` => Call `DeathAnimation` asynchronously"); + StartCoroutine(DeathAnimation()); + } else { + Log("`State` is not `PlayerState.Normal` => Ignore"); + } + + return res; + } + + // 특수 상태로 변경하는 메서드 + public bool SetSpecialState(bool state) + { + bool res = true; + + if (state) { + if (State == PlayerState.Normal) { + State = PlayerState.Special; + } else { + res = false; + } + } else { + if (State == PlayerState.Special) { + State = PlayerState.Normal; + } else { + res = false; + } + } + + return res; + } + + //// Setup + + private void SetupComponents() + { + playerCamera = GetComponentInChildren(); + playerCamera.transform.localPosition = new Vector3(0, cameraHeight, 0); + originalCameraPos = playerCamera.transform.localPosition; + + rb = GetComponent(); + capsuleCollider = GetComponent(); + + audioSource = gameObject.AddComponent(); + audioSource.spatialBlend = 0f; + audioSource.playOnAwake = false; + } + + private void SetupPhysics() + { + rb.freezeRotation = true; + rb.useGravity = true; + rb.constraints = RigidbodyConstraints.FreezeRotation; + + capsuleCollider.height = cameraHeight * 1.2f; + capsuleCollider.radius = 0.15f; + capsuleCollider.center = new Vector3(0, cameraHeight * 0.6f, 0); + } + + //// Input & Movement + + private void HandleInput() + { + float horizontal = Input.GetAxisRaw("Horizontal"); + float vertical = Input.GetAxisRaw("Vertical"); + Vector3 input = new Vector3(horizontal, 0f, vertical).normalized; + + bool isRunning = Input.GetKey(KeyCode.LeftShift); + currentSpeed = isRunning ? runSpeed : walkSpeed; + + if (input.magnitude >= 0.1f) + { + moveDirection = input; + isMoving = true; + } + else + { + moveDirection = Vector3.zero; + isMoving = false; + if (audioSource.isPlaying) + { + audioSource.Stop(); + } + stepTimer = 0f; + } + + if (Input.GetKeyDown(KeyCode.I)) + { + Sleep(); + } + if (Input.GetKeyDown(KeyCode.O)) + { + GameManager.Instance.SetStageClear(); // 스테이지 클리어 설정 + Sleep(); // 잠자기 + } + if (Input.GetKeyDown(KeyCode.P)) + { + GameManager.Instance.SetCurrentStage(8); + GameManager.Instance.SetStageClear(); // 스테이지 클리어 설정 + Sleep(); // 잠자기 + } + // 테스트용 GameOver 키 추가 + if (Input.GetKeyDown(KeyCode.T)) + { + GameOver(); + } + } + + private void HandleMovement() + { + if (isMoving) + { + float targetAngle = Mathf.Atan2(moveDirection.x, moveDirection.z) * Mathf.Rad2Deg + + transform.eulerAngles.y; + + Vector3 moveDir = Quaternion.Euler(0f, targetAngle, 0f) * Vector3.forward; + Vector3 targetVelocity = moveDir * currentSpeed; + targetVelocity.y = rb.velocity.y; + + rb.velocity = Vector3.Lerp(rb.velocity, targetVelocity, Time.fixedDeltaTime * 15f); + + HandleFootsteps(); + } + else + { + Vector3 velocity = rb.velocity; + velocity.x = Mathf.Lerp(velocity.x, 0, Time.fixedDeltaTime * 15f); + velocity.z = Mathf.Lerp(velocity.z, 0, Time.fixedDeltaTime * 15f); + rb.velocity = velocity; + } + } + + //// Camera + + private void HandleCamera() + { + float mouseX = Input.GetAxis("Mouse X") * mouseSensitivity; + float mouseY = Input.GetAxis("Mouse Y") * mouseSensitivity; + + verticalRotation -= mouseY; + verticalRotation = Mathf.Clamp(verticalRotation, minVerticalAngle, maxVerticalAngle); + playerCamera.transform.localRotation = Quaternion.Euler(verticalRotation, 0f, 0f); + + transform.Rotate(Vector3.up * mouseX, Space.World); + + if (isMoving) + { + bool isRunning = Input.GetKey(KeyCode.LeftShift); + float bobAmount = isRunning ? runBobAmount : walkBobAmount; + float bobSpeed = isRunning ? runBobSpeed : walkBobSpeed; + + bobTimer += Time.deltaTime * bobSpeed; + + float verticalBob = Mathf.Sin(bobTimer) * bobAmount; + float horizontalBob = Mathf.Cos(bobTimer * 0.5f) * bobAmount * 0.5f; + + Vector3 targetPos = originalCameraPos + new Vector3(horizontalBob, verticalBob, 0); + playerCamera.transform.localPosition = Vector3.Lerp( + playerCamera.transform.localPosition, + targetPos, + Time.deltaTime * 4f + ); + } + else + { + playerCamera.transform.localPosition = Vector3.Lerp( + playerCamera.transform.localPosition, + originalCameraPos, + Time.deltaTime * 2f + ); + bobTimer = 0f; + } + } + + //// Animations + + // 일어나는 메서드 + private IEnumerator WakeUpAnimation() + { + float timeStart = Time.time; + float time; + + State = PlayerState.Waking; + + transform.position = new Vector3(8.9f, 0.0f, 13.45f); + transform.rotation = Quaternion.Euler(0.0f, 90.0f, 0.0f); + verticalRotation = 0.0f; + + screenFader.StartFade(0.0f, 0.0f); + + while ((time = Time.time - timeStart) < wakeUpAnimationDuration) { + Vector3 position; + float rotation; + float t = time / wakeUpAnimationDuration; + float smoothT = t * t * (3.0f + t * -2.0f); + + // 카메라 높이 변경 + position = playerCamera.transform.localPosition; + position.y = Mathf.Lerp(sleepCameraHeight, cameraHeight, smoothT); + playerCamera.transform.localPosition = position; + + // 카메라 각도 변경 + rotation = Mathf.Lerp(sleepCameraAngle, 0.0f, smoothT); + playerCamera.transform.localRotation = Quaternion.Euler(rotation, 0.0f, 0.0f); + + yield return null; + } + + State = PlayerState.Normal; + } + + // 잠이 드는 메서드 + private IEnumerator SleepAnimation() + { + float yInit = playerCamera.transform.localPosition.y; + float rInit = verticalRotation; + float timeStart = Time.time; + float time; + + State = PlayerState.Sleeping; + + // 화면 어두워지기 시작 + screenFader.StartFade(1.0f, sleepAnimationDuration); + + while ((time = Time.time - timeStart) < sleepAnimationDuration) { + Vector3 position; + float rotation; + float t = time / sleepAnimationDuration; + float smoothT = t * t * (3.0f + t * -2.0f); + + // 카메라 높이 변경 + position = playerCamera.transform.localPosition; + position.y = Mathf.Lerp(yInit, sleepCameraHeight, smoothT); + playerCamera.transform.localPosition = position; + + // 카메라 각도 변경 + rotation = Mathf.Lerp(rInit, sleepCameraAngle, smoothT); + playerCamera.transform.localRotation = Quaternion.Euler(rotation, 0.0f, 0.0f); + + yield return null; + } + + yield return new WaitForSeconds(1.5f); + + if (heldItem != null) { + heldItem.PutDown(); + } + + GameManager.Instance.Sleep(); + } + + // 죽는 메서드 + private IEnumerator DeathAnimation() + { + float yInit = playerCamera.transform.localPosition.y; + float zInit = playerCamera.transform.localPosition.z; + float rInit = verticalRotation; + float timeStart = Time.time; + float time; + + State = PlayerState.GameOver; + + // 화면 어두워지기 시작 + screenFader.StartFade(1.0f, deathAnimationDuration * 0.8f); + + while ((time = Time.time - timeStart) < deathAnimationDuration) { + Vector3 position; + float rotation; + float t = time / sleepAnimationDuration; + float smoothT = t * t * (3.0f + t * -2.0f); + + // 카메라 위치 변경 + position = playerCamera.transform.localPosition; + position.y = Mathf.Lerp(yInit, deathCameraHeight, smoothT); + position.z = Mathf.Lerp(zInit, -0.5f, smoothT); + + // 초반 흔들림 효과 + if (t < 0.3f) { + float shake = Mathf.Sin(t * 50) * (0.3f - t) * 0.05f; + + position += new Vector3(shake, shake, 0); + } + + playerCamera.transform.localPosition = position; + + // 카메라 각도 변경 + rotation = Mathf.Lerp(rInit, deathCameraAngle, smoothT); + playerCamera.transform.localRotation = Quaternion.Euler(rotation, 0.0f, 0.0f); + + yield return null; + } + + yield return new WaitForSeconds(1.0f); + + if (heldItem != null) { + heldItem.PutDown(); + } + + GameManager.Instance.GameOver(); + } + + //// Audio + + private void HandleFootsteps() + { + if (!isMoving) + { + if (audioSource.isPlaying) + { + audioSource.Stop(); + } + stepTimer = 0f; + return; + } + + bool isRunning = Input.GetKey(KeyCode.LeftShift); + + if (audioSource.isPlaying) + { + audioSource.volume = isRunning ? runVolume : walkVolume; + audioSource.pitch = isRunning ? runPitch : walkPitch; + } + + float currentStepInterval = isRunning ? runStepInterval : walkStepInterval; + stepTimer += Time.deltaTime; + + if (stepTimer >= currentStepInterval && !audioSource.isPlaying) + { + PlayFootstepSound(); + stepTimer = 0f; + } + } + + private void PlayFootstepSound() + { + if (footstepSound == null || audioSource == null) return; + + bool isRunning = Input.GetKey(KeyCode.LeftShift); + + audioSource.clip = footstepSound; + audioSource.volume = isRunning ? runVolume : walkVolume; + audioSource.pitch = isRunning ? runPitch : walkPitch; + audioSource.loop = false; + + audioSource.Play(); + } + + private void OnDisable() + { + if (audioSource != null && audioSource.isPlaying) + { + audioSource.Stop(); + } + } + + //// FireExtinguisher + + public void SetHeldItem(FireExtinguisher item) + { + heldItem = item; + } + + // 현재 아이템을 들고 있는지 확인 + public bool IsHoldingItem() + { + return heldItem != null; + } +} diff --git a/302/Assets/Scripts/DefaultManager.cs.meta b/302/Assets/Scripts/PlayerManager.cs.meta similarity index 83% rename from 302/Assets/Scripts/DefaultManager.cs.meta rename to 302/Assets/Scripts/PlayerManager.cs.meta index bcf368e..f683c23 100644 --- a/302/Assets/Scripts/DefaultManager.cs.meta +++ b/302/Assets/Scripts/PlayerManager.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 82bc633e53b744d7e9052bc7c316aa26 +guid: 6e34750f3735fc4449406d425cd429fe MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/302/Assets/Scripts/SCH_Random.cs b/302/Assets/Scripts/SCH_Random.cs index 2e1e883..2d551a5 100644 --- a/302/Assets/Scripts/SCH_Random.cs +++ b/302/Assets/Scripts/SCH_Random.cs @@ -49,7 +49,7 @@ public double LogNormalDist(double mu, double sigma) } // 정규 분포 - public double NormalDist(double mu = 0.0, double sigma = 0.0) + public double NormalDist(double mu = 0.0, double sigma = 1.0) { double u1, u2, z, zz; @@ -66,6 +66,31 @@ public double NormalDist(double mu = 0.0, double sigma = 0.0) return mu + z * sigma; } + // 순열 + public int[] Permutation(int n, int r) + { + int[] candidates = new int[n]; + int[] result = new int[r]; + + for (int i = 0; i < n; i++) { + candidates[i] = i; + } + + for (int i = 0; i < r; i++) { + int index = Next(i, n); + + result[i] = candidates[index]; + if (index != i) { + int tmp = candidates[i]; + + candidates[i] = candidates[index]; + candidates[index] = tmp; + } + } + + return result; + } + // 삼각 분포 public double TriangularDist(double low = 0.0, double high = 1.0, double mode = 0.5) { @@ -89,4 +114,10 @@ public double TriangularDist(double low = 0.0, double high = 1.0, double mode = return low + (high - low) * Math.Sqrt(u * c); } + + // 균등 분포 + public double UniformDist(double a, double b) + { + return a + (b - a) * Sample(); + } } diff --git a/302/Assets/Scripts/SleepLaptop.cs b/302/Assets/Scripts/SleepLaptop.cs index 5ca424b..dcf035b 100644 --- a/302/Assets/Scripts/SleepLaptop.cs +++ b/302/Assets/Scripts/SleepLaptop.cs @@ -6,7 +6,6 @@ public class SleepLaptop : InteractableObject { [Header("Laptop Settings")] [SerializeField] private string sleepPrompt = "노트북으로 잠자기"; - [SerializeField] private PlayerController playerController; public bool setStageClear = false; private void Awake() @@ -19,15 +18,10 @@ public override void OnInteract() { base.OnInteract(); - // playerController가 null이 아닌지 확인 - if (playerController != null) - { - if(setStageClear) {GameManager.Instance.SetStageClear();} - playerController.Sleep(); - } - else - { - Debug.LogError("PlayerController가 설정되지 않았습니다. Inspector에서 설정해주세요!"); + if (setStageClear) { + GameManager.Instance.SetStageClear(); } + + PlayerManager.Instance.Sleep(); } } \ No newline at end of file diff --git a/302/Assets/Scripts/SleepManager.cs b/302/Assets/Scripts/SleepManager.cs deleted file mode 100644 index 3a08cb8..0000000 --- a/302/Assets/Scripts/SleepManager.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class SleepManager : MonoBehaviour -{ - // Start is called before the first frame update - void Start() - { - - } - - // Update is called once per frame - void Update() - { - - } -} diff --git a/302/Assets/Scripts/SlideManager.cs b/302/Assets/Scripts/SlideManager.cs index 78c2afa..4504102 100644 --- a/302/Assets/Scripts/SlideManager.cs +++ b/302/Assets/Scripts/SlideManager.cs @@ -84,6 +84,7 @@ protected override bool InitFields() * implementation: AbstractStageObserver * *****************************************/ + // 단계 변경 시 불리는 메서드 public override bool UpdateStage() { int stage = GameManager.Instance.GetCurrentStage(); diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly13_normaleye.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly00Controller.cs similarity index 55% rename from 302/Assets/Scripts/SpecificAnomalyManager/Anomaly13_normaleye.cs rename to 302/Assets/Scripts/SpecificAnomalyManager/Anomaly00Controller.cs index d7bb932..21e07b8 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly13_normaleye.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly00Controller.cs @@ -1,19 +1,11 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class Anomaly13_normaleye : AbstractAnomalyObject +public class Anomaly00Controller : AbstractAnomalyObject { - /********** - * fields * - **********/ - /************** * properties * **************/ // 클래스 이름 - public override string Name { get; } = "Anomaly13_normaleye"; + public override string Name { get; } = "Anomaly00Controller"; /***************************************** * implementation: AbstractAnomalyObject * @@ -24,8 +16,7 @@ public override bool StartAnomaly() { bool res = base.StartAnomaly(); - gameObject.SetActive(false); - Log("Deleted normal eye."); + GameManager.Instance.SetStageClear(); return res; } diff --git a/302/Assets/Scripts/SleepManager.cs.meta b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly00Controller.cs.meta similarity index 83% rename from 302/Assets/Scripts/SleepManager.cs.meta rename to 302/Assets/Scripts/SpecificAnomalyManager/Anomaly00Controller.cs.meta index ba5b195..974d763 100644 --- a/302/Assets/Scripts/SleepManager.cs.meta +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly00Controller.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ad0169ce8cb86435e9143b334ac9f4bb +guid: 103d4e2d80438de4d8d26e138c2b3080 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly01Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly01Controller.cs index 6416987..28b568d 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly01Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly01Controller.cs @@ -6,26 +6,4 @@ public class Anomaly01Controller : AbstractAnomalyComposite // 클래스 이름 public override string Name { get; } = "Anomaly01Controller"; - - /************************************* - * implementation: AbstractBehaviour * - *************************************/ - - // `Awake` 메시지 용 메서드 - protected override bool Awake_() - { - bool res = base.Awake_(); - - // Code used before `GameManager` updates begin - Log("Call `StartAnomaly` begin"); - if (StartAnomaly()) { - Log("Call `StartAnomaly` success"); - } else { - Log("Call `StartAnomaly` failed", mode: 1); - res = false; - } - // Code used before `GameManager` updates end - - return res; - } } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly01Girl.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly01Girl.cs index db570b2..515998e 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly01Girl.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly01Girl.cs @@ -22,18 +22,6 @@ public override void OnInteract() Log("Call `GameManager.SetStageClear` begin"); GameManager.Instance.SetStageClear(); Log("Call `GameManager.SetStageClear` end"); - - // Code used before `GameManager` updates begin - GameObject controllerObject = GameObject.Find("AnomalyManager (1)(Clone)"); - AbstractAnomalyObject controller = controllerObject.GetComponent(); - - Log($"Call `{controller.Name}.ResetAnomaly` begin"); - if (controller.ResetAnomaly()) { - Log($"Call `{controller.Name}.ResetAnomaly` success"); - } else { - Log($"Call `{controller.Name}.ResetAnomaly` failed", mode: 1); - } - // Code used before `GameManager` updates end } /***************************************** diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly02Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly02Controller.cs index c86479c..a534b92 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly02Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly02Controller.cs @@ -6,26 +6,4 @@ public class Anomaly02Controller : AbstractAnomalyComposite // 클래스 이름 public override string Name { get; } = "Anomaly02Controller"; - - /************************************* - * implementation: AbstractBehaviour * - *************************************/ - - // `Awake` 메시지 용 메서드 - protected override bool Awake_() - { - bool res = base.Awake_(); - - // Code used before `GameManager` updates begin - Log("Call `StartAnomaly` begin"); - if (StartAnomaly()) { - Log("Call `StartAnomaly` success"); - } else { - Log("Call `StartAnomaly` failed", mode: 1); - res = false; - } - // Code used before `GameManager` updates end - - return res; - } } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly02Laptop.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly02Laptop.cs index 4afdaa5..3e82e66 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly02Laptop.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly02Laptop.cs @@ -32,18 +32,6 @@ public override void OnInteract() Log("Call `GameManager.SetStageClear` begin"); GameManager.Instance.SetStageClear(); Log("Call `GameManager.SetStageClear` end"); - - // Code used before `GameManager` updates begin - GameObject controllerObject = GameObject.Find("AnomalyManager (2)(Clone)"); - AbstractAnomalyObject controller = controllerObject.GetComponent(); - - Log($"Call `{controller.Name}.ResetAnomaly` begin"); - if (controller.ResetAnomaly()) { - Log($"Call `{controller.Name}.ResetAnomaly` success"); - } else { - Log($"Call `{controller.Name}.ResetAnomaly` failed", mode: 1); - } - // Code used before `GameManager` updates end } /************************************* diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly03Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly03Controller.cs index f873934..c992f64 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly03Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly03Controller.cs @@ -4,26 +4,4 @@ public class Anomaly03Controller : AbstractAnomalyComposite { // 클래스 이름 public override string Name { get; } = "Anomaly03Controller"; - - /************************************* - * implementation: AbstractBehaviour * - *************************************/ - - // `Awake` 메시지 용 메서드 - protected override bool Awake_() - { - bool res = base.Awake_(); - - // Code used before `GameManager` updates begin - Log("Call `StartAnomaly` begin"); - if (StartAnomaly()) { - Log("Call `StartAnomaly` success"); - } else { - Log("Call `StartAnomaly` failed", mode: 1); - res = false; - } - // Code used before `GameManager` updates end - - return res; - } } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly03_noHeadSitGirl.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly03_noHeadSitGirl.cs index 08a3d49..247a14f 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly03_noHeadSitGirl.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly03_noHeadSitGirl.cs @@ -19,18 +19,6 @@ public virtual void OnInteract() Log("Call `GameManager.SetStageClear` begin"); GameManager.Instance.SetStageClear(); Log("Call `GameManager.SetStageClear` end"); - - // Code used before `GameManager` updates begin - GameObject controllerObject = GameObject.Find("AnomalyManager (3)(Clone)"); - AbstractAnomalyObject controller = controllerObject.GetComponent(); - - Log($"Call `{controller.Name}.ResetAnomaly` begin"); - if (controller.ResetAnomaly()) { - Log($"Call `{controller.Name}.ResetAnomaly` success"); - } else { - Log($"Call `{controller.Name}.ResetAnomaly` failed", mode: 1); - } - // Code used before `GameManager` updates end } // 현재 상호작용 가능한지 여부 반환 diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly06Cake.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly06Cake.cs index 9892f30..f575054 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly06Cake.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly06Cake.cs @@ -28,18 +28,6 @@ public override void OnInteract() Log("Call `GameManager.SetStageClear` begin"); GameManager.Instance.SetStageClear(); Log("Call `GameManager.SetStageClear` end"); - - // Code used before `GameManager` updates begin - GameObject controllerObject = GameObject.Find("AnomalyManager (6)(Clone)"); - AbstractAnomalyObject controller = controllerObject.GetComponent(); - - Log($"Call `{controller.Name}.ResetAnomaly` begin"); - if (controller.ResetAnomaly()) { - Log($"Call `{controller.Name}.ResetAnomaly` success"); - } else { - Log($"Call `{controller.Name}.ResetAnomaly` failed", mode: 1); - } - // Code used before `GameManager` updates end } /***************************************** diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly06Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly06Controller.cs index 4e98fcf..a44c82d 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly06Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly06Controller.cs @@ -6,26 +6,4 @@ public class Anomaly06Controller : AbstractAnomalyComposite // 클래스 이름 public override string Name { get; } = "Anomaly06Controller"; - - /************************************* - * implementation: AbstractBehaviour * - *************************************/ - - // `Awake` 메시지 용 메서드 - protected override bool Awake_() - { - bool res = base.Awake_(); - - // Code used before `GameManager` updates begin - Log("Call `StartAnomaly` begin"); - if (StartAnomaly()) { - Log("Call `StartAnomaly` success"); - } else { - Log("Call `StartAnomaly` failed", mode: 1); - res = false; - } - // Code used before `GameManager` updates end - - return res; - } } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly07_Gun.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly07_Gun.cs index 8810b2c..e23cf99 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly07_Gun.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly07_Gun.cs @@ -26,7 +26,6 @@ public class Anomaly07_Gun : AbstractAnomalyInteractable private Quaternion originalRotation; private bool isAnimating = false; private Transform playerCameraTransform; - private PlayerController playerController; private Camera playerCamera; // 플래시 효과 관련 변수 @@ -90,84 +89,78 @@ public override bool CanInteract(float distance) } private IEnumerator RussianRouletteSequence() -{ - isAnimating = true; - - playerController = FindObjectOfType(); - playerCamera = playerController.GetComponentInChildren(); - playerCameraTransform = playerCamera.transform; - - playerController.enabled = false; - - // 총을 들어올리는 애니메이션 - float elapsedTime = 0f; - Vector3 startPosition = transform.position; - Quaternion startRotation = transform.rotation; - - while (elapsedTime < animationDuration) { - elapsedTime += Time.deltaTime; - float t = elapsedTime / animationDuration; - float smoothT = t * t * (3f - 2f * t); - - Vector3 targetPosition = playerCameraTransform.TransformPoint(holdPosition); - Quaternion targetRotation = playerCameraTransform.rotation * Quaternion.Euler(holdRotation); + isAnimating = true; - transform.position = Vector3.Lerp(startPosition, targetPosition, smoothT); - transform.rotation = Quaternion.Slerp(startRotation, targetRotation, smoothT); + playerCamera = PlayerManager.Instance.GetComponentInChildren(); + playerCameraTransform = playerCamera.transform; - yield return null; - } - - audioSource.PlayOneShot(chamberSpinSound); - yield return new WaitForSeconds(1f); - - bool survive = Random.value > 0.2f; - - if (!survive) - { - audioSource.PlayOneShot(gunShotSound); - - // 총소리가 완전히 재생되도록 약간 대기 - yield return new WaitForSeconds(2.2f); - StartCoroutine(FlashScreen()); - // GameOver를 별도의 코루틴으로 실행 - StartCoroutine(DelayedGameOver()); - } - else - { - yield return new WaitForSeconds(returnDelay); + PlayerManager.Instance.SetSpecialState(true); - // 총을 원래 위치로 - elapsedTime = 0f; - startPosition = transform.position; - startRotation = transform.rotation; + // 총을 들어올리는 애니메이션 + float elapsedTime = 0f; + Vector3 startPosition = transform.position; + Quaternion startRotation = transform.rotation; - while (elapsedTime < animationDuration) - { + while (elapsedTime < animationDuration) { elapsedTime += Time.deltaTime; float t = elapsedTime / animationDuration; float smoothT = t * t * (3f - 2f * t); - transform.position = Vector3.Lerp(startPosition, originalPosition, smoothT); - transform.rotation = Quaternion.Slerp(startRotation, originalRotation, smoothT); + Vector3 targetPosition = playerCameraTransform.TransformPoint(holdPosition); + Quaternion targetRotation = playerCameraTransform.rotation * Quaternion.Euler(holdRotation); + + transform.position = Vector3.Lerp(startPosition, targetPosition, smoothT); + transform.rotation = Quaternion.Slerp(startRotation, targetRotation, smoothT); yield return null; } - GameManager.Instance.SetStageClear(); - playerController.enabled = true; - } + audioSource.PlayOneShot(chamberSpinSound); + yield return new WaitForSeconds(1f); - isAnimating = false; -} + bool survive = Random.value > 0.2f; -private IEnumerator DelayedGameOver() -{ - // GameOver가 총소리보다 먼저 실행되지 않도록 약간의 딜레이 - yield return new WaitForSeconds(0.15f); - playerController.GameOver(); -} + if (!survive) { + audioSource.PlayOneShot(gunShotSound); + + // 총소리가 완전히 재생되도록 약간 대기 + yield return new WaitForSeconds(2.2f); + StartCoroutine(FlashScreen()); + // GameOver를 별도의 코루틴으로 실행 + StartCoroutine(DelayedGameOver()); + } else { + yield return new WaitForSeconds(returnDelay); + + // 총을 원래 위치로 + elapsedTime = 0f; + startPosition = transform.position; + startRotation = transform.rotation; + + while (elapsedTime < animationDuration) { + elapsedTime += Time.deltaTime; + float t = elapsedTime / animationDuration; + float smoothT = t * t * (3f - 2f * t); + + transform.position = Vector3.Lerp(startPosition, originalPosition, smoothT); + transform.rotation = Quaternion.Slerp(startRotation, originalRotation, smoothT); + + yield return null; + } + + GameManager.Instance.SetStageClear(); + PlayerManager.Instance.SetSpecialState(false); + } + + isAnimating = false; + } + + private IEnumerator DelayedGameOver() + { + // GameOver가 총소리보다 먼저 실행되지 않도록 약간의 딜레이 + yield return new WaitForSeconds(0.15f); + PlayerManager.Instance.GameOver(); + } private void OnPostRenderCallback(Camera cam) { diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly08Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly08Controller.cs index 7fb4dca..bebc958 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly08Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly08Controller.cs @@ -4,22 +4,4 @@ public class Anomaly08Controller : AbstractAnomalyComposite { // 클래스 이름 public override string Name { get; } = "Anomaly08Controller"; - - // `Awake` 메시지 용 메서드 - protected override bool Awake_() - { - bool res = base.Awake_(); - - // Code used before `GameManager` updates begin - Log("Call `StartAnomaly` begin"); - if (StartAnomaly()) { - Log("Call `StartAnomaly` success"); - } else { - Log("Call `StartAnomaly` failed", mode: 1); - res = false; - } - // Code used before `GameManager` updates end - - return res; - } } \ No newline at end of file diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly08_micsound.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly08_micsound.cs index 9d7cb68..0003362 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly08_micsound.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly08_micsound.cs @@ -25,19 +25,6 @@ public override void OnInteract() Log("Call `GameManager.SetStageClear` begin"); GameManager.Instance.SetStageClear(); Log("Call `GameManager.SetStageClear` end"); - - // Code used before `GameManager` updates begin - GameObject controllerObject = GameObject.Find("AnomalyManager (8)(Clone)"); - AbstractAnomalyObject controller = controllerObject.GetComponent(); - - Log($"Call `{controller.Name}.ResetAnomaly` begin"); - if (controller.ResetAnomaly()) { - Log($"Call `{controller.Name}.ResetAnomaly` success"); - } else { - Log($"Call `{controller.Name}.ResetAnomaly` failed", mode: 1); - } - // Code used before `GameManager` updates end - } // 필드를 초기화하는 메서드 diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly10Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly10Controller.cs index bba5e7e..11b5691 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly10Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly10Controller.cs @@ -3,23 +3,5 @@ public class Anomaly10Controller : AbstractAnomalyComposite { // 클래스 이름 - public override string Name { get; } = "Anomaly10Controller"; // TODO: 클래스 이름 추가하기. - - // `Awake` 메시지 용 메서드 - protected override bool Awake_() - { - bool res = base.Awake_(); - - // Code used before `GameManager` updates begin - Log("Call `StartAnomaly` begin"); - if (StartAnomaly()) { - Log("Call `StartAnomaly` success"); - } else { - Log("Call `StartAnomaly` failed", mode: 1); - res = false; - } - // Code used before `GameManager` updates end - - return res; - } + public override string Name { get; } = "Anomaly10Controller"; } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly10_abnormalTile.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly10_abnormalTile.cs index e9dc44c..d48524c 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly10_abnormalTile.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly10_abnormalTile.cs @@ -16,18 +16,6 @@ public override void OnInteract() Log("Call `GameManager.SetStageClear` begin"); GameManager.Instance.SetStageClear(); Log("Call `GameManager.SetStageClear` end"); - - // Code used before `GameManager` updates begin - GameObject controllerObject = GameObject.Find("AnomalyManager (10)(Clone)"); - AbstractAnomalyObject controller = controllerObject.GetComponent(); - - Log($"Call `{controller.Name}.ResetAnomaly` begin"); - if (controller.ResetAnomaly()) { - Log($"Call `{controller.Name}.ResetAnomaly` success"); - } else { - Log($"Call `{controller.Name}.ResetAnomaly` failed", mode: 1); - } - // Code used before `GameManager` updates end } // 필드를 초기화하는 메서드 diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly11Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly11Controller.cs index efbc330..3af8ee9 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly11Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly11Controller.cs @@ -4,22 +4,4 @@ public class Anomaly11Controller : AbstractAnomalyComposite { // 클래스 이름 public override string Name { get; } = "Anomaly11Controller"; - - // `Awake` 메시지 용 메서드 - protected override bool Awake_() - { - bool res = base.Awake_(); - - // Code used before `GameManager` updates begin - Log("Call `StartAnomaly` begin"); - if (StartAnomaly()) { - Log("Call `StartAnomaly` success"); - } else { - Log("Call `StartAnomaly` failed", mode: 1); - res = false; - } - // Code used before `GameManager` updates end - - return res; - } } \ No newline at end of file diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly11_normaldoor.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly11_normaldoor.cs deleted file mode 100644 index 3219ce1..0000000 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly11_normaldoor.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class Anomaly11_normaldoor : AbstractAnomalyObject -{ - /********** - * fields * - **********/ - - /************** - * properties * - **************/ - - // 클래스 이름 - public override string Name { get; } = "Anomaly11_normaldoor"; - - /***************************************** - * implementation: AbstractAnomalyObject * - *****************************************/ - - // 이상현상을 시작하는 메서드 - public override bool StartAnomaly() - { - bool res = base.StartAnomaly(); - - gameObject.SetActive(false); - Log("Deleted normal door."); - - return res; - } -} diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly11_normaldoor.cs.meta b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly11_normaldoor.cs.meta deleted file mode 100644 index 3d2b240..0000000 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly11_normaldoor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 48c9e4b5058bb344389c1cfed59a4c2e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly11_openeddoor.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly11_openeddoor.cs index 2904106..9dd3f63 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly11_openeddoor.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly11_openeddoor.cs @@ -23,18 +23,7 @@ public override void OnInteract() Log("Call `GameManager.SetStageClear` begin"); GameManager.Instance.SetStageClear(); Log("Call `GameManager.SetStageClear` end"); - - // Code used before `GameManager` updates begin - GameObject controllerObject = GameObject.Find("AnomalyManager (11)(Clone)"); - AbstractAnomalyObject controller = controllerObject.GetComponent(); - - Log($"Call `{controller.Name}.ResetAnomaly` begin"); - if (controller.ResetAnomaly()) { - Log($"Call `{controller.Name}.ResetAnomaly` success"); - } else { - Log($"Call `{controller.Name}.ResetAnomaly` failed", mode: 1); - } - } + } // `Awake` 메시지 용 메서드 protected override bool Awake_() @@ -164,10 +153,6 @@ private IEnumerator StartFakeEnding(GameObject player) yield return new WaitForSeconds(0.5f); - PlayerController playerController = player.GetComponent(); - if (playerController != null) - { - playerController.GameOver(); - } + PlayerManager.Instance.GameOver(); } } \ No newline at end of file diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly12Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly12Controller.cs index e69dd32..94a627d 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly12Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly12Controller.cs @@ -4,22 +4,4 @@ public class Anomaly12Controller : AbstractAnomalyComposite { // 클래스 이름 public override string Name { get; } = "Anomaly12Controller"; - - // `Awake` 메시지 용 메서드 - protected override bool Awake_() - { - bool res = base.Awake_(); - - // Code used before `GameManager` updates begin - Log("Call `StartAnomaly` begin"); - if (StartAnomaly()) { - Log("Call `StartAnomaly` success"); - } else { - Log("Call `StartAnomaly` failed", mode: 1); - res = false; - } - // Code used before `GameManager` updates end - - return res; - } } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly12_tiltedlight.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly12_tiltedlight.cs index 6c50e75..1deb1ff 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly12_tiltedlight.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly12_tiltedlight.cs @@ -17,17 +17,6 @@ public override void OnInteract() Log("Call `GameManager.SetStageClear` begin"); GameManager.Instance.SetStageClear(); Log("Call `GameManager.SetStageClear` end"); - - // Code used before `GameManager` updates begin - GameObject controllerObject = GameObject.Find("AnomalyManager (12)(Clone)"); - AbstractAnomalyObject controller = controllerObject.GetComponent(); - - Log($"Call `{controller.Name}.ResetAnomaly` begin"); - if (controller.ResetAnomaly()) { - Log($"Call `{controller.Name}.ResetAnomaly` success"); - } else { - Log($"Call `{controller.Name}.ResetAnomaly` failed", mode: 1); - } } // 필드를 초기화하는 메서드 diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly13Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly13Controller.cs index 4ee42b1..cf28978 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly13Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly13Controller.cs @@ -4,22 +4,4 @@ public class Anomaly13Controller : AbstractAnomalyComposite { // 클래스 이름 public override string Name { get; } = "Anomaly13Controller"; - - // `Awake` 메시지 용 메서드 - protected override bool Awake_() - { - bool res = base.Awake_(); - - // Code used before `GameManager` updates begin - Log("Call `StartAnomaly` begin"); - if (StartAnomaly()) { - Log("Call `StartAnomaly` success"); - } else { - Log("Call `StartAnomaly` failed", mode: 1); - res = false; - } - // Code used before `GameManager` updates end - - return res; - } } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly13_lookingeye.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly13_lookingeye.cs index 637d0ed..d190842 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly13_lookingeye.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly13_lookingeye.cs @@ -21,17 +21,6 @@ public virtual void OnInteract() Log("Call `GameManager.SetStageClear` begin"); GameManager.Instance.SetStageClear(); Log("Call `GameManager.SetStageClear` end"); - - // Code used before `GameManager` updates begin - GameObject controllerObject = GameObject.Find("AnomalyManager (13)(Clone)"); - AbstractAnomalyObject controller = controllerObject.GetComponent(); - - Log($"Call `{controller.Name}.ResetAnomaly` begin"); - if (controller.ResetAnomaly()) { - Log($"Call `{controller.Name}.ResetAnomaly` success"); - } else { - Log($"Call `{controller.Name}.ResetAnomaly` failed", mode: 1); - } } // 필드를 초기화하는 메서드 diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly13_normaleye.cs.meta b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly13_normaleye.cs.meta deleted file mode 100644 index 7cfaa16..0000000 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly13_normaleye.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9a55ff71c373727419603887e590ca1a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly15Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly15Controller.cs index 57dfa32..68d627a 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly15Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly15Controller.cs @@ -42,11 +42,6 @@ public override bool ResetAnomaly() return res; } - - private void Start() - { - StartAnomaly(); - } public void StopSpawning() { diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly15_spider.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly15_spider.cs index 55fd2cf..f612da5 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly15_spider.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly15_spider.cs @@ -5,8 +5,6 @@ public class Anomaly15_spider : AbstractAnomalyInteractable { public override string Name { get; } = "Anomaly15_spider"; - [Header("Interaction Settings")] - private Anomaly15Controller anomalyManager; [Header("Audio Settings")] public AudioClip spiderSoundClip; private Transform cameraTransform; @@ -21,7 +19,6 @@ public override bool StartAnomaly() { bool res = base.StartAnomaly(); - anomalyManager = FindObjectOfType(); GameObject mainCamera = GameObject.FindWithTag("MainCamera"); audioSource = gameObject.AddComponent(); @@ -53,7 +50,6 @@ public override void OnInteract() GameManager.Instance.SetStageClear(); ResetAnomaly(); - anomalyManager.ResetAnomaly(); } public override bool CanInteract(float distance) diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly16Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly16Controller.cs index d6477ee..9bc9880 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly16Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly16Controller.cs @@ -32,11 +32,6 @@ public override bool ResetAnomaly() return res; } - private void Start() - { - StartAnomaly(); - } - private void CreateMarkerLineInstance() { markerLine = new GameObject("MarkerLine"); diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly16_marker.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly16_marker.cs index c9900a6..b04d613 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly16_marker.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly16_marker.cs @@ -5,7 +5,6 @@ public class Anomaly16_marker : AbstractAnomalyInteractable { public override string Name { get; } = "Anomaly16_marker"; - private Anomaly16Controller anomalyManager; private Transform cameraTransform; @@ -37,8 +36,6 @@ public override bool StartAnomaly() cameraTransform = mainCamera.transform; } - anomalyManager = FindObjectOfType(); - // Set up LineRenderer and AudioSource components lineRenderer = GetComponent(); audioSource = gameObject.AddComponent(); @@ -88,7 +85,6 @@ public override void OnInteract() GameManager.Instance.SetStageClear(); ResetAnomaly(); - anomalyManager.ResetAnomaly(); } private IEnumerator StartDrawingWithDelay() diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly17Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly17Controller.cs index 45a4c66..13fe0c2 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly17Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly17Controller.cs @@ -35,11 +35,6 @@ public override bool ResetAnomaly() return res; } - - private void Start() - { - StartAnomaly(); - } public void ReplaceToSplitMic() { diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly17_mic.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly17_mic.cs index 1d803dd..3c3d6b5 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly17_mic.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly17_mic.cs @@ -4,7 +4,6 @@ public class Anomaly17_mic : AbstractAnomalyInteractable { public override string Name { get; } = "Anomaly17_mic"; - private Anomaly17Controller anomalyManager; // 스파크 세팅 public int sparkSegments = 30; @@ -26,7 +25,6 @@ public class Anomaly17_mic : AbstractAnomalyInteractable public override bool StartAnomaly() { - anomalyManager = FindObjectOfType(); GameObject mainCamera = GameObject.FindWithTag("MainCamera"); if (mainCamera != null) { @@ -71,17 +69,12 @@ private void Start() public override bool ResetAnomaly() { - if (anomalyManager != null) - { - anomalyManager.ReplaceToNormalMic(); - - // 전기 스파크 효과 중지 - StopAllCoroutines(); - lineRenderer.enabled = false; + // 전기 스파크 효과 중지 + StopAllCoroutines(); + lineRenderer.enabled = false; - // 오디오 중지 - audioSource.Stop(); - } + // 오디오 중지 + audioSource.Stop(); return true; } @@ -168,7 +161,6 @@ public override void OnInteract() GameManager.Instance.SetStageClear(); ResetAnomaly(); - anomalyManager.ResetAnomaly(); } public override bool CanInteract(float distance) diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly18Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly18Controller.cs index c73e270..7f8192c 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly18Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly18Controller.cs @@ -6,26 +6,4 @@ public class Anomaly18Controller : AbstractAnomalyComposite // 클래스 이름 public override string Name { get; } = "Anomaly18Controller"; - - /************************************* - * implementation: AbstractBehaviour * - *************************************/ - - // `Awake` 메시지 용 메서드 - protected override bool Awake_() - { - bool res = base.Awake_(); - - // Code used before `GameManager` updates begin - Log("Call `StartAnomaly` begin"); - if (StartAnomaly()) { - Log("Call `StartAnomaly` success"); - } else { - Log("Call `StartAnomaly` failed", mode: 1); - res = false; - } - // Code used before `GameManager` updates end - - return res; - } } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly18Interactable.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly18Interactable.cs index 8d42c84..49ec479 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly18Interactable.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly18Interactable.cs @@ -29,18 +29,6 @@ public override void OnInteract() Log("Call `GameManager.SetStageClear` begin"); GameManager.Instance.SetStageClear(); Log("Call `GameManager.SetStageClear` end"); - - // Code used before `GameManager` updates begin - GameObject controllerObject = GameObject.Find("AnomalyManager (18)(Clone)"); - AbstractAnomalyObject controller = controllerObject.GetComponent(); - - Log($"Call `{controller.Name}.ResetAnomaly` begin"); - if (controller.ResetAnomaly()) { - Log($"Call `{controller.Name}.ResetAnomaly` success"); - } else { - Log($"Call `{controller.Name}.ResetAnomaly` failed", mode: 1); - } - // Code used before `GameManager` updates end } /***************************************** diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly19Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly19Controller.cs index 84f8ea7..8c3b9da 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly19Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly19Controller.cs @@ -6,26 +6,4 @@ public class Anomaly19Controller : AbstractAnomalyComposite // 클래스 이름 public override string Name { get; } = "Anomaly19Controller"; - - /************************************* - * implementation: AbstractBehaviour * - *************************************/ - - // `Awake` 메시지 용 메서드 - protected override bool Awake_() - { - bool res = base.Awake_(); - - // Code used before `GameManager` updates begin - Log("Call `StartAnomaly` begin"); - if (StartAnomaly()) { - Log("Call `StartAnomaly` success"); - } else { - Log("Call `StartAnomaly` failed", mode: 1); - res = false; - } - // Code used before `GameManager` updates end - - return res; - } } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly19Slide.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly19Slide.cs index bdd24b7..57bcbcc 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly19Slide.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly19Slide.cs @@ -52,18 +52,6 @@ public override void OnInteract() Log("Call `GameManager.SetStageClear` begin"); GameManager.Instance.SetStageClear(); Log("Call `GameManager.SetStageClear` end"); - - // Code used before `GameManager` updates begin - GameObject controllerObject = GameObject.Find("AnomalyManager (19)(Clone)"); - AbstractAnomalyObject controller = controllerObject.GetComponent(); - - Log($"Call `{controller.Name}.ResetAnomaly` begin"); - if (controller.ResetAnomaly()) { - Log($"Call `{controller.Name}.ResetAnomaly` success"); - } else { - Log($"Call `{controller.Name}.ResetAnomaly` failed", mode: 1); - } - // Code used before `GameManager` updates end } /************************************* diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly20Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly20Controller.cs index 9d5cf27..347ce3d 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly20Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly20Controller.cs @@ -6,26 +6,4 @@ public class Anomaly20Controller : AbstractAnomalyComposite // 클래스 이름 public override string Name { get; } = "Anomaly20Controller"; - - /************************************* - * implementation: AbstractBehaviour * - *************************************/ - - // `Awake` 메시지 용 메서드 - protected override bool Awake_() - { - bool res = base.Awake_(); - - // Code used before `GameManager` updates begin - Log("Call `StartAnomaly` begin"); - if (StartAnomaly()) { - Log("Call `StartAnomaly` success"); - } else { - Log("Call `StartAnomaly` failed", mode: 1); - res = false; - } - // Code used before `GameManager` updates end - - return res; - } } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly20Interactable.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly20Interactable.cs index 0d3cd49..d0b3d15 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly20Interactable.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly20Interactable.cs @@ -33,18 +33,6 @@ public override void OnInteract() Log("Call `GameManager.SetStageClear` begin"); GameManager.Instance.SetStageClear(); Log("Call `GameManager.SetStageClear` end"); - - // Code used before `GameManager` updates begin - GameObject controllerObject = GameObject.Find("AnomalyManager (20)(Clone)"); - AbstractAnomalyObject controller = controllerObject.GetComponent(); - - Log($"Call `{controller.Name}.ResetAnomaly` begin"); - if (controller.ResetAnomaly()) { - Log($"Call `{controller.Name}.ResetAnomaly` success"); - } else { - Log($"Call `{controller.Name}.ResetAnomaly` failed", mode: 1); - } - // Code used before `GameManager` updates end } /************************************* diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly21Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly21Controller.cs index 679430a..9a5ccd5 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly21Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly21Controller.cs @@ -4,22 +4,4 @@ public class Anomaly21Controller : AbstractAnomalyComposite { // 클래스 이름 public override string Name { get; } = "Anomaly21Controller"; - - // `Awake` 메시지 용 메서드 - protected override bool Awake_() - { - bool res = base.Awake_(); - - // Code used before `GameManager` updates begin - Log("Call `StartAnomaly` begin"); - if (StartAnomaly()) { - Log("Call `StartAnomaly` success"); - } else { - Log("Call `StartAnomaly` failed", mode: 1); - res = false; - } - // Code used before `GameManager` updates end - - return res; - } } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly21_chase.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly21_chase.cs index 2ea1ff1..0df02b9 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly21_chase.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly21_chase.cs @@ -30,7 +30,7 @@ public class Anomaly21_chase : AbstractAnomalyInteractable private float elapsedTime = 0f; // 클래스 이름 - public override string Name { get; } = "Anomaly13_lookingeye"; + public override string Name { get; } = "Anomaly21_chase"; // 필드를 초기화하는 메서드 @@ -91,7 +91,7 @@ private void Update() if (elapsedTime >= 20f) { - ResetAnomaly(); + GameManager.Instance.SetStageClear(); } } } @@ -101,11 +101,7 @@ private void OnCollisionEnter(Collision collision) if (collision.collider.CompareTag("Player")) { StartCoroutine(FadeOutAudio()); - var playerController = FindObjectOfType(); - if (playerController != null) - { - playerController.GameOver(); - } + GameManager.Instance.GameOver(); } } @@ -131,8 +127,6 @@ private IEnumerator ReturnToStart() LockPositionAndRotation(); animator.SetBool("isChasing", false); - GameManager.Instance.SetStageClear(); - capsuleCollider.enabled = false; elapsedTime = 0f; diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly21_normalprofessor.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly21_normalprofessor.cs deleted file mode 100644 index 5aad537..0000000 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly21_normalprofessor.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class Anomaly21_normalprofessor : AbstractAnomalyObject -{ - /********** - * fields * - **********/ - - /************** - * properties * - **************/ - - // 클래스 이름 - public override string Name { get; } = "Anomaly21_normalprofessor"; - - /***************************************** - * implementation: AbstractAnomalyObject * - *****************************************/ - - // 이상현상을 시작하는 메서드 - public override bool StartAnomaly() - { - bool res = base.StartAnomaly(); - - gameObject.SetActive(false); - Log("Deleted normal eye."); - - return res; - } -} diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly21_normalprofessor.cs.meta b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly21_normalprofessor.cs.meta deleted file mode 100644 index c4d1ca9..0000000 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly21_normalprofessor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6aa0d459c4e2b834fad9092d089c5c87 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly22Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly22Controller.cs index 8512249..73d6b1f 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly22Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly22Controller.cs @@ -8,7 +8,6 @@ public class Anomaly22Controller : AbstractAnomalyObject private GameObject floor; // 모든 타일들의 Parent private GameManager gameManager; - private PlayerController playerController; public float interval = 1f; public float totalSeconds = 30f; private bool isPlayerDead = false; @@ -24,7 +23,6 @@ public class Anomaly22Controller : AbstractAnomalyObject public override bool StartAnomaly() { gameManager = GameObject.Find("GameManager").GetComponent(); - playerController = GameObject.Find("Player").GetComponent(); audioSource = gameObject.AddComponent(); floor = GameObject.FindWithTag("FloorEmpty"); @@ -58,16 +56,13 @@ private IEnumerator InitializeCollidersAndDestroyParentCollider() // 이상현상을 초기화하는 메서드 public override bool ResetAnomaly() { - RestoreAllTiles(); - bool res = base.ResetAnomaly(); + + audioSource.PlayOneShot(successSound); + StartCoroutine(RestoreAllTiles()); + return res; } - - private void Start() - { - StartAnomaly(); - } private Transform FindPlatformTile() { @@ -147,9 +142,9 @@ private IEnumerator CountSeconds() void Update() { // 아래로 떨어졌는지 확인해서 Game Over 처리 - if (playerController.transform.position.y < -5f && !isPlayerDead) + if (PlayerManager.Instance.transform.position.y < -5f && !isPlayerDead) { - playerController.Sleep(); + PlayerManager.Instance.Sleep(); isPlayerDead = true; } } @@ -179,8 +174,6 @@ private IEnumerator TriggerRandomTileShakeAndFallWithInterval() if (!isPlayerDead) // totalSeconds가 다 지날 때까지 생존 시 { gameManager.SetStageClear(); - audioSource.PlayOneShot(successSound); - StartCoroutine(RestoreAllTiles()); } } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly23Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly23Controller.cs index 7ba7204..4260b04 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly23Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly23Controller.cs @@ -6,26 +6,4 @@ public class Anomaly23Controller : AbstractAnomalyComposite // 클래스 이름 public override string Name { get; } = "Anomaly23Controller"; - - /************************************* - * implementation: AbstractBehaviour * - *************************************/ - - // `Awake` 메시지 용 메서드 - protected override bool Awake_() - { - bool res = base.Awake_(); - - // Code used before `GameManager` updates begin - Log("Call `StartAnomaly` begin"); - if (StartAnomaly()) { - Log("Call `StartAnomaly` success"); - } else { - Log("Call `StartAnomaly` failed", mode: 1); - res = false; - } - // Code used before `GameManager` updates end - - return res; - } } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly23Ghost.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly23Ghost.cs index e378dd7..70d533b 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly23Ghost.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly23Ghost.cs @@ -52,19 +52,17 @@ public class Anomaly23Ghost : AbstractAnomalyObject void OnCollisionEnter(Collision other) { if (other.collider.CompareTag("Player") && _isChasing) { - PlayerController script = _objectPlayer.GetComponent(); - _isCatched = true; - if (script != null) { - Log("Call `script.GameOver` begin"); - script.GameOver(); - Log("Call `script.GameOver` end"); - Log("Call `FadeAudioAsync` asynchronously"); - StartCoroutine(FadeAudioAsync()); + Log("Call `GameManager.GameOver` begin"); + if (GameManager.Instance.GameOver()) { + Log("Call `GameManager.GameOver` success"); } else { - Log("Call `script.GameOver` failed", mode: 1); + Log("Call `GameManager.GameOver` failed", mode: 1); } + + Log("Call `FadeAudioAsync` asynchronously"); + StartCoroutine(FadeAudioAsync()); } } @@ -89,18 +87,6 @@ void Update() Log("Call `GameManager.SetStageClear` begin"); GameManager.Instance.SetStageClear(); Log("Call `GameManager.SetStageClear` end"); - - // Code used before `GameManager` updates begin - GameObject controllerObject = GameObject.Find("AnomalyManager (23)(Clone)"); - AbstractAnomalyObject controller = controllerObject.GetComponent(); - - Log($"Call `{controller.Name}.ResetAnomaly` begin"); - if (controller.ResetAnomaly()) { - Log($"Call `{controller.Name}.ResetAnomaly` success"); - } else { - Log($"Call `{controller.Name}.ResetAnomaly` failed", mode: 1); - } - // Code used before `GameManager` updates end } } } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly24Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly24Controller.cs index 6bd931d..acea0df 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly24Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly24Controller.cs @@ -1,33 +1,15 @@ using UnityEngine; -public class Anomaly24Controller : AbstractAnomalyComposite +public class Anomaly24Controller : AbstractAnomalyObject { public GameObject prefab; private Transform[] childTransforms; GameObject sitGirls; - // `Awake` 메시지 용 메서드 - protected override bool Awake_() - { - bool res = base.Awake_(); - - // Code used before `GameManager` updates begin - Log("Call `StartAnomaly` begin"); - if (StartAnomaly()) { - Log("Call `StartAnomaly` success"); - } else { - Log("Call `StartAnomaly` failed", mode: 1); - res = false; - } - // Code used before `GameManager` updates end - - return res; - } - - // 필드를 초기화하는 메서드 - protected override bool InitFields() + // 이상현상을 시작하는 메서드 + public override bool StartAnomaly() { - bool res = base.InitFields(); + bool res = base.StartAnomaly(); if (sitGirls != null) { @@ -54,13 +36,6 @@ protected override bool InitFields() res = false; } - return res; - } - // 이상현상을 시작하는 메서드 - public override bool StartAnomaly() - { - bool res = base.StartAnomaly(); - Destroy(sitGirls); return res; diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly24_luciddream.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly24_luciddream.cs index e522da3..731b38a 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly24_luciddream.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly24_luciddream.cs @@ -68,16 +68,8 @@ private IEnumerator LucidDreamSequence() yield return null; } - if(GameManager.Instance.GetGameState() != GameManager.GameState.Sleeping) - { - GameManager.Instance.SetStageNoClear(); - } - var playerController = FindObjectOfType(); - if (playerController != null) - { - playerController.GameOver(); - } + GameManager.Instance.GameOver(); StartCoroutine(FadeOutAudio()); } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly26Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly26Controller.cs index df224a3..ddb8442 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly26Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly26Controller.cs @@ -161,13 +161,8 @@ public void CreateNewFire(Vector3 position) private void GameOver() { StartCoroutine(FadeOutMusic()); - - // PlayerController를 찾아서 GameOver 애니메이션 실행 - PlayerController player = FindObjectOfType(); - if (player != null) - { - player.GameOver(); - } + + PlayerManager.Instance.GameOver(); this.enabled = false; } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly27Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly27Controller.cs index 013752d..ae1c115 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly27Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly27Controller.cs @@ -5,24 +5,5 @@ public class Anomaly27Controller : AbstractAnomalyComposite { - public override string Name { get; } = "Anomaly27Controller"; // 소환할 프리팹 - - // `Awake` 메시지 용 메서드 - protected override bool Awake_() - { - bool res = base.Awake_(); - - // Code used before `GameManager` updates begin - Log("Call `StartAnomaly` begin"); - if (StartAnomaly()) { - Log("Call `StartAnomaly` success"); - } else { - Log("Call `StartAnomaly` failed", mode: 1); - res = false; - } - // Code used before `GameManager` updates end - - - return res; - } + public override string Name { get; } = "Anomaly27Controller"; } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly27_magnifyingclock.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly27_magnifyingclock.cs index da7d6e0..e6cbcd7 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly27_magnifyingclock.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly27_magnifyingclock.cs @@ -56,33 +56,10 @@ private void OnCollisionEnter(Collision collision) if (isStageClear) { Debug.Log("Collision with Player detected. Setting StageNoClear and calling GameOver."); - GameManager.Instance.SetStageNoClear(); isStageClear = false; // 상태를 변경해 중복 호출 방지 - // PlayerController의 GameOver 호출 - var playerController = collision.collider.GetComponent(); - if (playerController != null) - { - playerController.GameOver(); - Debug.Log("PlayerController.GameOver() called successfully."); - } - else - { - Debug.LogError("PlayerController not found on Player object!"); - } - - // 씬 강제 전환 확인을 위한 보조 처리 - StartCoroutine(ForceSceneTransition()); + PlayerManager.Instance.GameOver(); } } } - - private System.Collections.IEnumerator ForceSceneTransition() - { - yield return new WaitForSeconds(5f); // PlayerController 애니메이션 실행 시간 대기 - Debug.Log("ForceSceneTransition: Manually triggering GameManager.Instance.Sleep()."); - - // GameManager.Sleep() 강제 호출 - GameManager.Instance.Sleep(); - } } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly28Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly28Controller.cs index 7bd7296..b4977fb 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly28Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly28Controller.cs @@ -5,7 +5,6 @@ public class Anomaly28Controller : AbstractAnomalyObject { public override string Name { get; } = "Anomaly28Controller"; - private GameManager gameManager; private GameObject player; private float tiltMaxAngle = 15f; // Maximum tilt angle for heavy swaying @@ -39,8 +38,7 @@ public override bool StartAnomaly() StartCoroutine(DelayedStartSwaying()); // Stage always clears after experiencing the anomaly - gameManager = GameObject.Find("GameManager").GetComponent(); - gameManager.SetStageClear(); + GameManager.Instance.SetStageClear(); // Find the player object and its Rigidbody player = GameObject.Find("Player"); @@ -68,11 +66,6 @@ public override bool ResetAnomaly() return res; } - - private void Start() - { - StartAnomaly(); - } private void CreateClassroomParent() { diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly29Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly29Controller.cs index 4aa0a84..54e503e 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly29Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly29Controller.cs @@ -7,7 +7,6 @@ public class Anomaly29Controller : AbstractAnomalyObject public override string Name { get; } = "Anomaly29Controller"; private GameManager gameManager; - private PlayerController playerController; public GameObject bananaPrefab; [Header("Sound Settings")] @@ -37,7 +36,6 @@ public override bool StartAnomaly() bool res = base.StartAnomaly(); gameManager = GameObject.Find("GameManager").GetComponent(); - playerController = GameObject.Find("Player").GetComponent(); audioSource = gameObject.GetComponent(); // 바나나 스폰 시작 @@ -46,11 +44,6 @@ public override bool StartAnomaly() return res; } - private void Start() - { - StartAnomaly(); - } - private IEnumerator SpawnBananas() { yield return new WaitForSeconds(5f); // 5초 있다 시작 @@ -178,8 +171,6 @@ public IEnumerator PlayerDies() isPlayerDead = true; audioSource.PlayOneShot(dieSound); - playerController.Sleep(); - yield return new WaitForSeconds(5f); // Delay before triggering game over - gameManager.Sleep(); + PlayerManager.Instance.GameOver(); } } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30Controller.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30Controller.cs index 472f22c..a21f0df 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30Controller.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30Controller.cs @@ -52,11 +52,6 @@ public override bool StartAnomaly() return res; } - private void Start() - { - StartAnomaly(); - } - public override bool ResetAnomaly() { bool res = base.ResetAnomaly(); @@ -106,7 +101,6 @@ private IEnumerator ApplyAnomalyWindowScriptsAndCollider() private IEnumerator EndWindowsOpeningAfterTime(float time) { yield return new WaitForSeconds(time); - ResetAnomaly(); } private void CloseAllWindows() @@ -140,10 +134,7 @@ public void PlayerDieFromStorm(Vector3 windowPosition) Vector3 targetPosition = new Vector3(this.player.transform.position.x, this.player.transform.position.y, -15f); StartCoroutine(MovePlayerToPosition(targetPosition)); - PlayerController playerController = this.player.GetComponent(); - playerController.Sleep(); - - StartCoroutine(CallGameManagerSleepAfterDelay(3f)); + PlayerManager.Instance.GameOver(); } private IEnumerator MovePlayerToPosition(Vector3 targetPosition) @@ -162,17 +153,6 @@ private IEnumerator MovePlayerToPosition(Vector3 targetPosition) player.transform.position = targetPosition; } - private IEnumerator CallGameManagerSleepAfterDelay(float delay) - { - yield return new WaitForSeconds(delay); - - if (gameManager != null) - { - gameManager.SetStageNoClear(); // 혹시 날라갈동안 Anomaly time이 끝나서 성공할 수도 있으니 - gameManager.Sleep(); - } - } - public void StopAnomaly() { isAnomalyStopped = true; diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly08_normal.cs b/302/Assets/Scripts/SpecificAnomalyManager/AnomalyForDeletion.cs similarity index 68% rename from 302/Assets/Scripts/SpecificAnomalyManager/Anomaly08_normal.cs rename to 302/Assets/Scripts/SpecificAnomalyManager/AnomalyForDeletion.cs index a7d9ec8..72d2748 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly08_normal.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/AnomalyForDeletion.cs @@ -1,17 +1,13 @@ using UnityEngine; -public class Anomaly08_normal : AbstractAnomalyObject +public class AnomalyForDeletion : AbstractAnomalyObject { - /********** - * fields * - **********/ - /************** * properties * **************/ // 클래스 이름 - public override string Name { get; } = "Anomaly08_normal"; + public override string Name { get; } = "AnomalyForDeletion"; /***************************************** * implementation: AbstractAnomalyObject * @@ -23,7 +19,7 @@ public override bool StartAnomaly() bool res = base.StartAnomaly(); gameObject.SetActive(false); - Log("Deleted normal professor."); + Log($"Delete `{gameObject.name}`."); return res; } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly08_normal.cs.meta b/302/Assets/Scripts/SpecificAnomalyManager/AnomalyForDeletion.cs.meta similarity index 83% rename from 302/Assets/Scripts/SpecificAnomalyManager/Anomaly08_normal.cs.meta rename to 302/Assets/Scripts/SpecificAnomalyManager/AnomalyForDeletion.cs.meta index 92d1154..0dbc5df 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly08_normal.cs.meta +++ b/302/Assets/Scripts/SpecificAnomalyManager/AnomalyForDeletion.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c74fcacda5ca304409e13b81453d92a2 +guid: 4b540547a9e7bfd4f92514a389b8db70 MonoImporter: externalObjects: {} serializedVersion: 2