Compare commits

...

2 Commits

Author SHA1 Message Date
Josh 051c0912e1 full game flow 1 year ago
Josh a84a0aa56c race picks topics 1 year ago
  1. 4740
      namedropper/Assets/Scenes/RaceGame.unity
  2. 4
      namedropper/Assets/Scripts/ChallengingStage.cs
  3. 2
      namedropper/Assets/Scripts/GameManager.cs
  4. 2
      namedropper/Assets/Scripts/JoinPlayer.cs
  5. 9
      namedropper/Assets/Scripts/Level.cs
  6. 5
      namedropper/Assets/Scripts/Player.cs
  7. 4
      namedropper/Assets/Scripts/TopicSelect.cs
  8. BIN
      namedropper/Assets/Sprites/racetrack.png

4740
namedropper/Assets/Scenes/RaceGame.unity

File diff suppressed because it is too large

4
namedropper/Assets/Scripts/ChallengingStage.cs

@ -53,7 +53,7 @@ public class ChallengingStage : Level
{ {
if (Input.GetKeyDown(KeyCode.F12)) if (Input.GetKeyDown(KeyCode.F12))
{ {
SceneManager.LoadScene("TopicSelect"); SceneManager.LoadScene("RaceGame");
} }
} }
IEnumerator Countdown() IEnumerator Countdown()
@ -75,7 +75,7 @@ public class ChallengingStage : Level
Game.Paused = true; Game.Paused = true;
yield return new WaitForSeconds(2.5f); yield return new WaitForSeconds(2.5f);
Game.Paused = false; Game.Paused = false;
SceneManager.LoadScene("TopicSelect"); SceneManager.LoadScene("RaceGame");
} }

2
namedropper/Assets/Scripts/GameManager.cs

@ -19,7 +19,7 @@ public class GameManager
int _round = 1; int _round = 1;
public bool[] PlayerJoined = new bool[4]; public bool[] PlayerJoined = new bool[4];
public static bool MINIGAMES = true; public static bool MINIGAMES = false;
public static int PLAYER_SKIN = 5; //0 == puck, 1 == pancake, 2 == gummybear, 3==pig, 4==ball w/ bear, 5==pop public static int PLAYER_SKIN = 5; //0 == puck, 1 == pancake, 2 == gummybear, 3==pig, 4==ball w/ bear, 5==pop
public static int MAX_PLAYER_SKIN = 5; public static int MAX_PLAYER_SKIN = 5;
public static int MVP = -1; public static int MVP = -1;

2
namedropper/Assets/Scripts/JoinPlayer.cs

@ -103,7 +103,7 @@ public class JoinPlayer : MonoBehaviour
if (GameManager.MINIGAMES) if (GameManager.MINIGAMES)
SceneManager.LoadScene("Wheel Scene"); SceneManager.LoadScene("Wheel Scene");
else else
SceneManager.LoadScene("TopicSelect"); SceneManager.LoadScene("RaceGame");
} }
void Redo() void Redo()

9
namedropper/Assets/Scripts/Level.cs

@ -107,7 +107,9 @@ public class Level : MonoBehaviour
{ {
if (GameManager.Instance.PlayerJoined[player.GetComponent<Player>()._playerNumber] == true || if (GameManager.Instance.PlayerJoined[player.GetComponent<Player>()._playerNumber] == true ||
SceneManager.GetActiveScene().name == "Title" || SceneManager.GetActiveScene().name == "Title" ||
SceneManager.GetActiveScene().name == "Ontology" SceneManager.GetActiveScene().name == "Ontology" ||
SceneManager.GetActiveScene().name == "RaceGame" ||
SceneManager.GetActiveScene().name == "Game"
) )
{ {
player.SetActive(true); player.SetActive(true);
@ -185,16 +187,17 @@ public class Level : MonoBehaviour
{ {
SceneManager.LoadScene("GameOver"); SceneManager.LoadScene("GameOver");
} }
else if (GameManager.Instance.Round == 3 && GameManager.MINIGAMES == false) /* else if (GameManager.Instance.Round == 3 && GameManager.MINIGAMES == false)
{ {
SceneManager.LoadScene("ChallengingStage"); SceneManager.LoadScene("ChallengingStage");
} }
*/
else else
{ {
if (GameManager.MINIGAMES) if (GameManager.MINIGAMES)
SceneManager.LoadScene("Wheel Scene"); SceneManager.LoadScene("Wheel Scene");
else else
SceneManager.LoadScene("TopicSelect"); SceneManager.LoadScene("RaceGame");
} }
} }
} }

5
namedropper/Assets/Scripts/Player.cs

@ -12,6 +12,7 @@ public class Player : MonoBehaviour
[SerializeField] KeyCode _keyLeft; [SerializeField] KeyCode _keyLeft;
[SerializeField] KeyCode _keyRight; [SerializeField] KeyCode _keyRight;
[SerializeField] KeyCode _keyDown; [SerializeField] KeyCode _keyDown;
[SerializeField] KeyCode _keyUp;
[SerializeField] KeyCode _keyDrop; [SerializeField] KeyCode _keyDrop;
[SerializeField] Team _team; [SerializeField] Team _team;
[SerializeField] TMPro.TextMeshProUGUI _text; [SerializeField] TMPro.TextMeshProUGUI _text;
@ -483,6 +484,10 @@ public class Player : MonoBehaviour
{ {
AddVelocity(new Vector2(0f, _curSpeed * Time.deltaTime * -1f)); AddVelocity(new Vector2(0f, _curSpeed * Time.deltaTime * -1f));
} }
if (Input.GetKey(_keyUp))
{
AddVelocity(new Vector2(0f, _curSpeed * Time.deltaTime * 1f));
}
} }
if (Input.GetKey(_keyDrop) && ALLOW_DROP) if (Input.GetKey(_keyDrop) && ALLOW_DROP)

4
namedropper/Assets/Scripts/TopicSelect.cs

@ -17,7 +17,7 @@ public class TopicSelect : Level
public const bool WORST_PLAYER_PICKS = false; public const bool WORST_PLAYER_PICKS = false;
public const bool WORST_TEAM_PICKS = true; public const bool WORST_TEAM_PICKS = false;
public const bool VOTE_ON_TOPIC = false; public const bool VOTE_ON_TOPIC = false;
@ -244,7 +244,7 @@ public class TopicSelect : Level
} }
} }
_topic1Box.TopicData = GameDataManager.Instance.GetRandomTopicData(); _topic1Box.TopicData = GameDataManager.Instance.GetRandomTopicData();
_topic2Box.TopicData = GameDataManager.Instance.GetRandomTopicData(); _topic2Box.TopicData = GameDataManager.Instance.GetRandomTopicData();
_topic3Box.TopicData = GameDataManager.Instance.GetRandomTopicData(); _topic3Box.TopicData = GameDataManager.Instance.GetRandomTopicData();
_topic1Box.Name = _topic1Box.TopicData.Topic; _topic1Box.Name = _topic1Box.TopicData.Topic;

BIN
namedropper/Assets/Sprites/racetrack.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Loading…
Cancel
Save