private void OnTriggerEnter(Collider other) { AIController aiController = other.GetComponent <AIController>(); AimedSpeed aimedSpeed = other.GetComponent <AimedSpeed>(); if (aiController != null) { if (aiController.GetIsReversed() == false) { aimedSpeed.SetRuleSpeed(speedInNormalPath / 3.6f); } else { aimedSpeed.SetRuleSpeed(speedInReversePath / 3.6f); } } }
// Start is called before the first frame update void Start() { _aimedSpeed = _carController.gameObject.GetComponent <AimedSpeed>(); WarningText.enabled = false; WarningTriangle.enabled = false; TorBackSign.enabled = false; TorBackText.enabled = false; if (!IsEvent) { if (!ManualDriving) { AIDrive(false); } else { ManualDrive(); _carController.gameObject.GetComponent <ControlSwitch>().SwitchControl(ManualDriving); } //Debug.Log("Dreieck Aus"); } }
void Start() { _aimedSpeed = _carController.gameObject.GetComponent <AimedSpeed>(); }
private void Start() { _carController = this.gameObject.GetComponent <CarController>(); _aimedSpeed = this.gameObject.GetComponent <AimedSpeed>(); }