Пример #1
0
    public void AdoptOnClick()      // 適用ボタン押下
    {
        btnsnd();
        // 適用処理
        settingdb.Q_num       = numbCnt;
        settingdb.BGMToggle   = BGMToggle.isOn;
        settingdb.CardInclude = CardInclude.isOn;
//        settingdb.SETTING_WORD_DISPLAY = TGL_WORD_DISPLAY.isOn;
        settingdb.PushNoticeA = time1.isOn;
        settingdb.PushNoticeB = time2.isOn;


        GameObject        obj;
        MyScroll          script;
        LocalNoticeScript LNScript = GetComponent <LocalNoticeScript>();

        LNScript.ClearLocalNotification();
        LNScript.CancelAllLocalNotification();
        if (time1.isOn.Equals(true))
        {
            obj             = GameObject.Find("ScrollViewHourA");
            script          = obj.GetComponent <MyScroll> ();
            settingdb.HourA = script.thisTime;
            obj             = GameObject.Find("ScrollViewMinA");
            script          = obj.GetComponent <MyScroll> ();
            settingdb.MinA  = script.thisTime;
            LNScript.setLocalNotification(settingdb.HourA, settingdb.MinA, "noticeA");              // 通知設定
        }
        if (time2.isOn.Equals(true))
        {
            obj             = GameObject.Find("ScrollViewHourB");
            script          = obj.GetComponent <MyScroll> ();
            settingdb.HourB = script.thisTime;
            obj             = GameObject.Find("ScrollViewMinB");
            script          = obj.GetComponent <MyScroll> ();
            settingdb.MinB  = script.thisTime;
            LNScript.setLocalNotification(settingdb.HourB, settingdb.MinB, "noticeB");              // 通知設定
        }

        // 設定データを保存
        SaveData.SetClass <SettingDB.SetDB>("Setting", settingdb);
        SaveData.Save();

        obj = GameObject.Find("AdoptedCanvas");
        obj.GetComponent <Canvas> ().enabled = true;
        StartCoroutine(AdoptEnabled(1.0f, obj));
    }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        // セーブデータロード
        SettingDB.SetDB settingdb = SaveData.GetClass <SettingDB.SetDB>("Setting", new SettingDB.SetDB());

        // 通知更新
        LocalNoticeScript script = GetComponent <LocalNoticeScript>();

        script.ClearLocalNotification();                // 既存通知を削除
        script.CancelAllLocalNotification();            // セットされた通知を削除

        if (settingdb.PushNoticeA.Equals(true))
        {
            script.setLocalNotification(settingdb.HourA, settingdb.MinA, "noticeA");
        }
        if (settingdb.PushNoticeB.Equals(true))
        {
            script.setLocalNotification(settingdb.HourB, settingdb.MinB, "noticeB");
        }

        UnityEngine.SceneManagement.SceneManager.LoadSceneAsync("Title");
    }