Exemplo n.º 1
0
 override public void Uninit()
 {
     m_SelectedGuild = null;
     GuildInfoItemPrefabManager.Clear();
     GuildInfoPrefabManager.Clear();
     base.Uninit();
 }
Exemplo n.º 2
0
 public override void OnFinishedHide()
 {
     base.OnFinishedHide();
     AdventureItemPrefab.Clear();
     RewardItemPrefab.Clear();
     DungeonHeroPrefab.Clear();
 }
Exemplo n.º 3
0
    //void Update()
    //{
    //    //if(Input.GetKeyDown(KeyCode.Escape))
    //    //{
    //    //    OnClose();
    //    //}
    //}
    //void OnReceivedKeyCode(UniWebView webview, int keycode)
    //{//This event only fired on Android.
    //    if ((KeyCode)keycode == KeyCode.Escape)
    //    {
    //        OnClose();
    //    }

    //}
    override public void SetParams(bool is_new, object[] parms)
    {
        base.SetParams(is_new, parms);

        m_WebView.gameObject.SetActive(true);
        m_WebView.backButtonEnable = false;
        //m_WebView.OnReceivedKeyCode += OnReceivedKeyCode;
        m_WebView.SetShowSpinnerWhenLoading(true);
        //716,546
        m_WebView.insets.top    = (720 - 546) / 2;
        m_WebView.insets.bottom = (720 - 546) / 2;
        m_WebView.insets.right  = 114;
        m_WebView.insets.left   = 1280 - 716 - m_WebView.insets.right;

        EventItemPrefab.Clear();
        HottimeEventItem first = null;

        foreach (var item in EventHottimeManager.Instance.GetShowEvents())
        {
            var event_item = EventItemPrefab.GetNewObject <HottimeEventItem>(EventItemPrefab.transform, Vector3.zero);
            event_item.Init(item, OnSelectHottimeEvent);
            if (first == null)
            {
                first = event_item;
            }
        }

        if (first != null)
        {
            first.OnClickItem();
        }
        ResetPosition();
    }
Exemplo n.º 4
0
    override public void Init(Guild _parent)
    {
        base.Init(_parent);
        GuildInfoPrefabManager.Clear();
        m_GuildInfoDetail = GuildInfoPrefabManager.GetNewObject <GuildInfoDetail>(GuildInfoPrefabManager.transform, Vector3.zero);

        UpdateInfo();
        InitGuildBuff();
    }
Exemplo n.º 5
0
    override public void Init(Guild _parent)
    {
        base.Init(_parent);
        GuildInfoPrefabManager.Clear();
        m_GuildInfoDetail = GuildInfoPrefabManager.GetNewObject <GuildInfoDetail>(GuildInfoPrefabManager.transform, Vector3.zero);

        m_SelectedGuild = null;
        OnClickFilterJoinable();
    }
Exemplo n.º 6
0
    override public void Init(Guild _parent)
    {
        base.Init(_parent);
        GuildInfoPrefabManager.Clear();
        m_GuildInfoDetail = GuildInfoPrefabManager.GetNewObject <GuildInfoDetail>(GuildInfoPrefabManager.transform, Vector3.zero);

        m_SelectedGuild = null;
        GetGuildListForRank();
    }
Exemplo n.º 7
0
 override public bool Uninit(bool bBack)
 {
     DungeonMonsterManager.Clear();
     m_Heroes.ForEach(e => DestroyImmediate(e.gameObject));
     m_Heroes = null;
     if (bBack == true)
     {
     }
     return(true);
 }
Exemplo n.º 8
0
    override public void Init(Guild _parent)
    {
        base.Init(_parent);
        m_SelectedGuild = null;
        GuildInfoPrefabManager.Clear();
        m_GuildInfoDetail = GuildInfoPrefabManager.GetNewObject <GuildInfoDetail>(GuildInfoPrefabManager.transform, Vector3.zero);

        C2G.GuildListForRequest packet = new C2G.GuildListForRequest();
        Network.GameServer.JsonAsync <C2G.GuildListForRequest, C2G.GuildListForJoinAck>(packet, OnGuildListForRequest);
    }
