private void OnButtonPress(TrawnButton button, TrawnPlayer player) { if (!_isLoading && button == TrawnButton.Blue) { LoadGameScene(); } }
private void OnButtonPress(TrawnButton button, TrawnPlayer player) { if (button == TrawnButton.Menu && Time.unscaledTime - _startTime > 1f) { _launcherScene.LoadScene(); } }
public static bool IsActionButton(TrawnButton button) { if (button == TrawnButton.Blue || button == TrawnButton.Purple || button == TrawnButton.Green) { return(true); } return(false); }
public bool GetButton(TrawnButton button, TrawnPlayer player = TrawnPlayer.None) { var key = _inputKeys.GetKey(button, player); if (key == null) { return(false); } return(Input.GetButton(key)); }
public static bool IsStickButton(TrawnButton button) { if (button == TrawnButton.Left || button == TrawnButton.Right || button == TrawnButton.Up || button == TrawnButton.Down) { return(true); } return(false); }
private void OnButtonPress(TrawnButton button, TrawnPlayer player) { if (button == TrawnButton.Menu) { Application.Quit(); } else if (button == TrawnButton.Blue) { StartGame(); } }
private void OnButtonPress(TrawnButton button, TrawnPlayer player) { if (!_interactionEnabled) { return; } if (button == TrawnButton.Menu) { _lobbyScene.LoadScene(); } if (button == TrawnButton.Blue) { SceneManager.LoadScene(SceneManager.GetActiveScene().name); } }
private void OnButtonPress(TrawnButton button, TrawnPlayer player) { if ((int)player != _playerIndex) { return; } if (!TrawnButtonHelper.IsActionButton(button)) { return; } if (!_hasJoined) { Join(); } else if (button == TrawnButton.Green) { Unjoin(); } }
public string GetKey(TrawnButton button, TrawnPlayer player = TrawnPlayer.None) { if (button == TrawnButton.Menu) { return("Cancel"); } if (_keyLookup == null) { return(null); } if (!_keyLookup.ContainsKey(player)) { return(null); } if (_keyLookup[player] == null) { return(null); } if (!_keyLookup[player].ContainsKey(button)) { return(null); } return(_keyLookup[player][button]); }