diff --git a/namedropper/Assets/Scenes/TopicSelect.unity b/namedropper/Assets/Scenes/TopicSelect.unity index 2df24b5..d3211dd 100644 --- a/namedropper/Assets/Scenes/TopicSelect.unity +++ b/namedropper/Assets/Scenes/TopicSelect.unity @@ -123,43 +123,7 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1 &107001398 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 107001399} - m_Layer: 5 - m_Name: Scores - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &107001399 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 107001398} - 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_Children: - - {fileID: 1225785572} - m_Father: {fileID: 1666960088} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 100, y: 100} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!1001 &302674577 +--- !u!1001 &18155119 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 @@ -168,7 +132,7 @@ PrefabInstance: m_Modifications: - target: {fileID: 1085594869219034861, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: m_Size.x - value: 849.06 + value: 523.9 objectReference: {fileID: 0} - target: {fileID: 1499098757095760768, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: Name @@ -216,15 +180,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1499098757095760798, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: m_Name - value: Topic1 + value: Topic3 objectReference: {fileID: 0} - target: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: m_RootOrder - value: 0 + value: 2 objectReference: {fileID: 0} - target: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: m_LocalPosition.x - value: -341 + value: 745 objectReference: {fileID: 0} - target: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: m_LocalPosition.y @@ -264,7 +228,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1499098757547953156, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: m_LocalScale.x - value: 4.2102113 + value: 2.5787544 objectReference: {fileID: 0} - target: {fileID: 1499098757669286102, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: m_Text @@ -272,7 +236,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1499098758628412651, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: m_LocalScale.x - value: -3.2209778 + value: -1.9728489 + objectReference: {fileID: 0} + - target: {fileID: 1499098758628412651, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_LocalPosition.x + value: -126.34 objectReference: {fileID: 0} - target: {fileID: 7182421569596414056, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: m_IsActive @@ -285,23 +253,23 @@ PrefabInstance: m_RemovedComponents: - {fileID: 1499098757095760768, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} m_SourcePrefab: {fileID: 100100000, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} ---- !u!4 &302674578 stripped +--- !u!4 &18155120 stripped Transform: m_CorrespondingSourceObject: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} - m_PrefabInstance: {fileID: 302674577} + m_PrefabInstance: {fileID: 18155119} m_PrefabAsset: {fileID: 0} ---- !u!1 &330129965 stripped +--- !u!1 &18155121 stripped GameObject: m_CorrespondingSourceObject: {fileID: 1499098757095760798, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} - m_PrefabInstance: {fileID: 785169904} + m_PrefabInstance: {fileID: 18155119} m_PrefabAsset: {fileID: 0} ---- !u!114 &330129966 +--- !u!114 &18155122 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 330129965} + m_GameObject: {fileID: 18155121} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: ae3cf3ee1d381b544985a421e4ecbc64, type: 3} @@ -311,12 +279,43 @@ MonoBehaviour: TopicData: Topic: Categories: [] ---- !u!224 &554720354 stripped +--- !u!1 &107001398 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 107001399} + m_Layer: 5 + m_Name: Scores + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &107001399 RectTransform: - m_CorrespondingSourceObject: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3} - m_PrefabInstance: {fileID: 9049015332794659158} + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} ---- !u!1001 &785169904 + m_GameObject: {fileID: 107001398} + 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_Children: + - {fileID: 1225785572} + m_Father: {fileID: 1666960088} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1001 &302674577 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 @@ -325,7 +324,7 @@ PrefabInstance: m_Modifications: - target: {fileID: 1085594869219034861, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: m_Size.x - value: 835.8 + value: 523.9 objectReference: {fileID: 0} - target: {fileID: 1499098757095760768, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: Name @@ -373,15 +372,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1499098757095760798, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: m_Name - value: Topic2 + value: Topic1 objectReference: {fileID: 0} - target: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: m_RootOrder - value: 2 + value: 0 objectReference: {fileID: 0} - target: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: m_LocalPosition.x - value: 591 + value: -489 objectReference: {fileID: 0} - target: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: m_LocalPosition.y @@ -421,7 +420,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1499098757547953156, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: m_LocalScale.x - value: 4.2102113 + value: 2.5787544 objectReference: {fileID: 0} - target: {fileID: 1499098757669286102, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: m_Text @@ -429,7 +428,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1499098758628412651, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: m_LocalScale.x - value: -3.2209778 + value: -1.9728489 + objectReference: {fileID: 0} + - target: {fileID: 1499098758628412651, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_LocalPosition.x + value: -126.34 objectReference: {fileID: 0} - target: {fileID: 7182421569596414056, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: m_IsActive @@ -442,10 +445,15 @@ PrefabInstance: m_RemovedComponents: - {fileID: 1499098757095760768, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} m_SourcePrefab: {fileID: 100100000, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} ---- !u!4 &785169905 stripped +--- !u!4 &302674578 stripped Transform: m_CorrespondingSourceObject: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} - m_PrefabInstance: {fileID: 785169904} + m_PrefabInstance: {fileID: 302674577} + m_PrefabAsset: {fileID: 0} +--- !u!224 &554720354 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3} + m_PrefabInstance: {fileID: 9049015332794659158} m_PrefabAsset: {fileID: 0} --- !u!1 &1225785571 GameObject: @@ -677,6 +685,162 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1500576224 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1682087380} + m_Modifications: + - target: {fileID: 1085594869219034861, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_Size.x + value: 523.9 + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760768, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: Name + value: Friends + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760768, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: Elements.Array.data[0] + value: Rachel Green + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760768, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: Elements.Array.data[1] + value: Joey Tribbiani + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760768, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: Elements.Array.data[2] + value: Chandler Bing + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760768, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: Elements.Array.data[3] + value: Ross Geller + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760768, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: Elements.Array.data[4] + value: Monica Geller + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760768, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: Elements.Array.data[5] + value: Phoebe Buffay + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760768, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: Elements.Array.data[6] + value: Janice Hosenstein + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760768, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: Elements.Array.data[7] + value: Gunther + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760768, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: Elements.Array.data[8] + value: Roy, the Stripper + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760768, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: Elements.Array.data[9] + value: Ursula Buffay + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760798, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_Name + value: Topic2 + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_LocalPosition.x + value: 129 + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_LocalPosition.y + value: -10.900024 + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_LocalPosition.z + value: -188.99962 + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1499098757547953156, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_LocalScale.x + value: 2.5787544 + objectReference: {fileID: 0} + - target: {fileID: 1499098757669286102, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_Text + value: Category + objectReference: {fileID: 0} + - target: {fileID: 1499098758628412651, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_LocalScale.x + value: -1.9728489 + objectReference: {fileID: 0} + - target: {fileID: 1499098758628412651, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_LocalPosition.x + value: -126.34 + objectReference: {fileID: 0} + - target: {fileID: 7182421569596414056, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7985489786620569223, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: + - {fileID: 1499098757095760768, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} +--- !u!4 &1500576225 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + m_PrefabInstance: {fileID: 1500576224} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1500576226 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 1499098757095760798, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + m_PrefabInstance: {fileID: 1500576224} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1500576227 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1500576226} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ae3cf3ee1d381b544985a421e4ecbc64, type: 3} + m_Name: + m_EditorClassIdentifier: + Name: + TopicData: + Topic: + Categories: [] --- !u!1 &1641253471 GameObject: m_ObjectHideFlags: 0 @@ -708,7 +872,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _topic1Box: {fileID: 1797572950} - _topic2Box: {fileID: 330129966} + _topic2Box: {fileID: 1500576227} + _topic3Box: {fileID: 18155122} _title: {fileID: 1225785573} --- !u!4 &1641253473 Transform: @@ -866,7 +1031,8 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 302674578} - - {fileID: 785169905} + - {fileID: 1500576225} + - {fileID: 18155120} m_Father: {fileID: 1666960088} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1033,7 +1199,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3} propertyPath: m_AnchoredPosition.y - value: 657.99994 + value: 545.13 objectReference: {fileID: 0} - target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3} propertyPath: m_LocalEulerAnglesHint.x diff --git a/namedropper/Assets/Scripts/GameDataManager.cs b/namedropper/Assets/Scripts/GameDataManager.cs index d1e58f2..0ffdd0b 100644 --- a/namedropper/Assets/Scripts/GameDataManager.cs +++ b/namedropper/Assets/Scripts/GameDataManager.cs @@ -24,6 +24,11 @@ public class GameDataManager { public TopicData GetRandomTopicData() { + if (_gameData.Topics.Count == 0) + { + Reset(); + } + int topicIndex = Random.Range(0, _gameData.Topics.Count); TopicData topicData = _gameData.Topics[topicIndex]; _gameData.Topics.RemoveAt(topicIndex); @@ -33,6 +38,8 @@ public class GameDataManager { public CategoryData GetRandomCategoryData(TopicData topicData) { + + int categoryIndex = Random.Range(0, topicData.Categories.Count); CategoryData categoryData = topicData.Categories[categoryIndex]; topicData.Categories.RemoveAt(categoryIndex); diff --git a/namedropper/Assets/Scripts/TopicSelect.cs b/namedropper/Assets/Scripts/TopicSelect.cs index 711ba61..f4701fa 100644 --- a/namedropper/Assets/Scripts/TopicSelect.cs +++ b/namedropper/Assets/Scripts/TopicSelect.cs @@ -7,6 +7,7 @@ public class TopicSelect : MonoBehaviour { [SerializeField] TopicBox _topic1Box; [SerializeField] TopicBox _topic2Box; + [SerializeField] TopicBox _topic3Box; [SerializeField] Text _title; // Start is called before the first frame update @@ -20,8 +21,10 @@ public class TopicSelect : MonoBehaviour _title.text = "Round " + GameManager.Instance.Round + "\nPick a Topic!"; _topic1Box.TopicData = GameDataManager.Instance.GetRandomTopicData(); _topic2Box.TopicData = GameDataManager.Instance.GetRandomTopicData(); + _topic3Box.TopicData = GameDataManager.Instance.GetRandomTopicData(); _topic1Box.Name = _topic1Box.TopicData.Topic; _topic2Box.Name = _topic2Box.TopicData.Topic; + _topic3Box.Name = _topic3Box.TopicData.Topic; } // Update is called once per frame