Skip to content

Commit

Permalink
Merge pull request #111 from 2024FALL-SWPP/psy/starting_scene
Browse files Browse the repository at this point in the history
Game Starting Scene / AnomalyManager adjusted
  • Loading branch information
psy020529 authored Nov 23, 2024
2 parents 8eeb3c6 + 37b1ddd commit 55199c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 71 deletions.
72 changes: 2 additions & 70 deletions 302/Assets/Scenes/GameStartingScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -4472,7 +4472,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 17
m_RootOrder: 16
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &227027812
PrefabInstance:
Expand Down Expand Up @@ -37144,74 +37144,6 @@ Transform:
m_CorrespondingSourceObject: {fileID: 7236329420339151181, guid: 2ad42fc20dee64e4ca84470ffa3fb42e, type: 3}
m_PrefabInstance: {fileID: 1756427539}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1760917402
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1760917405}
- component: {fileID: 1760917404}
- component: {fileID: 1760917403}
m_Layer: 0
m_Name: EventSystem (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1760917403
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1760917402}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
m_Name:
m_EditorClassIdentifier:
m_SendPointerHoverToParent: 1
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &1760917404
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1760917402}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!4 &1760917405
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1760917402}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 16
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1762837216
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -41279,7 +41211,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 18
m_RootOrder: 17
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1879079609
PrefabInstance:
Expand Down
8 changes: 7 additions & 1 deletion 302/Assets/Scripts/AnomalyManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,16 @@ private int GenerateRandomAnomaly()
public void CheckAndInstantiateAnomaly()
{
int stageIndex = GameManager.Instance.GetCurrentStage() - 1;
if (stageIndex < 0 || stageIndex >= anomalyList.Count)
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}");
Expand Down

0 comments on commit 55199c1

Please sign in to comment.