Skip to content

Commit

Permalink
UI/UX and behavior fixes (#8)
Browse files Browse the repository at this point in the history
* Present custom score to win as an int

* Fix intro skip. Toggle game mode with back btn
  • Loading branch information
PNone authored Jan 3, 2023
1 parent d0c9a3a commit fba9983
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions HohimBrueh/Assets/Scripts/Controllers/GameController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class GameController : MonoBehaviour
public static bool charactersBounceEachOther = false;
public static bool weirdBounceTrajectories = false;
public static bool onlyBounceBeforeRecover = true;
public static bool allowTeamMode = false;
public static bool allowTeamMode = true;
public static bool allowCustomScoreToWin = false;
public static float customScoreToWin = 10f;

Expand Down Expand Up @@ -227,7 +227,7 @@ void Update()
if (assignedPlayers == 0 && allowTeamMode)
{

if (Input.GetKeyDown(KeyCode.F5))
if (Input.GetKeyDown(KeyCode.F5) || Input.GetKeyDown(KeyCode.JoystickButton6)) // Controller back button
{
isTeamMode = !isTeamMode;
joinGameModeText.text = isTeamMode ? "TEAM" : "FREE FOR ALL";
Expand Down Expand Up @@ -698,10 +698,10 @@ public void OnGUI()
charactersBounceEachOther = GUILayout.Toggle(charactersBounceEachOther, "Characters Bounce Each Other");
weirdBounceTrajectories = GUILayout.Toggle(weirdBounceTrajectories, "Weird Bounce Trajectories");
onlyBounceBeforeRecover = GUILayout.Toggle(onlyBounceBeforeRecover, "Only Bounce Before Recover");
allowTeamMode = GUILayout.Toggle(allowTeamMode, "Allow Team Deathmatch (F5 to toggle mode)");
allowTeamMode = GUILayout.Toggle(allowTeamMode, "Allow Team Deathmatch (F5/back to toggle mode)");
allowCustomScoreToWin = GUILayout.Toggle(allowCustomScoreToWin, "Use Custom Score To Win");
customScoreToWin = GUILayout.HorizontalScrollbar(customScoreToWin, 1.0f, 1.0f, 100.0f);
GUILayout.Label($"Custom score to win is {customScoreToWin}");
GUILayout.Label($"Custom score to win is {(int)customScoreToWin}");
GUILayout.EndArea();
}
}
Expand Down
4 changes: 2 additions & 2 deletions HohimBrueh/Assets/Scripts/Controllers/IntroAnimController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ void Update()
InputReader.GetInput(input);
if (cameraPosM == 1f)
{
if (input.start && !input.wasStart)
if (Input.GetKeyDown(KeyCode.JoystickButton7)) // Start button
{
UnityEngine.SceneManagement.SceneManager.LoadScene("JoinScreen");
}
}
else
{
if (input.start && !input.wasStart)
if (Input.GetKeyDown(KeyCode.JoystickButton7)) // Start button
{
animator.CrossFade(animator.GetCurrentAnimatorStateInfo(-1).shortNameHash, 0f, 0, 0.95f);
cameraPanning = true;
Expand Down

0 comments on commit fba9983

Please sign in to comment.