private void OnTurnUpdate(int turnNumber, GameRefModel.BoatColors turnColor) { if (app.networkSyncManager.currentGameState == GameRefModel.GameState.GamePlaying) { UpdateTurnText(); } }
void PrepairTeamForTurn(int turnNumber, GameRefModel.BoatColors turnColor) { Debug.Log("this is what was passed through the event " + turnNumber + turnColor); InstantiateTimer(); LoadBomb(); LoadMine(); }
private void UpdateTurn() { currentSyncedTurn = model.playerTurn; currentSyncedTurnColor = (GameRefModel.BoatColors)currentSyncedTurn; IncreaseTurnCount(); if (OnNetworkTurnUpdate != null) { OnNetworkTurnUpdate(currentSyncedTurn, currentSyncedTurnColor); } }
public void NextTurn(GameRefModel.BoatColors colorThatEndedTurn) { int newTurn = (int)colorThatEndedTurn; newTurn += 1; if (newTurn > 1) { newTurn = 0; } app.networkSyncManager.UpdateNetworkedTurn(newTurn); app.networkSyncManager.UpdateNetworkedTurnState(GameRefModel.TurnState.Thinking); }
public void PlaceBoats(GameObject instantiatedBoat, int positionNumber, GameRefModel.BoatColors instantiateColor) { if (instantiateColor == GameRefModel.BoatColors.Yellow) { Vector3 spawnPosition = app.gameRefModel.yellowStartPositions[positionNumber].position; instantiatedBoat.transform.position = spawnPosition; } if (instantiateColor == GameRefModel.BoatColors.Red) { Vector3 spawnPosition = app.gameRefModel.redStartPositions[positionNumber].position; instantiatedBoat.transform.position = spawnPosition; } }
private void BoatActiviation(int turnNumber, GameRefModel.BoatColors turnColor) { if (realtimeView.isOwnedLocallyInHierarchy && app.networkSyncManager.currentGameState == GameRefModel.GameState.GamePlaying) { if (myTeamColor == turnColor) { myBoatPlan.SetActive(true); myBoatView.turnHighlighter.SetActive(true); } else { myBoatPlan.SetActive(false); myBoatView.turnHighlighter.SetActive(false); } } }
public void SomeoneLostTheGame(GameRefModel.BoatColors losingColor) { app.networkSyncManager.UpdateNetworkedGameState(GameRefModel.GameState.GameOver); }