예제 #1
0
    public override void OnClose()
    {
#if UNITY_ANDROID
        if (AndroidKeyboard.TouchScreenKeyboard.instance != null)
        {
            AndroidKeyboard.TouchScreenKeyboard.instance.active = false;
        }
#endif

        //ChannelGroupObject.SetActive(false);
        ChatLinePrefabManager.Destroy();
        parent.Close();
    }
예제 #2
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;
        }
    }
예제 #3
0
    public override void OnClose()
    {
        RewardManager.Destroy();

        if (m_reward_ack != null && m_reward_ack.loots != null && m_reward_ack.loots.Count > 0)
        {
            Popup.Instance.Close(true, true);
            m_reward_ack.loots.Reverse();
            foreach (var loot in m_reward_ack.loots)
            {
                switch (loot.type)
                {
                case pe_RewardLootType.Hero:
                    Popup.Instance.StackPopup(ePopupMode.LootCharacter, m_reward_ack.loot_creatures[loot.index].creature_idx, false, true);
                    break;

                case pe_RewardLootType.Token:
                    Popup.Instance.Show(ePopupMode.LootItem, new LootItemInfo(TokenInfoManager.Instance.GetInfoByType(m_reward_ack.add_goods[loot.index].goods_type).IDN, (int)m_reward_ack.add_goods[loot.index].goods_value));
                    break;

                case pe_RewardLootType.Item:
                    Popup.Instance.Show(ePopupMode.LootItem, new LootItemInfo(m_reward_ack.loot_items[loot.index].item_idn, m_reward_ack.loot_items[loot.index].add_piece_count));
                    break;

                case pe_RewardLootType.Rune:
                    Popup.Instance.Show(ePopupMode.LootItem, new LootItemInfo(m_reward_ack.loot_runes[loot.index].rune_idn, 0));
                    break;
                }
            }
            Popup.Instance.Show(true);
        }
        else
        {
            base.OnClose();
            if (_OnPopupCloseDelegate != null)
            {
                _OnPopupCloseDelegate();
            }
        }
    }
예제 #4
0
    public void SetStage(MapStageDifficulty stage_info)
    {
        m_StageInfo = stage_info;

        LabelTitle.text       = m_StageInfo.ShowName;
        LabelDungeonInfo.text = m_StageInfo.Description;

        RewardItemPrefab.Destroy();

        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();
    }
예제 #5
0
    void DrawItems()
    {
        m_EvalBoardPrefab.Destroy();
        m_EvalReadMorePrefab.Destroy();

        if (item_list.Count == 0)
        {
            m_EvalNoItemLabel.gameObject.SetActive(true);
            return;
        }

        m_EvalNoItemLabel.gameObject.SetActive(false);

        float last_position_y = 150f;

        foreach (var board in OrderedItemList())
        {
            var item = m_EvalBoardPrefab.GetNewObject <HeroesEvalItem>(m_EvalBoardScroll.transform, Vector3.zero);
            item.Init(board, creature_id, OnEvalBoardRemoveHandler, OnEvalChangeHandler);

            //collider size calc
            item.m_BoxCollider.size   = new Vector2(item.m_BoxCollider.size.x, item.m_BoxCollider.size.y + item.m_Message.height - item.m_Message.fontSize);
            item.m_BoxCollider.offset = new Vector2(0, item.m_BoxCollider.offset.y - ((item.m_Message.height - item.m_Message.fontSize) / 2));

            //item position calc
            item.transform.localPosition = new Vector3(0, last_position_y);
            last_position_y -= GRID_ITEM_HEIGHT_SIZE + (item.m_Message.height - item.m_Message.fontSize);
        }

        if (last_loaded_count >= 10)
        {
            var readmore_btn = m_EvalReadMorePrefab.GetNewObject <HeroesEvalReadMore>(m_EvalBoardScroll.transform, Vector3.zero);
            readmore_btn.Init(OnClickReadMore);
            readmore_btn.transform.localPosition = new Vector3(0, last_position_y);
        }
    }
예제 #6
0
 public void Close()
 {
     m_CreaturePrefabManager.Destroy();
     OnFinished();
 }
예제 #7
0
 public void Close()
 {
     m_ChannelSelectBtnPrefabManager.Destroy();
     OnFinished();
 }
예제 #8
0
 public override void OnClose()
 {
     RewardPrefabManager.Destroy();
     base.OnClose();
     parent.Close();
 }