void Start() { NetworkSyncManager.OnNetworkTurnUpdate += PrepairTeamForTurn; realtime = FindObjectOfType <Realtime>(); realtimeView = GetComponent <RealtimeView>(); globalTurnSync = FindObjectOfType <NetworkSyncManager>(); InstantiateTimer(); LoadMine(); LoadBomb(); DisplayPlacard(); if (realtimeView.isOwnedLocallyInHierarchy) { app.gameRefModel.localTeamModel = teamData; //mine setup teamData.totalMines = app.gameRefModel.startingMines; if (teamData.teamColor == GameRefModel.BoatColors.Yellow) { app.uiView.yellowMineText.text = "" + teamData.totalMines; app.uiView.yellowMineInventory.SetActive(true); } if (teamData.teamColor == GameRefModel.BoatColors.Red) { app.uiView.redMineText.text = "" + teamData.totalMines; app.uiView.redMineInventory.SetActive(true); } } }
// Start is called before the first frame update void Awake() { gameRefModel = FindObjectOfType <GameRefModel>(); gameRefController = FindObjectOfType <GameRefController>(); networkSyncManager = FindObjectOfType <NetworkSyncManager>(); terrainController = FindObjectOfType <TerrainController>(); realtime = FindObjectOfType <Realtime>(); }
// Start is called before the first frame update void Start() { EventManager.OnTurnUpdate += InstantiateTimer; _realtime = FindObjectOfType <Realtime>(); globalTurnSync = FindObjectOfType <NetworkSyncManager>(); if (globalTurnSync.currentSyncedTurn == 0 && (int)boatColor == 0) { personalTimer = Realtime.Instantiate(prefabName: "YellowTimer", ownedByClient: true, preventOwnershipTakeover: true, useInstance: _realtime); } else if (globalTurnSync.currentSyncedTurn == 1 && (int)boatColor == 1) { personalTimer = Realtime.Instantiate(prefabName: "RedTimer", ownedByClient: true, preventOwnershipTakeover: true, useInstance: _realtime); } }
void Start() { boatPath = GetComponent <LineRenderer>(); boatRigid = GetComponent <Rigidbody>(); _realtimeView = GetComponent <RealtimeView>(); _realtime = FindObjectOfType <Realtime>(); _globalTurnSync = FindObjectOfType <NetworkSyncManager>(); if (_realtimeView.isOwnedLocallyInHierarchy) { GetComponent <RealtimeTransform>().RequestOwnership(); highlighter.SetActive(true); } else { highlighter.SetActive(false); } //localRef = FindObjectOfType<GameRef>(); //localRef.AddToBoatList(gameObject, boatColor); }
void Start() { _globalTurnSync = FindObjectOfType <NetworkSyncManager>(); }
// Start is called before the first frame update void Start() { globalTurnSync = FindObjectOfType <NetworkSyncManager>(); timerRenderer = GetComponent <Renderer>(); currentDuration = turnDuration; }
void Start() { localTurnSync = GetComponent <NetworkSyncManager>(); localRenderer = GetComponent <Renderer>(); //EventManager.OnTurnUpdate += UpdateTurnDisplay; }
private void Awake() { Instance = this; InitCustomProperties(); }