コード例 #1
0
    public IEnumerator SuggestRestart()
    {
        tapToRestartContainer.SetActive(true);

        yield return(KKUtilities.WaitAction(tapToRestartButton.OnClickEvent, () =>
        {
            tapToRestartContainer.SetActive(false);
        }));
    }
コード例 #2
0
ファイル: ClearPanel.cs プロジェクト: aguroshou/Repair
    IEnumerator CloseBookAnimation()
    {
        bookAnimator.Play("CloseBook");

        yield return(new WaitForSeconds(1.5f));

        var startPos = cameraTransform.position;
        var startRot = cameraTransform.rotation;

        yield return(KKUtilities.FloatLerp(1.0f, (t) =>
        {
            var temp = Easing.InQuad(t);
            cameraTransform.SetPositionAndRotation(
                Vector3.Lerp(startPos, targetCameraTransform.position, temp),
                Quaternion.Lerp(startRot, targetCameraTransform.rotation, temp));
        }));

        namingContainer.SetActive(true);
        while (true)
        {
            yield return(KKUtilities.WaitAction(okButton.onClick));

            if (!string.IsNullOrEmpty(input.text))
            {
                break;
            }
        }

        namingContainer.SetActive(false);
        textmesh.text = input.text;

        //1回転
        var c = Camera.main.transform;

        yield return(KKUtilities.FloatLerp(0.5f, (t) =>
        {
            c.AddLocalPositoinZ(-1.0f * Time.deltaTime);
        }));

        gameClearMessage.SetActive(true);
        reReadButton.gameObject.SetActive(true);
        gotoTitleButton.gameObject.SetActive(true);
        foreach (var p in particles)
        {
            p.Play(true);
        }

        while (true)
        {
            yield return(KKUtilities.FloatLerp(3.0f, (t) =>
            {
                bookAnimator.transform.parent.SetRotationZ(Mathf.Lerp(0.0f, 360.0f, Easing.Linear(t)));
            }));
        }
    }
コード例 #3
0
 public IEnumerator SuggestGameStart()
 {
     yield return(KKUtilities.WaitAction(touchToStartButton.OnClickEvent));
 }
コード例 #4
0
    public IEnumerator SuggestRestart()
    {
        yield return(KKUtilities.WaitAction(nextButton.OnClickEvent));

        AudioManager.Instance.PlaySE("Click", 0.3f);
    }