From 937006e07c6f2f1b7886e9927021b3c08667204b Mon Sep 17 00:00:00 2001 From: Fangh Date: Mon, 29 Jan 2024 23:49:48 +0100 Subject: [PATCH] feat: go to scoringpage --- Assets/Scenes/ComputerView.unity | 16 +++++++++++++++- Assets/Scripts/RoomManager.cs | 6 +++++- Assets/Scripts/ScoringPage.cs | 11 +++++++++++ Assets/Scripts/ScoringPage.cs.meta | 11 +++++++++++ 4 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 Assets/Scripts/ScoringPage.cs create mode 100644 Assets/Scripts/ScoringPage.cs.meta diff --git a/Assets/Scenes/ComputerView.unity b/Assets/Scenes/ComputerView.unity index 2a47a40..fd5b317 100644 --- a/Assets/Scenes/ComputerView.unity +++ b/Assets/Scenes/ComputerView.unity @@ -1706,6 +1706,7 @@ MonoBehaviour: counterSFX: {fileID: 8300000, guid: 2ff45dbe56b6a4d08bfa7b103fa4effb, type: 3} waitForPropositionsPage: {fileID: 1730465904} votingPage: {fileID: 1660260835} + scoringPage: {fileID: 581333955} promptList: {fileID: 11400000, guid: 21907abc84e40403ca34c4fb9ab30b06, type: 2} --- !u!114 &375256413 MonoBehaviour: @@ -2268,8 +2269,9 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 581333954} + - component: {fileID: 581333955} m_Layer: 5 - m_Name: ScorePlayersState + m_Name: ScoringPage m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -2297,6 +2299,18 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &581333955 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 581333953} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ae520d9a7647819498ae6228ced27630, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &593191224 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/RoomManager.cs b/Assets/Scripts/RoomManager.cs index 2da09a5..6e09dc5 100644 --- a/Assets/Scripts/RoomManager.cs +++ b/Assets/Scripts/RoomManager.cs @@ -35,6 +35,9 @@ public class RoomManager : MonoBehaviour [Header("Waiting For Proposition Page")] public VotingPage votingPage; + [Header("Scoring Page")] + public ScoringPage scoringPage; + [Header("Other")] public PromptList promptList; private Room myRoom = null; @@ -276,7 +279,7 @@ private void OnNewGameStateStarted() Debug.Log("New State : MakeProposition"); AudioManager.Instance.ChangeMusic(MusicTitle.TakingPicture); waitForPropositionsPage.Initialize(myRoom, () => SendRoomState(GameState.MakeVote)); - waitingForPlayersPage.SetActive(false); + explanationPage.SetActive(false); break; case (int)GameState.MakeVote: @@ -290,6 +293,7 @@ private void OnNewGameStateStarted() case (int)GameState.Score: Debug.Log("It's score time !"); + scoringPage.Initialize(); break; default: diff --git a/Assets/Scripts/ScoringPage.cs b/Assets/Scripts/ScoringPage.cs new file mode 100644 index 0000000..99d0459 --- /dev/null +++ b/Assets/Scripts/ScoringPage.cs @@ -0,0 +1,11 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class ScoringPage : MonoBehaviour +{ + public void Initialize() + { + gameObject.SetActive(true); + } +} diff --git a/Assets/Scripts/ScoringPage.cs.meta b/Assets/Scripts/ScoringPage.cs.meta new file mode 100644 index 0000000..c918c92 --- /dev/null +++ b/Assets/Scripts/ScoringPage.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ae520d9a7647819498ae6228ced27630 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: