From b3631df144582a4a4557f4f119b7357ba8b46d9a Mon Sep 17 00:00:00 2001 From: Josh Date: Wed, 5 Apr 2023 11:37:35 -0400 Subject: [PATCH] lots of changes based on feedback from Gumbo --- namedropper/Assets/GameOverScreen.cs | 2 +- .../Assets/{PlayerJoin.cs => JoinGameBox.cs} | 2 +- ...PlayerJoin.cs.meta => JoinGameBox.cs.meta} | 2 +- namedropper/Assets/JoinPlayer.cs | 22 +- namedropper/Assets/Resources/categories.yaml | 100 ++++++++- .../Assets/Scenes/PlayerSelectJoin.unity | 189 ++---------------- namedropper/Assets/Scripts/Game.cs | 2 + namedropper/Assets/Scripts/Player.cs | 4 +- namedropper/Assets/Scripts/Wraparound.cs | 2 +- 9 files changed, 145 insertions(+), 180 deletions(-) rename namedropper/Assets/{PlayerJoin.cs => JoinGameBox.cs} (86%) rename namedropper/Assets/{PlayerJoin.cs.meta => JoinGameBox.cs.meta} (83%) diff --git a/namedropper/Assets/GameOverScreen.cs b/namedropper/Assets/GameOverScreen.cs index af7e72d..fe72266 100644 --- a/namedropper/Assets/GameOverScreen.cs +++ b/namedropper/Assets/GameOverScreen.cs @@ -47,7 +47,7 @@ public class GameOverScreen : MonoBehaviour private void Restart() { - SceneManager.LoadScene("Title"); + GameManager.Instance.RestartGame(); } // Update is called once per frame void Update() diff --git a/namedropper/Assets/PlayerJoin.cs b/namedropper/Assets/JoinGameBox.cs similarity index 86% rename from namedropper/Assets/PlayerJoin.cs rename to namedropper/Assets/JoinGameBox.cs index ab6b9c5..701af14 100644 --- a/namedropper/Assets/PlayerJoin.cs +++ b/namedropper/Assets/JoinGameBox.cs @@ -2,7 +2,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -public class PlayerJoin : MonoBehaviour +public class JoinGameBox : MonoBehaviour { // Start is called before the first frame update void Start() diff --git a/namedropper/Assets/PlayerJoin.cs.meta b/namedropper/Assets/JoinGameBox.cs.meta similarity index 83% rename from namedropper/Assets/PlayerJoin.cs.meta rename to namedropper/Assets/JoinGameBox.cs.meta index 9cba54f..4499ccc 100644 --- a/namedropper/Assets/PlayerJoin.cs.meta +++ b/namedropper/Assets/JoinGameBox.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7bae7ba566cf7134cba683a203eb4fc3 +guid: b0f368be5d400174b92900098ac898ec MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/namedropper/Assets/JoinPlayer.cs b/namedropper/Assets/JoinPlayer.cs index 0841ffd..3186106 100644 --- a/namedropper/Assets/JoinPlayer.cs +++ b/namedropper/Assets/JoinPlayer.cs @@ -9,6 +9,7 @@ public class JoinPlayer : MonoBehaviour [SerializeField] Text _title; [SerializeField] TMPro.TMP_Text _subtitle; + [SerializeField] Text _joinBoxText; public int _NumPlayersJoined = 0; int _timer = 100; @@ -64,16 +65,33 @@ public class JoinPlayer : MonoBehaviour void UpdateTitle() { - _title.text = "Roll to the box\n\n" + _NumPlayersJoined + " players joined"; + _title.text = "Roll to the box\n"; if (_timer < 99) { _title.text += "\n" + _timer; } + + if (_NumPlayersJoined > 0) + { + if (_NumPlayersJoined == 1) + { + _joinBoxText.text = "1 player joined"; + } + else + { + _joinBoxText.text = _NumPlayersJoined + " players joined"; + } + } } // Update is called once per frame void Update() { - + if (Input.GetKeyDown(KeyCode.Alpha4)) + { + _NumPlayersJoined = 4; + UpdateTitle(); + LoadTopicSelect(); + } } } diff --git a/namedropper/Assets/Resources/categories.yaml b/namedropper/Assets/Resources/categories.yaml index a9db1fd..a454e2b 100644 --- a/namedropper/Assets/Resources/categories.yaml +++ b/namedropper/Assets/Resources/categories.yaml @@ -889,4 +889,102 @@ Topics: - John Cena - The Undertaker - The Rock - - Bret Hart \ No newline at end of file + - Bret Hart +- Topic: 80s Pop Music + Categories: + - Category: Michael Jackson + Elements: + - "Thriller" + - "Billie Jean" + - "Beat It" + - "Bad" + - "The Way You Make Me Feel" + - "Man in the Mirror" + - "Human Nature" + - "Wanna Be Startin' Somethin'" + - "Smooth Criminal" + - "Black or White" + - Category: Prince + Elements: + - "When Doves Cry" + - "Purple Rain" + - "Kiss" + - "Let's Go Crazy" + - "1999" + - "Little Red Corvette" + - "Raspberry Beret" + - "I Would Die 4 U" + - "Sign o' the Times" + - "The Most Beautiful Girl in the World" + - Category: Madonna + Elements: + - "Like a Virgin" + - "Material Girl" + - "Papa Don't Preach" + - "Vogue" + - "Like a Prayer" + - "Holiday" + - "Crazy for You" + - "Borderline" + - "Lucky Star" + - "Into the Groove" + - Category: Whitney Houston + Elements: + - "I Wanna Dance With Somebody (Who Loves Me)" + - "Greatest Love of All" + - "How Will I Know" + - "Saving All My Love for You" + - "So Emotional" + - "One Moment in Time" + - "Where Do Broken Hearts Go" + - "Didn't We Almost Have It All" + - "All at Once" + - "I Have Nothing" + - Category: Cyndi Lauper + Elements: + - "Girls Just Want to Have Fun" + - "Time After Time" + - "True Colors" + - "She Bop" + - "All Through the Night" + - "The Goonies 'R' Good Enough" + - "Change of Heart" + - "I Drove All Night" + - "Money Changes Everything" + - "What's Going On" + - Category: George Michael + Elements: + - "Faith" + - "Careless Whisper" + - "Father Figure" + - "One More Try" + - "Freedom! '90" + - "I Want Your Sex" + - "Kissing a Fool" + - "Praying for Time" + - "Don't Let the Sun Go Down on Me" + - "Fastlove" + - Category: Duran Duran + Elements: + - "Hungry Like the Wolf" + - "Rio" + - "Girls on Film" + - "The Reflex" + - "A View to a Kill" + - "Save a Prayer" + - "Is There Something I Should Know?" + - "Union of the Snake" + - "Notorious" + - "Ordinary World" + - Category: U2 + Elements: + - "With or Without You" + - "I Still Haven't Found What I'm Looking For" + - "Where the Streets Have No Name" + - "Sunday Bloody Sunday" + - "Pride (In the Name of Love)" + - "New Year's Day" + - "One" + - "Desire" + - "Bullet the Blue Sky" + - "The Unforgettable Fire" \ No newline at end of file diff --git a/namedropper/Assets/Scenes/PlayerSelectJoin.unity b/namedropper/Assets/Scenes/PlayerSelectJoin.unity index 97699ee..1a03f4e 100644 --- a/namedropper/Assets/Scenes/PlayerSelectJoin.unity +++ b/namedropper/Assets/Scenes/PlayerSelectJoin.unity @@ -160,6 +160,17 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &177420396 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 1499098757669286102, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + m_PrefabInstance: {fileID: 1866955250} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1001 &261236785 PrefabInstance: m_ObjectHideFlags: 0 @@ -428,170 +439,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 277092716} m_CullTransparentMesh: 1 ---- !u!1 &292628915 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 292628916} - - component: {fileID: 292628917} - m_Layer: 0 - m_Name: BarRight - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &292628916 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 292628915} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 939.06, y: 10.08606, z: 0} - m_LocalScale: {x: 2, y: 1.675, z: 1} - m_Children: [] - m_Father: {fileID: 2075748657} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!212 &292628917 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 292628915} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 3 - m_Sprite: {fileID: 21300000, guid: 7a4abc8a226b01547a6b0f0bef45e38d, type: 3} - m_Color: {r: 0, g: 0, b: 0, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 280, y: 967} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 ---- !u!1 &681667552 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 681667553} - - component: {fileID: 681667554} - m_Layer: 5 - m_Name: BarLeft - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &681667553 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 681667552} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -798.47, y: 10.08606, z: 0} - m_LocalScale: {x: 1.3, y: 1.675, z: 1} - m_Children: [] - m_Father: {fileID: 2075748657} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!212 &681667554 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 681667552} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 3 - m_Sprite: {fileID: 21300000, guid: 7a4abc8a226b01547a6b0f0bef45e38d, type: 3} - m_Color: {r: 0, g: 0, b: 0, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 280, y: 967} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 --- !u!1 &868125098 GameObject: m_ObjectHideFlags: 0 @@ -1107,10 +954,7 @@ MonoBehaviour: m_HorizontalOverflow: 1 m_VerticalOverflow: 1 m_LineSpacing: 1 - m_Text: 'Roll ball to play - - - 2 players joined' + m_Text: Roll ball to play --- !u!222 &1225785574 CanvasRenderer: m_ObjectHideFlags: 0 @@ -1483,7 +1327,7 @@ MonoBehaviour: m_GameObject: {fileID: 1628978835} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7bae7ba566cf7134cba683a203eb4fc3, type: 3} + m_Script: {fileID: 11500000, guid: b0f368be5d400174b92900098ac898ec, type: 3} m_Name: m_EditorClassIdentifier: --- !u!1 &1641253471 @@ -1519,6 +1363,7 @@ MonoBehaviour: m_EditorClassIdentifier: _title: {fileID: 1225785573} _subtitle: {fileID: 0} + _joinBoxText: {fileID: 177420396} _NumPlayersJoined: 0 --- !u!4 &1641253473 Transform: @@ -1756,6 +1601,10 @@ PrefabInstance: propertyPath: m_Text value: JOIN GAME objectReference: {fileID: 0} + - target: {fileID: 1499098758628412650, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} - target: {fileID: 1499098758628412651, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} propertyPath: m_RootOrder value: 0 @@ -1823,8 +1672,6 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 681667553} - - {fileID: 292628916} - {fileID: 1866955251} m_Father: {fileID: 1666960088} m_RootOrder: 0 diff --git a/namedropper/Assets/Scripts/Game.cs b/namedropper/Assets/Scripts/Game.cs index f0f10b9..f12db7d 100644 --- a/namedropper/Assets/Scripts/Game.cs +++ b/namedropper/Assets/Scripts/Game.cs @@ -138,6 +138,7 @@ public class Game : Level void SpawnPowerup() { + /* if (GameManager.Instance.Round >= 2) { GameObject powerup = Instantiate(_powerupPrefab); @@ -149,6 +150,7 @@ public class Game : Level else Invoke("SpawnPowerup", Random.Range(10f, 20f)); } + */ } void StartGame() diff --git a/namedropper/Assets/Scripts/Player.cs b/namedropper/Assets/Scripts/Player.cs index 8b499b0..0125024 100644 --- a/namedropper/Assets/Scripts/Player.cs +++ b/namedropper/Assets/Scripts/Player.cs @@ -267,8 +267,8 @@ public class Player : MonoBehaviour } //join - PlayerJoin playerJoin = collision.gameObject.GetComponent(); - if (playerJoin != null) + JoinGameBox joinGameBox = collision.gameObject.GetComponent(); + if (joinGameBox != null) { /* //destroy the other player picker diff --git a/namedropper/Assets/Scripts/Wraparound.cs b/namedropper/Assets/Scripts/Wraparound.cs index 46b9853..adf6bf4 100644 --- a/namedropper/Assets/Scripts/Wraparound.cs +++ b/namedropper/Assets/Scripts/Wraparound.cs @@ -26,7 +26,7 @@ public class Wraparound : MonoBehaviour } - if (SceneManager.GetActiveScene().name == "TopicSelect" || SceneManager.GetActiveScene().name == "Calibration") + if (SceneManager.GetActiveScene().name == "TopicSelect" || SceneManager.GetActiveScene().name == "Calibration" || SceneManager.GetActiveScene().name == "PlayerSelectJoin") { if (this.transform.position.x < 0) {