using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using MLAPI; using MLAPI.Messaging; public class WeatherWheel : NetworkBehaviour { private float wheelSpeed; private float subtractSpeed; public bool isSpinning = false; private bool onCooldown = false; public GameObject pointer; private float weatherDuration = 20f; private float postWeatherCooldown = 10f; void Start() { gameObject.GetComponent().enabled = false; pointer.SetActive(false); StartCoroutine(ShowWeatherWheel()); } IEnumerator ShowWeatherWheel() { // Get the time to complete the intro camera fly through float cameraLerpTime = Camera.main.GetComponent().playOnAwakeTime; // Wait for that many seconds - allows for time to complete the "cutscene" yield return new WaitForSecondsRealtime(cameraLerpTime); // Turn the wheel back on for the GameObject[] players = GameObject.FindGameObjectsWithTag("Player"); foreach (GameObject player in players) { ulong clientID = player.GetComponent().OwnerClientId; if (clientID == NetworkManager.Singleton.LocalClientId) { if (player.GetComponentInChildren() != null) { // Runner gameObject.SetActive(false); } else { // King gameObject.GetComponent().enabled = true; gameObject.GetComponent