Beispiel #1
0
    private void Awake()
    {
        if (Instance != null)
        {
            Destroy(gameObject);
            return;
        }

        Instance = FindObjectOfType <RaycastBlocker>();
        image    = GetComponent <Image>();
    }
    private IEnumerator GotoCreateAccount()
    {
        float val = 0.0f;

        while (Mathf.Approximately(val, 1.0f) == false)
        {
            val = Mathf.MoveTowards(val, 1.0f, transitionSpeed * Time.deltaTime);
            for (int i = 0; i < forms.Length; i++)
            {
                forms[i].Execute(val);
            }

            yield return(null);
        }

        OnTransitionCompleted?.Invoke();
        RaycastBlocker.Unblock();
    }
 public void Execute()
 {
     RaycastBlocker.Block();
     StartCoroutine(GotoCreateAccount());
 }