コード例 #1
0
    public void updateMemberInfo()
    {
        GuildGetMembersFPort fport = FPortManager.Instance.getFPort("GuildGetMembersFPort") as GuildGetMembersFPort;

        fport.access(getApproveList);
    }
コード例 #2
0
    /** button点击事件 */
    public override void buttonEventBase(GameObject gameObj)
    {
        base.buttonEventBase(gameObj);
        if (gameObj.name == "close")
        {
            UiManager.Instance.switchWindow <MainWindow> ();
            EventDelegate.Add(onDestroy, () => {
                if (UiManager.Instance.backGround != null)
                {
                    UiManager.Instance.backGround.resetLastSynPosition();
                }
            });
        }
        else if (gameObj.name == "buttonMember")             // 成员管理
        {
            UiManager.Instance.openWindow <GuildMemberWindow> ((win) => {
                win.updateMember();
            });
        }
        else if (gameObj.name == "noticeButton")
        {
            if (GuildManagerment.Instance.getGuild().job == GuildJobType.JOB_PRESIDENT || GuildManagerment.Instance.getGuild().job == GuildJobType.JOB_VICE_PRESIDENT)
            {
                UiManager.Instance.openDialogWindow <GuildNoticeEditWindow> ((win) => {
                    win.updateInput();
                });
            }
            else
            {
                MaskWindow.UnlockUI();
            }
        }
        else if (gameObj.name == "buttonGuildRank")             // 排行榜
        {
            GuildGetMembersFPort fport = FPortManager.Instance.getFPort("GuildGetMembersFPort") as GuildGetMembersFPort;
            fport.access(getRastRank);
        }
        else if (gameObj.name == "buttonGuildDonate")             // 捐款
        {
            UiManager.Instance.openWindow <GuildDonateWindow> ();
        }
        else if (gameObj.name == "arrowButton")
        {
            bool b = PlayerPrefs.GetInt(UserManager.Instance.self.uid + PlayerPrefsComm.GUILD_INFO_HIDE) == 0 ? true : false;
            delayTime = 0.4f;
            if (b)
            {
                tweenerArrowGroupOut();
                PlayerPrefs.SetInt(UserManager.Instance.self.uid + PlayerPrefsComm.GUILD_INFO_HIDE, 1);
            }
            else
            {
                tweenerArrowGroupIn();
                PlayerPrefs.SetInt(UserManager.Instance.self.uid + PlayerPrefsComm.GUILD_INFO_HIDE, 0);
            }
            PlayerPrefs.Save();
            MaskWindow.UnlockUI();
        }
        else if (gameObj.name == "button_1")            //大厅
        {
            if (GuildManagerment.Instance.getBuildLevel(GuildManagerment.HALL) <= 0)
            {
                return;
            }
            UiManager.Instance.openWindow <GuildBuildWindow> ((win) => {
                win.init(GuildBuildSampleManager.Instance.getGuildBuildSampleBySid(gameObj.GetComponent <GuildBuildView> ().buildSid));
            });
        }
        else if (gameObj.name == "button_2")            //学院
        //解锁逻辑
        {
            if (GuildManagerment.Instance.getBuildLevel(GuildManagerment.COLLEGE) <= 0)
            {
                //判断是否有权限解锁
                if (GuildManagerment.Instance.getGuildJob() == GuildJobType.JOB_PRESIDENT || GuildManagerment.Instance.getGuildJob() == GuildJobType.JOB_VICE_PRESIDENT)
                {
                    UiManager.Instance.openWindow <GuildBuildWindow> ((win) => {                      //进入解锁界面
                        win.init(GuildBuildSampleManager.Instance.getGuildBuildSampleBySid(gameObj.GetComponent <GuildBuildView> ().buildSid));
                    });
                }
                else
                {
                    UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("Guild_1115"));                         //没有权限就飘字提示
                }
            }
            else
            {
                UiManager.Instance.openWindow <GuildCollegeWindow> ();                 //可以使用,进入
            }
        }
        else if (gameObj.name == "button_3")            //商店
        {
            if (GuildManagerment.Instance.getBuildLevel(GuildManagerment.SHOP) <= 0)
            {
                //判断是否有权限解锁
                if (GuildManagerment.Instance.getGuildJob() == GuildJobType.JOB_PRESIDENT || GuildManagerment.Instance.getGuildJob() == GuildJobType.JOB_VICE_PRESIDENT)
                {
                    UiManager.Instance.openWindow <GuildBuildWindow> ((win) => {                      //进入解锁界面
                        win.init(GuildBuildSampleManager.Instance.getGuildBuildSampleBySid(gameObj.GetComponent <GuildBuildView> ().buildSid));
                    });
                }
                else
                {
                    UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("Guild_1115"));                         //没有权限就飘字提示
                }
            }
            else
            {
                UiManager.Instance.openWindow <GuildShopWindow> ();                 //可以使用,进入
            }
        }
        else if (gameObj.name == "button_4")            //祭坛
        {
            if (GuildManagerment.Instance.getBuildLevel(GuildManagerment.ALTAR) <= 0)
            {
                //判断是否有权限解锁
                if (GuildManagerment.Instance.getGuildJob() == GuildJobType.JOB_PRESIDENT || GuildManagerment.Instance.getGuildJob() == GuildJobType.JOB_VICE_PRESIDENT)
                {
                    UiManager.Instance.openWindow <GuildBuildWindow> ((win) => {                      //进入解锁界面
                        win.init(GuildBuildSampleManager.Instance.getGuildBuildSampleBySid(gameObj.GetComponent <GuildBuildView> ().buildSid));
                    });
                }
                else
                {
                    UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("Guild_1115"));                         //没有权限就飘字提示
                }
            }
            else
            {
                UiManager.Instance.openWindow <GuildAltarWindow> ((win) => {
                    win.initWindow();
                });                 //可以使用,进入
            }

