Browse Source

some mild pacing

A
Josh 2 years ago
parent
commit
413e1d95e6
  1. 15
      namedropper/Assets/RoundIntro.cs
  2. 29
      namedropper/Assets/RoundOutro.cs
  3. 11
      namedropper/Assets/RoundOutro.cs.meta
  4. 4
      namedropper/Assets/Scenes/RoundIntro.unity
  5. 1047
      namedropper/Assets/Scenes/RoundOutro.unity
  6. 7
      namedropper/Assets/Scenes/RoundOutro.unity.meta
  7. 2
      namedropper/Assets/Scenes/TopicSelect.unity.meta
  8. 16
      namedropper/Assets/Scripts/Game.cs
  9. 8
      namedropper/Assets/Scripts/Player.cs
  10. 14
      namedropper/ProjectSettings/EditorBuildSettings.asset

15
namedropper/Assets/RoundIntro.cs

@ -1,14 +1,25 @@
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement;
public class RoundIntro : MonoBehaviour public class RoundIntro : MonoBehaviour
{ {
//[SerializeField] TMPro.TMP_Text _ [SerializeField] TMPro.TMP_Text _roundNumber;
[SerializeField] TMPro.TMP_Text _topic;
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
_roundNumber.text = "Round " + GameManager.Instance.Round.ToString();
_topic.text = GameDataManager.Instance.CurrentTopic.Topic;
Invoke("StartGame", 3f);
}
void StartGame()
{
SceneManager.LoadScene("Game");
} }
// Update is called once per frame // Update is called once per frame

29
namedropper/Assets/RoundOutro.cs

@ -0,0 +1,29 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class RoundOutro : MonoBehaviour
{
[SerializeField] TMPro.TMP_Text _title;
[SerializeField] TMPro.TMP_Text _subtitle;
// Start is called before the first frame update
void Start()
{
_subtitle.text = "light blue" + " player may\nchoose the topic";
Invoke("Advance", 3f);
}
void Advance()
{
SceneManager.LoadScene("TopicSelect");
}
// Update is called once per frame
void Update()
{
}
}

11
namedropper/Assets/RoundOutro.cs.meta

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 232fe45a665e70b4eaa053db797206c9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

4
namedropper/Assets/Scenes/RoundIntro.unity

@ -427,6 +427,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 54b1713443cbeba4892a6e7701b8e3c5, type: 3} m_Script: {fileID: 11500000, guid: 54b1713443cbeba4892a6e7701b8e3c5, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
_roundNumber: {fileID: 405287454}
_topic: {fileID: 2111496406}
--- !u!4 &884138491 --- !u!4 &884138491
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -785,7 +787,7 @@ GameObject:
- component: {fileID: 2111496407} - component: {fileID: 2111496407}
- component: {fileID: 2111496406} - component: {fileID: 2111496406}
m_Layer: 5 m_Layer: 5
m_Name: Round Number (1) m_Name: Topic
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0

1047
namedropper/Assets/Scenes/RoundOutro.unity

File diff suppressed because it is too large

7
namedropper/Assets/Scenes/RoundOutro.unity.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3982c6ec82b64f343a20d6a1e9b6f32f
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

2
namedropper/Assets/Scenes/TopicSelect.unity.meta

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 91a4af9a6af9fc840b522128085513da guid: a657dedad7b62af40a8121078bc5d04e
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

16
namedropper/Assets/Scripts/Game.cs

@ -19,6 +19,11 @@ public class Game : MonoBehaviour
Category[] _categories; Category[] _categories;
int _originalFontSize; int _originalFontSize;
static bool _paused = false;
public static bool Paused { get => _paused; set => _paused = value; }
// Start is called before the first frame update // Start is called before the first frame update
void Awake() void Awake()
{ {
@ -111,7 +116,14 @@ public class Game : MonoBehaviour
} }
yield return new WaitForSeconds(1f); yield return new WaitForSeconds(1f);
} }
Timer.text = "TIME'S UP!";
Timer.fontSize = _originalFontSize + 70;
Paused = true;
yield return new WaitForSeconds(5f);
Paused = false;
NextRound(); NextRound();
} }
void NextRound() void NextRound()
@ -187,6 +199,10 @@ public class Game : MonoBehaviour
// Update is called once per frame // Update is called once per frame
void Update() void Update()
{ {
if (Input.GetKeyDown(KeyCode.F10))
{
_seconds-=5;
}
if (Input.GetKeyDown(KeyCode.F12)) if (Input.GetKeyDown(KeyCode.F12))
{ {
NextRound(); NextRound();

8
namedropper/Assets/Scripts/Player.cs

@ -205,13 +205,19 @@ public class Player : MonoBehaviour
if (topicBox != null) if (topicBox != null)
{ {
GameDataManager.Instance.CurrentTopic = topicBox.TopicData; GameDataManager.Instance.CurrentTopic = topicBox.TopicData;
SceneManager.LoadScene("Game"); SceneManager.LoadScene("RoundIntro");
} }
} }
// Update is called once per frame // Update is called once per frame
void Update() void Update()
{ {
if (Game.Paused)
{
GameObject.Destroy(this.gameObject);
return;
}
_timeToFlip -= Time.deltaTime; _timeToFlip -= Time.deltaTime;

14
namedropper/ProjectSettings/EditorBuildSettings.asset

@ -5,15 +5,21 @@ EditorBuildSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
m_Scenes: m_Scenes:
- enabled: 0
path:
guid: 00000000000000000000000000000000
- enabled: 1 - enabled: 1
path: Assets/Scenes/Title.unity path: Assets/Scenes/Title.unity
guid: 6ee247bbdb0f38647998cd2523f264c7 guid: 6ee247bbdb0f38647998cd2523f264c7
- enabled: 1 - enabled: 1
path: Assets/Scenes/TopicSelect.unity path: Assets/Scenes/TopicSelect.unity
guid: 91a4af9a6af9fc840b522128085513da guid: a657dedad7b62af40a8121078bc5d04e
- enabled: 0
path:
guid: 00000000000000000000000000000000
- enabled: 1
path: Assets/Scenes/RoundIntro.unity
guid: b0725f8c0f4a77b4cb681eccd438a4c2
- enabled: 1
path: Assets/Scenes/RoundOutro.unity
guid: 3982c6ec82b64f343a20d6a1e9b6f32f
- enabled: 1 - enabled: 1
path: Assets/Scenes/Game.unity path: Assets/Scenes/Game.unity
guid: fc389e04780671f498562f1d56f81afb guid: fc389e04780671f498562f1d56f81afb

Loading…
Cancel
Save