示例#1
0
    private void OnGuildCreated(bool isCreated)
    {
        _controller.subInfo.gameObject.SetActive(isCreated);
        _controller.subCreate.gameObject.SetActive(!isCreated);

        if (isCreated)
        {
            _guildInfoSubView = new GuildInfoSubView(_controller.subInfo);
        }
        else
        {
            _guildCreateSubView = new GuildCreateSubView(_controller.subCreate);
        }
    }
示例#2
0
    protected override void OnLoadSuccess()
    {
        base.OnLoadSuccess();
        _controller = Controller as GuildViewController;

        //监听公会创建成功事件
        _controller.AutoReleaseEvent(EventManager.OnGuildCreated.Subscribe(OnGuildCreated));

        //有公会就打开公会详情,没有就打开创建界面
        bool hveGuild = PlayerData.Instance.HasGuild;

        //处理子界面的显示隐藏
        _controller.subInfo.gameObject.SetActive(hveGuild);
        _controller.subCreate.gameObject.SetActive(!hveGuild);

        if (hveGuild)
        {
            _guildInfoSubView = new GuildInfoSubView(_controller.subInfo);
        }
        else
        {
            _guildCreateSubView = new GuildCreateSubView(_controller.subCreate);
        }
    }