From 3709f8819bb172be64942e20aa956dacd4df6761 Mon Sep 17 00:00:00 2001 From: Josh Date: Sat, 18 Feb 2023 00:13:24 -0500 Subject: [PATCH] ability to cycle through skins --- namedropper/Assets/Scripts/Game.cs | 9 +++++++++ namedropper/Assets/Scripts/GameManager.cs | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/namedropper/Assets/Scripts/Game.cs b/namedropper/Assets/Scripts/Game.cs index 7973434..b138a01 100644 --- a/namedropper/Assets/Scripts/Game.cs +++ b/namedropper/Assets/Scripts/Game.cs @@ -191,5 +191,14 @@ public class Game : MonoBehaviour { NextRound(); } + if (Input.GetKeyDown(KeyCode.F11)) + { + GameManager.PLAYER_SKIN++; + if (GameManager.PLAYER_SKIN > GameManager.MAX_PLAYER_SKIN) + { + GameManager.PLAYER_SKIN = 0; + } + GameManager.Instance.RestartGame(); + } } } diff --git a/namedropper/Assets/Scripts/GameManager.cs b/namedropper/Assets/Scripts/GameManager.cs index b3a2a30..c388788 100644 --- a/namedropper/Assets/Scripts/GameManager.cs +++ b/namedropper/Assets/Scripts/GameManager.cs @@ -19,7 +19,8 @@ public class GameManager int _numPlayers; bool _competitive = true; - public const int PLAYER_SKIN = 4; //0 == puck, 1 == pancake, 2 == gummybear, 3==pig, 4==ball w/ bear + public static int PLAYER_SKIN = 0; //0 == puck, 1 == pancake, 2 == gummybear, 3==pig, 4==ball w/ bear + public static int MAX_PLAYER_SKIN = 4; public GameManager() {