示例#1
0
    /* Freezes the game, feeds successful player record
     * into new ghost car then starts timer.
     */
    void PrepareForNewWave()
    {
        Time.timeScale = 0;
        m_Paused       = true;

        GhostCar ghost = Managers.ObjectManager.AvailableGhostCar;

        ghost.SetData(m_PlayerCar.RecordArray, m_CurrentEntranceExitPair);
        ghost.UpdateParams(m_CurrentLevel);
        m_AllCars.Add(ghost);

        StartCoroutine(TimerRoutine());
    }
示例#2
0
    void OnTriggerExit2D(Collider2D coll)
    {
        if (coll.tag == "PlayerCar")
        {
            if (!lapController.LapStarted)
            {
                lapController.LapStarted = true;
                ghostCar             = coll.GetComponent <GhostCar>();
                ghostCar.isRecording = true;
            }
            else
            {
                if (gc.CanFinishLap)
                {
                    lapController.LapFinished();
                }

                else
                {
                }
            }
        }
    }