Example #1
0
    private void Start()                                                        //キーボードテスト
    {
        json = File.ReadAllText(Application.persistentDataPath + "/data.json"); //読み取ってるよ
        json = encryption.DecryptString(json);
        JsonUtility.FromJsonOverwrite(json, sv);                                //読み取ったのを変換してるよ
        Gasha_SE se = scriptbox.GetComponent <Gasha_SE>();                      //スコアを取得

        se.SEswitch(sv._sound);
        se.BGMswitch(sv._BGM);
    }
Example #2
0
    public void DelayResult()
    {
        Debug.Log("DRstarted");
        Gasha_SE se = scriptbox.GetComponent <Gasha_SE>();//スコアを取得

        result.SetActive(true);
        if (jd.rarelity[atarinum] <= ssr_omomi)
        {
            rarelity_t.text = "SSレア!!!!!!";
            GetComponent <AudioSource>().PlayOneShot(se.SSR);//効果音を鳴らす
            SSReffect.SetActive(true);
        }
        else
        if (jd.rarelity[atarinum] <= sr_omomi)
        {
            rarelity_t.text = "Sレア!!";
            GetComponent <AudioSource>().PlayOneShot(se.SR);//効果音を鳴らす
            SReffect.SetActive(true);
        }
        else
        if (jd.rarelity[atarinum] <= r_omomi)
        {
            GetComponent <AudioSource>().PlayOneShot(se.R);//効果音を鳴らす
            rarelity_t.text = "レア";
            Reffect.SetActive(true);
        }
        else
        {
            GetComponent <AudioSource>().PlayOneShot(se.N);//効果音を鳴らす
            rarelity_t.text = "ノーマル";
        }
        //      number_t.text = "No."+jd.materialnum[atarinum].ToString();
        name_t.text = jd.name[atarinum];
        info_t.text = jd.info[atarinum];
        Debug.Log("無事成功");
        //ここから新作かどうかの判定
        json = File.ReadAllText(Application.persistentDataPath + "/data.json"); //読み取ってるよ
        json = encryption.DecryptString(json);
        JsonUtility.FromJsonOverwrite(json, sv);                                //読み取ったのを変換してるよ
        if (sv._jikiflag[atarinum] == false)
        {
            new_t.text = ("new!!");
        }
        else
        {
            new_t.text = ("");
        }
    }
Example #3
0
    private void OnFlick(object sender, System.EventArgs e)
    {
        Gasha_SE se = scriptbox.GetComponent <Gasha_SE>();//スコアを取得

        if (flickflag == false)
        {
            return;
        }
        Debug.Log("you flicked");
        var    down    = new Vector3(0, -1, 0);//下
        var    gesture = sender as FlickGesture;
        string str     = "フリック: " + gesture.ScreenFlickVector + " (" + gesture.ScreenFlickTime + "秒)";
        var    Fvector = gesture.ScreenFlickVector.normalized;

        //  Vector3.Dot(Fvector, uptri);
        if (Vector3.Dot(Fvector, down) > 0.5f)
        {
            GetComponent <AudioSource>().PlayOneShot(se.flick);//効果音を鳴らす
            GashaDid(atarinum);
            flickflag = false;
        }
        Debug.Log("OnFlickEND");
    }