Exemple #1
0
    /// <summary>
    /// 祝福
    /// </summary>
    private void wish()
    {
        /** 不在时间范围内 */
        if (!GuildFightSampleManager.Instance().isActivityBuffTime())
        {
            UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("GuildArea_35"));
            MaskWindow.UnlockUI();
            return;
        }
        /** 行动力不足 */
        if (UserManager.Instance.self.guildFightPower < wishSample.getExpends())
        {
            UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("GuildArea_06"));
            MaskWindow.UnlockUI();
            return;
        }
        string des = wishSample.getUseBuffDes(1);

        MessageWindow.ShowConfirm(des, (msg) =>
        {
            if (msg.msgEvent == msg_event.dialogOK)
            {
                GuildActiveAreaBuffFport port = FPortManager.Instance.getFPort("GuildActiveAreaBuffFport") as GuildActiveAreaBuffFport;
                port.access(1, wishSample.getExpends(), wishCallBack);
            }
        });
    }
Exemple #2
0
 public void initializeInfo(GuildArea _data)
 {
     this.data = _data;
     if (this.data == null)
     {
         buttonWish.disableButton(true);
         buttonWish.textLabel.effectColor = new Color(0.22f, 0.22f, 0.22f);
         buttonInspire.disableButton(true);
         buttonInspire.textLabel.effectColor = new Color(0.22f, 0.22f, 0.22f);
     }
     else
     {
         buttonWish.disableButton(false);
         buttonInspire.disableButton(false);
     }
     inspireSample       = GuildFightSampleManager.Instance().getSampleBySid <GuildBuffSample>(GuildFightSampleManager.INSPIRE_SID);
     wishSample          = GuildFightSampleManager.Instance().getSampleBySid <GuildBuffSample>(GuildFightSampleManager.WISH_SID);
     inspireXiaohao.text = LanguageConfigManager.Instance.getLanguage("GuildArea_97", inspireSample.getExpends().ToString());
     inspireJiangli.text = inspireSample.getRewardDesString();
     inspireXiaoguo.text = LanguageConfigManager.Instance.getLanguage("GuildArea_99") + "+" + ((data == null ? 0 : data.inspireNum) * inspireSample.getEffect()[0]) + "%" + "[3A9663]+" + inspireSample.getEffect()[0] + "%[-]";
     wishXiaohao.text    = LanguageConfigManager.Instance.getLanguage("GuildArea_97", wishSample.getExpends().ToString());
     wishJiangli.text    = inspireSample.getRewardDesString();
     wishXiaoguo.text    = LanguageConfigManager.Instance.getLanguage("GuildArea_98") + "+" + ((data == null ? 0 : data.wishNum) * wishSample.getEffect()[0]) + "%" + "[3A9663]+" + wishSample.getEffect()[0] + "%[-]";
 }