Esempio n. 1
0
    void Start()
    {
        foreach (GameObject g in carPerfabGroup)
        {
            SceneInteractiveManger.RecoverMatShader(g.transform);
        }

        if (autoSpawn)
        {
            GenAllLanePath();
            SpawnCars();
        }
    }
Esempio n. 2
0
    public void Initl(CarManger inCarManger, Vector3[] inMovePaht, int startID, float speedFactor)
    {
#if UNITY_EDITOR
        SceneInteractiveManger.RecoverMatShader(transform);
#endif

        speed              *= speedFactor;
        carManger           = inCarManger;
        movePath            = inMovePaht;
        currentAtMovePathID = startID;
        transform.position  = movePath[currentAtMovePathID];
        Run();
    }