public void Update() { if (RewiredPlayer.GetButtonDown("Level1")) { LoadLevel(1); } if (RewiredPlayer.GetButtonDown("Level2")) { LoadLevel(2); } if (RewiredPlayer.GetButtonDown("Level3")) { LoadLevel(3); } List <int> combinedVotes = new List <int>(); for (int i = 0; i < votes.Length; i++) { for (int j = 0; j < votes[i]; j++) { combinedVotes.Add(i); } } if (combinedVotes.Count > 0) { if (spawning == false) { Invoke("SelectLevel", voteTime); } } else if (combinedVotes.Count <= 0) { CancelInvoke("SelectLevel"); spawning = false; } }
public float GetAxis(InputActions input) { return(RewiredPlayer.GetAxis(input.ToString())); }
public bool GetButton(InputActions input) { return(RewiredPlayer.GetButton(input.ToString())); }