Exemplo n.º 9
0
 override protected void Clear()
 {
     base.Clear();
     m_RaidPlayerPrefabManager.Clear();
     m_RaidUIPlayerPrefabManager.Clear();
     m_RaidPlayers.Clear();
 }
Exemplo n.º 10
0
    void SetDifficulty(int index)
    {
        m_StageInfo            = m_SelectedMap.Stages[0].Difficulty[index];
        LabelTitle.text        = m_StageInfo.ShowName;
        LabelDungeonInfo.text  = m_SelectedMap.Description + "\n";
        LabelDungeonInfo.text += Localization.Get("WeeklyAvailable");
        foreach (var tag in m_SelectedMap.AvailableTags)
        {
            LabelDungeonInfo.text += string.Format("[url={0}]{1}[/url] ", "Tag_" + tag, Localization.Get("Tag_" + tag));
        }
        RewardItemPrefab.Clear();

        foreach (var reward in m_StageInfo.DropItems)
        {
            if (reward.IsShow == false)
            {
                continue;
            }
            var reward_item = RewardItemPrefab.GetNewObject <RewardItem>(GridRewards.transform, Vector3.zero);
            reward_item.InitReward(reward);
        }

        GridRewards.Reposition();
        ScrollViewRewards.ResetPosition();
    }
Exemplo n.º 11
0
    //////////////////////////////////////////////////////////////////////////////////////

    public void Init()
    {
        title.text       = m_RewardInfo.title;
        description.text = m_RewardInfo.description;

        RewardItemPRefabManager.Clear();

        int last_rank = 0;

        foreach (var reward_info in m_RewardInfo.data)
        {
            RankingRewardItem new_item = RewardItemPRefabManager.GetNewObject <RankingRewardItem>(grid.transform, Vector3.zero);
            new_item.Init(last_rank + 1, reward_info.Rank, reward_info.Gem, reward_info.Token, m_RewardInfo.token_type, last_rank < m_RewardInfo.ranking && (m_RewardInfo.ranking <= reward_info.Rank || reward_info.Rank == -1));
            last_rank = reward_info.Rank;
        }
        grid.Reposition();
    }
Exemplo n.º 12
0
    override public bool Init(MenuParams parms)
    {
        GuildTabPrefabManager.Clear();
        if (parms.bBack == true)
        {
            var tabs = Tabs.Keys.ToList();
            Tabs.Clear();
            InitTabs(tabs);
            SetTab(m_CurrentTab);
            return(true);
        }
        Tabs.Clear();
        if (GuildManager.Instance.IsGuildJoined)
        {
            m_CurrentTab = eGuildTabMode.GuildInfo;
            List <eGuildTabMode> tabs = new List <eGuildTabMode>()
            {
                m_CurrentTab, eGuildTabMode.GuildBuff, eGuildTabMode.GuildRank
            };
            if (GuildManager.Instance.AvailableGuildManagement)
            {
                tabs.Add(eGuildTabMode.GuildManagement);
            }
            InitTabs(tabs);
        }
        else
        {
            m_CurrentTab = eGuildTabMode.GuildJoin;

            List <eGuildTabMode> tabs = new List <eGuildTabMode>()
            {
                m_CurrentTab
            };

            if (Network.PlayerInfo.player_level >= GuildInfoManager.Config.AtLeastPlayerLevel)
            {
                tabs.Add(eGuildTabMode.RequestList);
                tabs.Add(eGuildTabMode.GuildCreate);
            }
            InitTabs(tabs);
        }
        SetTab(m_CurrentTab);

        return(true);
    }
Exemplo n.º 13
0
    //////////////////////////////////////////////////////////////////////////////////////

    void AddCategories()
    {
        m_Category = null;
        m_Command  = null;
        m_Param    = null;

        m_Description.text = "";

        m_PrefabManager.Clear();
        m_PrefabManager.Destroy();
        bool isFirst = true;

        foreach (string category in CheatInfoManager.Instance.GetCategories())
        {
            AddCommand(m_Commands.transform, category, isFirst, CallbackExecute);
            isFirst = false;
        }
    }
