public void SetGameMode(GameModes mode) { if (_gameMode == mode) { return; } _gameMode = mode; OnGameModeChanged(emptyArgs); Debug.Log("Game mode changed to: " + mode.ToString()); }
void OnEnable() { if (PlayerPrefs.HasKey(mode.ToString())) { gameObject.SetActive(false); showingTut = false; return; } showingTut = true; inGameText.gameObject.SetActive(true); endGameText.gameObject.SetActive(false); tapToPlayText.gameObject.SetActive(false); inGameText.text = mechanicsText; gm.OnGameStart += GameStarted; gm.OnPushBall += PushedBall; gm.OnDeathBeforeAd += GameEnded; gm.OnGameRevive += Revive; gm.OnGameEnd += GameEnded; }
public void ToggleThroughGameModes() { if (_gameMode == GameModes.INFINITE) { _gameMode = GameModes.LIMITED; } else { _gameMode = GameModes.INFINITE; } OnGameModeChanged(emptyArgs); Debug.Log("Game mode changed to: " + _gameMode.ToString()); }
// methods // public void V_PlayerTemplate() // { // players = new List<V_PlayerTemplate>(); // } public void Form(ref WWWForm form) { form.AddField("hasAnActiveGame", hasAnActiveGame.ToString()); form.AddField("roomName", roomName); form.AddField("ID", ID.ToString()); form.AddField("map", map.ToString()); form.AddField("playerMode", playerMode.ToString()); form.AddField("gameMode", gameMode.ToString()); form.AddField("objectives", objectives.ToString()); form.AddField("password", password); form.AddField("weaponFilter", weaponFilter.ToString()); form.AddField("gameTime", gameTime.ToString()); form.AddField("autoTeamSelection", autoTeamSelection.ToString()); }
/// <summary> /// Changes given Node's Game Mode /// </summary> /// <param name="_nodeID">Node ID Value</param> /// <param name="mode">Game Mode Value</param> /// <returns></returns> public GameModes ChangeGameMode(int _nodeID, GameModes mode) { switchMode = true; if (node[_nodeID].type == ComModes.canBus) { int nodeAddress = Convert.ToInt32(this.node[_nodeID].address); //Get Address cb.ChangeGameMode(nodeAddress, mode); Thread.Sleep(10); } node[_nodeID].gameMode = mode.ToString(); return(mode); }
/// <summary> /// Changes Game Mode on all Nodes /// </summary> /// <param name="mode">Game Mode Value</param> /// <returns></returns> public GameModes ChangeGameMode(GameModes mode) { switchMode = true; foreach (Nodes nd in node) { node[nd.id].gameMode = mode.ToString(); } if (canbusPresent) { cb.ChangeGameMode(0, mode); Thread.Sleep(10); } return(mode); }
void SetGameModeText() { _gameModeText.text = string.Format("Game Mode: {0}", _currentGameMode.ToString()); }
private void GameOnGameStateChangeEvent(GameModes mode) { _serverState = mode; Write(mode.ToString(), Color.Aqua); }