private string _activeStageName; // 現在のステージ名 // Start is called before the first frame update void Start() { Debug.Log("TimeAttackStart"); _activeStageName = SceneManager.GetActiveScene().name; FindInfoByScene.Instance.EntryPlayerName(); int lapMax = FindInfoByScene.Instance.GetLapMax(_activeStageName); Debug.Log("lapMax:" + lapMax); GameObject[] racingCars = GameObject.FindGameObjectsWithTag("RacingCar"); for (int idx = 0; idx < FindInfoByScene.Instance.GetPlayerNum; idx++) { racingCars[idx].GetComponent <LapCount>().SetUp(); racingCars[idx].GetComponent <CheckPointCount>().SetUp(); } timeRanking = timeRanking.GetComponent <TimeRanking>(); // 第一引数をコース名にする timeRanking.SetUpTimeRanking(_activeStageName, 6, lapMax); dispRanking = dispRanking.GetComponent <DispRanking>(); goalFlag = goalFlag.GetComponent <GoalFlag>(); timeCounter = timeCounter.GetComponent <TimeCount>(); startCounter = startCounter.GetComponent <StartStopController>(); }
private GameManager _gameMg; // ゲームマネージャー // Start is called before the first frame update void Start() { timeCounter = timeCounter.GetComponent <TimeCount>(); parentCp = parentCp.GetComponent <ParentCheckPoint>(); GameObject[] racingCars = GameObject.FindGameObjectsWithTag("RacingCar"); _playerNum = racingCars.Length; _finishCall = new bool[_playerNum]; }