Exemplo n.º 14
0
    override public void Init(Guild _parent)
    {
        base.Init(_parent);
        GuildInfoPrefabManager.Clear();
        m_GuildInfoDetail = GuildInfoPrefabManager.GetNewObject <GuildInfoDetail>(GuildInfoPrefabManager.transform, Vector3.zero);

        if (GuildManager.Instance.GuildMembers == null)
        {
            C2G.GuildMemberGet packet = new C2G.GuildMemberGet();
            packet.guild_idx = GuildManager.Instance.GuildIdx;
            Network.GameServer.JsonAsync <C2G.GuildMemberGet, C2G.GuildAck>(packet, OnGuildMemberGet);
        }
        else
        {
            UpdateGuildInfo(GuildManager.Instance.GuildInfo);
            InitGuildMembers();
        }
    }
Exemplo n.º 15
0
    void InitItem()
    {
        List <Quest> list = null;

        switch (m_State)
        {
        case eMissionState.Daily:
            list = QuestManager.Instance.Data.Where(q => q.IsShow && q.Info.Type == eQuestType.Daily).OrderByDescending(q => q.IsComplete).ToList();
            break;

        case eMissionState.Weekly:
            list = QuestManager.Instance.Data.Where(q => q.IsShow && q.Info.Type == eQuestType.Weekly).OrderByDescending(q => q.IsComplete).ToList();
            break;

        case eMissionState.Achievement:
            list = QuestManager.Instance.Data.Where(q => q.IsShow && q.Info.Type == eQuestType.Achievement).OrderByDescending(q => q.IsComplete).ToList();
            break;
        }
        m_Grid.gameObject.SetActive(false);
        m_MissionItemPrefabManager.Clear();
        foreach (var quest in list)
        {
            var mission_item = m_MissionItemPrefabManager.GetNewObject <PopupMissionItem>(m_Grid.transform, Vector3.zero);
            mission_item.Init(quest, OnReward);
        }
        m_Grid.gameObject.SetActive(true);

        m_Grid.Reposition();

        UIScrollView scroll = m_Grid.GetComponentInParent <UIScrollView>();

        if (scroll != null)
        {
            scroll.ResetPosition();
        }

        GameMain.Instance.UpdateNotify(false);

        m_LabelEmpty.gameObject.SetActive(list.Count == 0);
    }
Exemplo n.º 16
0
    void Init()
    {
        m_SkillEnchantItemPrefabManager.Clear();
        m_Items.Clear();
        for (int i = 1; i < m_Creature.Skills.Count; ++i)
        {
            SkillEnchantItem obj = m_SkillEnchantItemPrefabManager.GetNewObject <SkillEnchantItem>(m_SkillEnchantGrid.transform, Vector3.zero);
            obj.Init(m_Creature.Skills[i], m_LevelupContainer);
            obj._OnSkillEnchant = new System.Action(SkillEnchantCallback);
            m_Items.Add(obj);
        }
        m_SkillEnchantGrid.Reposition();

        UpdateEnchantCost();
    }
Exemplo n.º 17
0
    override public void SetParams(bool is_new, object[] parms)
    {
        base.SetParams(is_new, parms);
        if (parms == null || parms.Length != 2)
        {
            throw new System.Exception("invalid parms");
        }

        m_Creature             = (Creature)parms[0];
        OnEquipEnchantCallback = parms[1] as System.Action;

        EquipEnchantPrefab.Clear();
        EquipEnchantMaxPrefab.Clear();
        m_Weapon = null;
        m_Armor  = null;
        Init();
    }
