示例#1
0
        /// <summary>
        /// ロックボタン押下
        /// </summary>
        public void OnClick_RewardButton(RewardButton rewardButton)
        {
            _rewardAction = _rewardActionDic[rewardButton];

            // 広告を表示して受取る報酬についての説明処理
            if (_rewardAnnounce)
            {
                if (_rewardedAd.IsLoaded())
                {
                    _rewardedAd.Show();
                }
            }
            else
            {
                rewardMessagebox.SetActive(true);
            }
        }
示例#2
0
        public void Start()
        {
            base.Start();

            // リワード広告オブジェクトの作成(読み込みが発生するため最初に)
            CreateAndLoadRewardedAd();

            SaveController00 saveController00 = new SaveController00();

            // ギャラリーから起動されたことを示すフラグを削除
            saveController00.delete_PlayButton();

            // ボタンの設定
            if (saveController00.completed_Event00_01_FirstStart() == false)
            {
                continueButton.GetComponent <Button>().interactable = false;
            }
            startButton.SetEventController(this);
            continueButton.SetEventController(this);
            galleryButton.SetEventController(this);
            charityButton.SetEventController(this);
            creditButton.SetEventController(this);

            pay150Button.SetEventController(this);
            pay500Button.SetEventController(this);
            pay1000Button.SetEventController(this);
            pay10000Button.SetEventController(this);

            okButton.SetEventController(this);
            cancelButton.SetEventController(this);

            closeButton_Credit.SetEventController(this);
            closeButton_Gallery.SetEventController(this);
            closeButton_Charity.SetEventController(this);

            link1.SetEventController(this);
            link2.SetEventController(this);
            link3.SetEventController(this);
            link4.SetEventController(this);
            link5.SetEventController(this);
            link6.SetEventController(this);
            link7.SetEventController(this);

            if (new SaveController_End01().completed_Event_End01_01_Ending())
            {
                playEnd1.gameObject.SetActive(true);
                playEnd1.SetEventController(this);
            }
            else
            {
                notPlayEnd1.gameObject.SetActive(true);
                notPlayEnd1.SetEventController(this);
            }

            if (new SaveController_End02().completed_Event_End02_01_Ending())
            {
                playEnd2.gameObject.SetActive(true);
                playEnd2.SetEventController(this);
            }
            else
            {
                notPlayEnd2.gameObject.SetActive(true);
                notPlayEnd2.SetEventController(this);
            }

            if (new SaveController_End03().completed_Event_End03_01_Ending())
            {
                playEnd3.gameObject.SetActive(true);
                playEnd3.SetEventController(this);
            }
            else
            {
                notPlayEnd3.gameObject.SetActive(true);
                notPlayEnd3.SetEventController(this);
            }

            if (new SaveController_End04().completed_Event_End04_01_Ending())
            {
                playEnd4.gameObject.SetActive(true);
                playEnd4.SetEventController(this);
            }
            else
            {
                notPlayEnd4.gameObject.SetActive(true);
                notPlayEnd4.SetEventController(this);
            }

            if (new SaveController_End05().completed_Event_End05_01_Ending())
            {
                playEnd5.gameObject.SetActive(true);
                playEnd5.SetEventController(this);
            }
            else
            {
                notPlayEnd5.gameObject.SetActive(true);
                notPlayEnd5.SetEventController(this);
            }

            if (new SaveController_End06().completed_Event_End06_01_Ending())
            {
                playEnd6.gameObject.SetActive(true);
                playEnd6.SetEventController(this);
            }
            else
            {
                notPlayEnd6.gameObject.SetActive(true);
                notPlayEnd6.SetEventController(this);
            }

            okButton_reward.SetEventController(this);
            cancelButton_reward.SetEventController(this);

            RewardButton[] rewardButtons = new RewardButton[]
            {
                LockButton1_1,
                LockButton2_1, LockButton2_2,
                LockButton3_1, LockButton3_2, LockButton3_3,
                LockButton4_1, LockButton4_2,
                LockButton5_1,
                LockButton6_1, LockButton6_2
            };

            foreach (RewardButton rewardButton in rewardButtons)
            {
                rewardButton.SetEventController(this);
            }
            ;

            _rewardActionDic.Add(LockButton1_1, new SaveController00().complete_Hint1_1);
            _rewardActionDic.Add(LockButton2_1, new SaveController00().complete_Hint2_1);
            _rewardActionDic.Add(LockButton2_2, new SaveController00().complete_Hint2_2);
            _rewardActionDic.Add(LockButton3_1, new SaveController00().complete_Hint3_1);
            _rewardActionDic.Add(LockButton3_2, new SaveController00().complete_Hint3_2);
            _rewardActionDic.Add(LockButton3_3, new SaveController00().complete_Hint3_3);
            _rewardActionDic.Add(LockButton4_1, new SaveController00().complete_Hint4_1);
            _rewardActionDic.Add(LockButton4_2, new SaveController00().complete_Hint4_2);
            _rewardActionDic.Add(LockButton5_1, new SaveController00().complete_Hint5_1);
            _rewardActionDic.Add(LockButton6_1, new SaveController00().complete_Hint6_1);
            _rewardActionDic.Add(LockButton6_2, new SaveController00().complete_Hint6_2);

            closeButton_hint.SetEventController(this);

            HintButton[] hintButtons = new HintButton[]
            {
                HintButton1_1,
                HintButton2_1, HintButton2_2,
                HintButton3_1, HintButton3_2, HintButton3_3,
                HintButton4_1, HintButton4_2,
                HintButton5_1,
                HintButton6_1, HintButton6_2
            };

            foreach (HintButton hintButton in hintButtons)
            {
                hintButton.SetEventController(this);
            }
            ;

            _hintObjectDic.Add(HintButton1_1, Hint1_1);
            _hintObjectDic.Add(HintButton2_1, Hint2_1);
            _hintObjectDic.Add(HintButton2_2, Hint2_2);
            _hintObjectDic.Add(HintButton3_1, Hint3_1);
            _hintObjectDic.Add(HintButton3_2, Hint3_2);
            _hintObjectDic.Add(HintButton3_3, Hint3_3);
            _hintObjectDic.Add(HintButton4_1, Hint4_1);
            _hintObjectDic.Add(HintButton4_2, Hint4_2);
            _hintObjectDic.Add(HintButton5_1, Hint5_1);
            _hintObjectDic.Add(HintButton6_1, Hint6_1);
            _hintObjectDic.Add(HintButton6_2, Hint6_2);

            // ヒントオブジェクトの切り替え
            UpdateHintButtons();

            eventList = new Event00_04_IndicateTitle(this).GetEventList();
            eventNo   = 0;
        }