Exemplo n.º 1
0
    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);
            }
        }
    }
Exemplo n.º 2
0
 // 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");
     }
 }
Exemplo n.º 3
0
 void Start()
 {
     _aimedSpeed = _carController.gameObject.GetComponent <AimedSpeed>();
 }
Exemplo n.º 4
0
 private void Start()
 {
     _carController = this.gameObject.GetComponent <CarController>();
     _aimedSpeed    = this.gameObject.GetComponent <AimedSpeed>();
 }