Exemplo n.º 18
0
    void InitHeroItem()
    {
        m_HeroScroll.transform.parent.gameObject.SetActive(true);
        m_PartyScroll.gameObject.SetActive(false);
        m_PieceScroll.gameObject.SetActive(false);
        m_BookPanel.SetActive(false);

        heroItemPrefabManager.Clear();

        m_Creatures = m_SortInfo.GetSortedCreatures();

        foreach (Creature creature in m_Creatures)
        {
            if (creature.Grade == 0)
            {
                continue;
            }

            HeroesInfoItem item = heroItemPrefabManager.GetNewObject <HeroesInfoItem>(m_HeroGrid.transform, Vector3.zero);
            item.Init(creature, OnSelectCharacter);
        }

        int count = m_HeroGrid.transform.childCount;

        while (count++ % m_HeroGrid.maxPerLine != 0)
        {
            HeroesInfoItem item = heroItemPrefabManager.GetNewObject <HeroesInfoItem>(m_HeroGrid.transform, Vector3.zero);
            item.Init(null, null);
        }

        m_HeroGrid.Reposition();
        m_HeroScroll.ResetPosition();

        RefreshInfo();
        UpdateSalePrice(0);
    }
Exemplo n.º 19
0
    private void GameQuit()
    {
        DG.Tweening.DOTween.isQuitting = true;
        SaveUnityTXTLog();
        InputManager.Clear();
        EntityFactory.Instance.Clear();
        UTopNameManager.Instance.Clear();
        USpeedUI.Blood.UBloodManager.Instance.Clear();
        SoundManager.Clear();
        SkinManager.Clear();
        PrefabManager.Clear();
        ImageSetting.Clear();
        if (AnimationEffectFactory.Instance)
        {
            AnimationEffectFactory.Instance.UnLoadAnimEffectData();
        }

        if (LightingEffectFactory.Instance)
        {
            LightingEffectFactory.Instance.ClearCache();
            LightingEffectFactory.Instance.ClearWhenGameEnd();
        }

        if (Application.isEditor)
        {
            Shader.globalMaximumLOD = int.MaxValue;
        }

        ImageEffectManager.API_GameEnd();
        SafeZoneEffectManager.Clear();
        //清除资源
        AssetBundleManager.Clear();
        SceneResInfoManager.ClearOnAppQuit();
        Resources.UnloadUnusedAssets();
        //GC.Collect();
    }
Exemplo n.º 20
0
 void OnReward()
 {
     m_MissionItemPrefabManager.Clear();
     InitItem();
     OnFinishedShow();
 }
Exemplo n.º 21
0
 public void OnCancel()
 {
     RankItemPrefab.Clear();
     parent.Close();
 }
Exemplo n.º 22
0
 public override void OnClose()
 {
     m_HeroManager.Clear();
     base.OnClose();
 }
Exemplo n.º 23
0
 override protected void Clear()
 {
     base.Clear();
     m_WorldBossCharacterPrefabManager.Clear();
     m_Characters.Clear();
 }
Exemplo n.º 24
0
 public override bool Uninit(bool bBack = true)
 {
     RuneItemPrefab.Clear();
     m_RuneList.Clear();
     return(base.Uninit(bBack));
 }
Exemplo n.º 25
0
 public override void OnClose()
 {
     Network.PVPBattleInfo = null;
     m_HeroManager.Clear();
     base.OnClose();
 }
Exemplo n.º 26
0
 override public void Uninit()
 {
     GuildRequestPrefabManager.Clear();
     GuildMemberPrefabManager.Clear();
     base.Uninit();
 }
Exemplo n.º 27
0
 protected void Clear()
 {
     m_RaidPlayerPrefabManager.Clear();
 }
Exemplo n.º 28
0
 public override bool Uninit(bool bBack)
 {
     runeItemPrefabManager.Clear();
     return(true);
 }
Exemplo n.º 29
0
 override public void Uninit()
 {
     GuildMemberItemPrefabManager.Clear();
     GuildInfoPrefabManager.Clear();
     base.Uninit();
 }
Exemplo n.º 30
0
 public override void OnFinishedHide()
 {
     DungeonHeroPrefabManager.Clear();
     base.OnFinishedHide();
 }