예제 #1
0
    private IEnumerator _sendLoginData(string email)
    {
        var wwwForm = new WWWForm();

        wwwForm.AddField("email", email);

        var www = new WWW(InfoStorage.Server + InfoStorage.Connect, wwwForm);

        yield return(www);

        Debug.Log(InfoStorage.Server + InfoStorage.Connect);

        if (www.error != null)
        {
            yield break;
        }

        Debug.Log(www.text);

        var json = JSON.Parse(www.text);

        string answer = json["error"];

        Debug.Log(answer);

        if (!answer.Equals("ok"))
        {
            yield break;
        }

        PlayerPrefs.SetString("email", email);
        PlayerPrefs.SetInt("auntificated", 1);

        AnimationAssistant.MoveY(transform, transform.position.y - Screen.height);
    }
예제 #2
0
    public void Close()
    {
        if (!_opened)
        {
            return;
        }

        _helper.PanelClose();
        _opened = false;
        AnimationAssistant.MoveY(transform, InfoStorage.ClosedPanelPosY);
    }
예제 #3
0
    public void Open()
    {
        if (_opened)
        {
            return;
        }

        _helper.Increase();

        _opened = true;
        AnimationAssistant.MoveY(transform, InfoStorage.OpenedPanelPosY);
    }
예제 #4
0
    private IEnumerator _loginFormUpCoroutine()
    {
        yield return(new WaitForSeconds(0.5f));

        AnimationAssistant.Hide(gameObject.GetComponent <CanvasGroup>());

        if (PlayerPrefs.GetInt("auntificated") != 1)
        {
            AnimationAssistant.MoveLocalY(_loginForm, 0);
        }
        else
        {
            AnimationAssistant.MoveY(_loginPanel, InfoStorage.ClosedPanelPosY);
        }
    }
예제 #5
0
    public void Escape()
    {
        if (_lock)
        {
            return;
        }

        switch (_context)
        {
        case Context.Feedback:
            AnimationAssistant.MoveY(_feedback, _feedback.transform.position.y - PlayerPrefs.GetFloat("height"));
            _context = Context.Main;
            break;

        case Context.Instagram:
            AnimationAssistant.MoveY(_instagram, _instagram.transform.position.y - PlayerPrefs.GetFloat("height"));
            _context = Context.Main;
            break;
        }
    }