// Update is called once per frame void Update() { for (int i = 0; i < m_players.Length; i++) { if (m_players[i].GetDownFlag()) { int a = m_players[i].GetScore().GetScore(); m_players[i].GetScore().SubScore(m_subScore); m_scoreBank.AddScore(a - m_players[i].GetScore().GetScore()); m_players[i].SetDownFlag(false); } if (m_players[i].GetState() == PlayerController.PLAYER_STATE.GOAL) { m_players[i].GetRank().DetermineRANK(goalCount); //int num; goalCount++; } } if (goalCount > 1) { count++; } if (count == RESULT_SCENE_COUNT - 120) { m_startTime = Time.time; m_startPosition = CAMERA.transform.position; state = true; for (int i = 0; i < m_players.Length; i++) { m_players[i].goalFlag = true; } } if (count > RESULT_SCENE_COUNT - 120 && count < RESULT_SCENE_COUNT) { float timeStep = m_time > 0.0f ? (Time.time - m_startTime) / m_time : 1.0f; if (m_time > 0.0f) { timeStep = (Time.time - m_startTime) / m_time; } else { timeStep = 1.0f; } //timeStep = (1 - Mathf.Cos(Time.time * Mathf.PI)) / 2.0f; //transform.position = Vector3.Lerp(m_startPosition, m_targetPosition, timeStep); CAMERA.transform.position = Lerp(m_startPosition, m_targetPosition, timeStep, Linearity); } else if (count == RESULT_SCENE_COUNT) { for (int i = 0; i < 4; i++) { HELICOPTER[i].GetComponent <Animator>().SetTrigger("Flight2"); } CAMERA.GetComponent <CameraShake>().Shake(1.5f, 0.2f); } else if (count == RESULT_SCENE_COUNT + 130) { Fade.FadeIn(); } else if (count > RESULT_SCENE_COUNT + 130 + (Fade.TIME * 60) + 10) { round.AddCount(); round.SaveScore(round.GetNowround()); SceneManager.LoadScene("ResultScene"); } }