Exemplo n.º 1
0
    public virtual void Init()
    {
        motor = GetComponent <VehicleMotor>();
        body  = GetComponent <Rigidbody>();

        raceManager = GameObject.Find("RaceManager").GetComponent <RaceManager>();

        NextCheckPoint = raceManager.GetNextCheckPoint(this);
        OnNextCheckPoint();

        if (raceManager != null && !raceManager.bRaceComplete)
        {
            raceManager.AddCar(this);
        }
    }