示例#1
0
    void OnEnable()
    {
        mainCamera      = PETools.PEUtil.MainCamTransform;
        carTransform    = SelectCar.carTransform;
        driverTransform = SelectCar.carDriver.transform;
        driver          = SelectCar.carDriver;

        originalCarLocalPosition = carTransform.localPosition;
        originalCarLocalRotation = carTransform.localRotation;

        ready          = false;
        speed          = 0;
        score          = 0;
        scoreText.text = "0m";

        slideDirection       = 0;
        barriers             = new List <Barrier>(16);
        nextGenerateDistance = generateLength;
    }
示例#2
0
 void Awake()
 {
     driver = GetComponent <PathDriver>();
 }