//			if(GuildManagerment.Instance.getBuildLevel (GuildManagerment.HALL) < GuildManagerment.LUCK_GODDESS ||
//			   GuildManagerment.Instance.getBuildLevel (GuildManagerment.ALTAR) <= 0)
//				return;
//			UiManager.Instance.openWindow<GuildAltarWindow> ((win)=>{
//				win.initWindow ();
//			});
        }
        else if (gameObj.name == "buttonInfo")             // 详情
        {
            tweenerMessageState = false;
            tweenerMessageGroupOut(tweenHelp);

            tweenMessage.gameObject.SetActive(true);
            tweenerArrow.gameObject.SetActive(false);
            tweenerMessageState = true;
            tweenerMessageGroupIn(tweenMessage);
        }
        else if (gameObj.name == "buttonCloseInfo")             // 关闭详情
        {
            tweenerMessageState = false;
            tweenerMessageGroupOut(tweenMessage);
        }
        else if (gameObj.name == "buttonShake")
        {
            UiManager.Instance.openWindow <GuildLuckyNvShenWindow> ();
        }
        else if (gameObj.name == "buttonRename")
        {
            UiManager.Instance.openDialogWindow <GuildRenameWindow> ();
        }
        else if (gameObj.name == "button_5")            //领地
        {
            if (GuildManagerment.Instance.getBuildLevel(GuildManagerment.AREA) <= 0)
            {
                //判断是否有权限解锁
                if (GuildManagerment.Instance.getGuildJob() == GuildJobType.JOB_PRESIDENT || GuildManagerment.Instance.getGuildJob() == GuildJobType.JOB_VICE_PRESIDENT)
                {
                    UiManager.Instance.openWindow <GuildBuildWindow> ((win) => {                      //进入解锁界面
                        win.init(GuildBuildSampleManager.Instance.getGuildBuildSampleBySid(gameObj.GetComponent <GuildBuildView> ().buildSid));
                    });
                }
                else
                {
                    UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("Guild_1115"));                         //没有权限就飘字提示
                }
            }
            else
            {
                UiManager.Instance.openWindow <GuildFightMainWindow>();                 //可以使用,进入
            }
        }
        else if (gameObj.name == "buttonHelp")
        {
            tweenerMessageState = false;
            tweenerMessageGroupOut(tweenMessage);
            tweenHelp.gameObject.SetActive(true);
            tweenerArrow.gameObject.SetActive(false);
            tweenerMessageState = true;
            tweenerMessageGroupIn(tweenHelp);
        }
        else if (gameObj.name == "buttonCloseHelp")            // 关闭详情
        {
            tweenerMessageState = false;
            tweenerMessageGroupOut(tweenHelp);
        }
    }