void Start() { startTime = 0; time = 0; //unitTime = 2; GenerateNumberBall(max); circleNumber.Subscribe(num => { Debug.Log(num); if (num == 0 || num == 1) { GetComponent <NumberCircleView>().SetPrimeLabel(""); } else if (IsPrime(num)) { GetComponent <NumberCircleView>().SetPrimeLabel("素数"); GetComponent <NumberCircleView>().primeLabel.color = Color.red; } else { GetComponent <NumberCircleView>().SetPrimeLabel("合成数"); GetComponent <NumberCircleView>().primeLabel.color = Color.blue; } if (num >= 2 && num <= max) { GetComponent <NumberCircleView>().SetLabel(num); GameObject obj = NumberBallList.Where(ball => ball.GetComponent <NumberBall>().number == num) .First(); if (obj.GetComponent <NumberBallView>()) { NumberBallView view = obj.GetComponent <NumberBallView>(); if (view != null) { if (IsPrime(num)) { view.SetColor(Color.red); lineScript.SetColor(Color.red); } else { view.SetColor(Color.blue); obj.GetComponent <NumberBall>().isRotate = false; lineScript.SetColor(Color.blue); } } } } }); }