void Update() { if (CurrentState != GameState.game) { return; } _distance = _player.transform.position.z - _startPos.z; _levelSpawner.OnDistanceChanged(_distance); }
void Update() { if (CurrentState != GameState.game) { return; } _distance = _player.transform.position.z - _startPos.z; _levelSpawner.OnDistanceChanged(_distance); }