Esempio n. 1
0
    public void Start()
    {
        if (AudioManager.instance.ReferalClaimed == 0)
        {
            string initURL  = "https://bq070kqvh9.execute-api.us-east-1.amazonaws.com/prod/referralsInit";
            string claimURL = "https://bq070kqvh9.execute-api.us-east-1.amazonaws.com/prod/referralsClaim";
            string countURL = "https://bq070kqvh9.execute-api.us-east-1.amazonaws.com/prod/referralsCount";
            config = new ReferAFriend.BackendConfig(initURL, claimURL, countURL);
            ReferAFriend.Instance.makeconfig(config);

            ReferralKeyInput = PlayerPrefs.GetString("ReferalCode");
            Debug.Log(PlayerPrefs.GetString("ReferalCode"));
            ReferAFriend.Instance.CheckReferralCodeUsageCount(
                ReferralKeyInput,
                (responseValue) => { count = responseValue; },
                (responseCode) => { Debug.LogError("There was an error calling ReferAFriend GetCount(): " + responseCode); });
            Debug.Log(count);
            GameObject.Find("levelmenu").GetComponent <levelscreen>().referalcount = count;

            Invoke("ExecuteAfterTime", 2f);
        }
        else
        {
            //pannel.SetActive(true);
            GameObject.Find("levelmenu").GetComponent <levelscreen>().unlocked = true;
            // shareorbuypannel.SetActive(false);
        }
    }
Esempio n. 2
0
    void Start()
    {
        string initURL  = "https://bq070kqvh9.execute-api.us-east-1.amazonaws.com/prod/referralsInit";
        string claimURL = "https://bq070kqvh9.execute-api.us-east-1.amazonaws.com/prod/referralsClaim";
        string countURL = "https://bq070kqvh9.execute-api.us-east-1.amazonaws.com/prod/referralsCount";

        config = new ReferAFriend.BackendConfig(initURL, claimURL, countURL);
        ReferAFriend.Instance.makeconfig(config);
        Init();
        //Debug.Log("referal="+PlayerPrefs.GetString("ReferalCode"));
    }