void Start() { if (TutorialDialogPrefabs.Count > 0) { SetCurrentDialog(0); PowerUpManager.enabled = false; } if (ClientSceneManager.Instance != null) { StartCoroutine(ApplyLobbyPlayerCarProperties()); } else { Garage.ApplyVehicleToShell(Garage.AvailableVehicles [1], CarObject, 320); } PowerUpManager.SpeedBoostActivatedEvent += SetSpeedTxt; PowerUpManager.InkSplatterActivatedEvent += SetSplatTxt; PowerUpManager.ShieldActivatedEvent += SetShieldTxt; PowerUpManager.GrowActivatedEvent += SetGrowTxt; PowerUpManager.ShrinkActivatedEvent += SetShrinkTxt; if (ClientSceneManager.Instance != null) { ClientSceneManager.Instance.OnCountDownTimeUpdateEvent += OnCountDownTimeUpdate; ClientSceneManager.Instance.OnCountDownCanceledEvent += OnCountDownCanceled; } }
private void ApplyCarProperties() { var player = LobbyPlayer(); CarProperties.OriginalHue = player.colour; Garage garage = GameObject.FindObjectOfType <Garage> (); if (garage != null) { garage.ApplyVehicleToShell(player.vehicleId, gameObject, player.colour); } else { Debug.LogWarning("couldn't find garage"); } }