Ejemplo n.º 1
0
    void RpcResetRacers()
    {
        _raceStarted = true;

        int i = 1;

        foreach (KeyValuePair <GameObject, int> racer in _racers)
        {
            racer.Key.transform.position = transform.position + (transform.forward * 3 * i);
            racer.Key.transform.LookAt(transform);
            Vector3 p = racer.Key.transform.position;
            racer.Key.transform.position = new Vector3(p.x, 0.13f, p.z);
            EnergySystem engine = racer.Key.GetComponent <EnergySystem>();
            engine.RestartEngine();
            engine.IsLocked = true;
            ++i;
        }
    }