Exemple #1
0
    public IEnumerator Win()
    {
        Running = false;

        MOB[1].transform.position = EndPoint.position;
        EndInfo.TweenActive(true);
        EndInfo.Txt[0].text = "SAFE!";

        yield return(new WaitForSeconds(0.7F));

        EndInfo.Txt[0].text = "FITNESS UP: " + (TargetGrand.Data.Fitness.RatioToString()) + "%";
        Tweens.Bounce(EndInfo.Txt[0].transform);

        yield return(new WaitForSeconds(Time.deltaTime * 40));

        int fit = 30 + (int)Mathf.Clamp(50 - GameTime, 0, 30);

        TargetGrand.Data.Fitness.Add(fit);

        EndInfo.Txt[0].text = "FITNESS UP: " + (TargetGrand.Data.Fitness.RatioToString()) + "%";
        Tweens.Bounce(EndInfo.Txt[0].transform);

        yield return(new WaitForSeconds(Time.deltaTime * 40));

        int rep = fit;

        StartCoroutine(GameManager.UI.ResourceAlert(GameManager.WorldRes.Rep, rep));
        EndInfo.Txt[0].text = "REP UP: " + rep;
        Tweens.Bounce(EndInfo.Txt[0].transform);

        EndButton.TweenActive(true);
    }
Exemple #2
0
    public void Lose()
    {
        Running = false;

        MOB[1].transform.rotation = Quaternion.Slerp(
            MOB[1].transform.rotation,
            Quaternion.Euler(0.0F, 0.0F, Sway_CurrentVelocity.x * 90),
            Time.deltaTime * 60);
        EndInfo.TweenActive(true);
        EndInfo.Txt[0].text = "FELL OVER!";
        EndButton.TweenActive(true);
    }