public override void Render() { Terminal.Clear(); StateHandler.Draw(); AnimationHandler.Draw(_mapLayer); bool inMission = StateHandler.Peek().Match( some: state => !(state is MenuState) && !(state is IntermissionFrameState), none: () => false); if (inMission) { InfoPanel.Draw(_infoLayer); RadarPanel.Draw(_radarLayer); ObjectivePanel.Draw(_objectiveLayer); MessagePanel.Draw(_messageLayer); foreach (KeyValuePair <ISchedulable, int> kvp in EventScheduler._schedule) { if (kvp.Key is DelayAttack da) { da.Draw(_mapLayer); } } } Terminal.Refresh(); }
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); }
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); }