public override void Run() { base.Run(); GameObject currentVehicle = VTOLAPI.instance.GetPlayersVehicleGameObject(); manager = currentVehicle.GetComponentInChildren <MFDManager>(); List <MFD> mfds = manager.mfds; System.Random rand = new System.Random(); Debug.Log($"Found {mfds.Count.ToString()} MFDs"); int index = rand.Next(mfds.Count); mfds[index].TogglePower(); StartWarning(); }
public void Awake() { a = this; }