Ejemplo n.º 1
0
 public void Setup()
 {
     _trackController = FindObjectOfType <RaceTrackController>();
     _rigidBody       = GetComponent <Rigidbody2D>();
     _input           = Vector2.zero;
     _velocity        = Vector2.zero;
 }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        FINISH_LINE_LAYER = LayerMask.NameToLayer("FinishLine");

        _trackController = FindObjectOfType <RaceTrackController>();
        _trackController.onLapFinished  = OnLapFinished;
        _trackController.onRaceFinished = OnRaceFinished;

        RetainedUserPicksScript userPicksScript = RetainedUserPicksScript.Instance;

        _multiplayerGame = userPicksScript.multiplayerGame;
        if (!_multiplayerGame)
        {
            SetupSinglePlayerGame();
        }
        else
        {
            SetupMultiplayerGame();
        }
    }