示例#1
0
    void Start()
    {
        if (_focus == null)
        {
            return;
        }

        _carController = _focus.GetComponent <SurfaceClampedCarController>();

        if (_carController)
        {
            _averageSpeed = _carController.m_curSpeed;
        }
    }
示例#2
0
 // Start is called before the first frame update
 void Start()
 {
     _life       = GetComponent <PlayerLife>();
     _controller = GetComponent <SurfaceClampedCarController>();
     _life.OnDeath.AddListener(OnDeath);
 }
示例#3
0
 // Start is called before the first frame update
 void Start()
 {
     _life = GetComponent <PlayerLife>();
     _car  = GetComponent <SurfaceClampedCarController>();
 }