public void InitPanels() { Transform firstPersonTransform = _transform.Find("Chassis/FirstPerson"); SystemsPanel = new SystemsPanel(firstPersonTransform); GearPanel = new GearPanel(firstPersonTransform); _compassPanel = new CompassPanel(firstPersonTransform); RadarPanel = new RadarPanel(this, firstPersonTransform); }
/// <summary> /// Sets references to components that will display information about a partyMember /// </summary> public void SetExternalDisplayComponents() { eventDescription = EventManager.instance.eventDescription; actionsPanel = EventManager.instance.actionsPanel; partyPanel = EventManager.instance.partyPanel; gearPanel = EventManager.instance.gearPanel; candlesPanel = EventManager.instance.candlesPanel; statusPanel = EventManager.instance.statusPanel; skillsPanel = EventManager.instance.skillsPanel; utilityTabManager = EventManager.instance.utilityTabManager; }
private void Explode() { _rigidBody.AddForce(Vector3.up * _rigidBody.mass * 5f, ForceMode.Impulse); CarInput carInputController = GetComponent <CarInput>(); if (carInputController != null) { Destroy(carInputController); } AudioSource explosionSource = _cacheManager.GetAudioSource(_gameObject, "xcar"); if (explosionSource != null) { explosionSource.volume = 0.9f; explosionSource.Play(); } EngineRunning = false; Destroy(_engineLoopSound); Destroy(_engineStartSound); Movement.Destroy(); Movement = null; AI = null; WeaponsController = null; SpecialsController = null; SystemsPanel = null; GearPanel = null; _compassPanel = null; RadarPanel = null; Destroy(transform.Find("FrontLeft").gameObject); Destroy(transform.Find("FrontRight").gameObject); Destroy(transform.Find("BackLeft").gameObject); Destroy(transform.Find("BackRight").gameObject); }