Exemple #1
0
 // Update is called once per frame
 void Update()
 {
     if (Application.platform == RuntimePlatform.Android)
     {
         // エスケープキー取得
         if (Input.GetKeyDown(KeyCode.Escape))
         {
             if (result.activeSelf)
             {
                 enshutu es = scriptbox.GetComponent <enshutu>();
                 result.SetActive(false);
                 gashatop.SetActive(true);
                 es.triangle_reset();
             }
             else if (gashatop.activeSelf)
             {
                 SceneManager.LoadScene("title");
             }
             else
             {
             }
             // アプリケーション終了
         }
     }
 }
Exemple #2
0
    public void Share()
    {
        enshutu en   = scriptbox.GetComponent <enshutu>();//スコアを取得
        string  text = "三角くじで「" + en.jikiname + "」を手に入れた!\n新感覚三角パズルアクション・フリクタル\n#Flictal ";
        string  URL  = "https://play.google.com/store/apps/details?id=com.KMpro.Flictal";

        SocialConnector.SocialConnector.Share(text, URL);
        //      SocialConnector.SocialConnector.Share(en.jikiname);
    }
Exemple #3
0
    // Use this for initialization
    public void DoGasha()
    {
        sum = 0;
        //        jikidata_json jd = GetComponent<jikidata_json>();
        for (int i = 0; i < jd.rarelity.Length; i++)
        {
            sum = sum + jd.rarelity[i];
        }
        Debug.Log("sum=" + sum);
        rand = Random.Range(0, sum);
        Debug.Log("rand=" + rand);
        num = 0;

        int j = jd.rarelity[0];

        //ちなみに最初の登場確率はゼロ
        while (j <= sum)
        {
            if (rand < j)
            {
                Debug.Log(num + "が当選");
                enshutu d1 = scriptbox.GetComponent <enshutu>();
                d1.ReadytoGasha(num);
                break;
            }
            Debug.Log(rand + "は" + num + "の該当番号である" + j + "より大きい");
            num++;

            j = j + jd.rarelity[num];
        }
        //358
        Debug.Log(num);
        json = File.ReadAllText(Application.persistentDataPath + "/data.json"); //読み取ってるよ
        json = encryption.DecryptString(json);
        JsonUtility.FromJsonOverwrite(json, sv);                                //読み取ったのを変換してるよ
        if (sv._jikiflag[num] == false)
        {
            sv._jikiflag[num] = true;

            json = JsonUtility.ToJson(sv);
            Debug.Log(json);
            json = encryption.EncryptString(json);
            File.WriteAllText(Application.persistentDataPath + "/data.json", json);//結局これでよかった
            unlock ul = scriptbox.GetComponent <unlock>();
            ul.rainbow();
        }
        mypoint mp = scriptbox.GetComponent <mypoint>();

        mp.PointUsed();
    }