Browse Source

race picks topics

combinedRaceAndNameDropper
Josh 1 year ago
parent
commit
a84a0aa56c
  1. 4582
      namedropper/Assets/Scenes/RaceGame.unity
  2. 4
      namedropper/Assets/Scripts/Level.cs
  3. 5
      namedropper/Assets/Scripts/Player.cs
  4. BIN
      namedropper/Assets/Sprites/racetrack.png

4582
namedropper/Assets/Scenes/RaceGame.unity

File diff suppressed because it is too large

4
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);

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)

BIN
namedropper/Assets/Sprites/racetrack.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 94 KiB

Loading…
Cancel
Save