示例#1
0
    public void InitCreature(CCreatureDetail creature)
    {
        _wealthIcon.gameObject.SetActive(false);
        _itemIcon.gameObject.SetActive(false);

        foreach (Transform tr in _creatureIcon.GetComponentsInChildren <Transform>(true))
        {
            tr.gameObject.SetActive(true);
        }

        int iCreatureTID = CDATA_CREATURE_NEWVER.Get(creature.kCreatureID).m_iCreatureTID;

        _creatureIcon.SetIcon(iCreatureTID, enCreatureIcon_Type.GuildRaidReward);

        //_wealthParent.SetActive(false);
        //_itemParent.SetActive(false);

        //foreach (Transform tr in _creatureParent.GetComponentsInChildren<Transform>(true))
        //{
        //    tr.gameObject.SetActive(true);
        //}

        //int iCreatureTID = CDATA_CREATURE_NEWVER.Get(creature.kCreatureID).m_iCreatureTID;
        //DATA_CREATURE_NEWVER CreatureTable = UtilFunc.GetCreatureDataByTID(iCreatureTID);

        //_creatureSprite.sprite2D = UIResourceMgr.CreateSprite(BUNDLELIST.TEXTURE_ICON_CREATUREHEAD, CreatureTable.m_szIcon);
        //_creatureGradeSprite.spriteName = string.Format("{0}{1}", "comm_thumbnailStar0", CreatureTable.m_iGrade);
        //_creatureClassSprite.spriteName = string.Format("{0}{1}", "UI_", CreatureTable.m_enCreatureArmy.ToString());

        //_IconNameLabel.text = StringTableManager.GetData(CreatureTable.iCreatureName);
    }
    private void SetCreatureItem(InfiniteItemBehavior itemBehaver, int dataIndex)
    {
        List <CreatureIcon> ItemElementList = itemBehaver.ItemElementList;
        int iCount = ItemElementList.Count;

        for (int i = 0; i < iCount; ++i)
        {
            int aIdx = ((dataIndex * iCount) + i);

            CreatureIcon ItemElement = ItemElementList[i];
            if (ItemElement == null)
            {
                continue;
            }

            if (_CreatureItemInfoList.Count > aIdx)
            {
                CreatureItemInfo ItemInfo = _CreatureItemInfoList[aIdx];
                if (ItemInfo == null)
                {
                    continue;
                }

                ItemElement.gameObject.SetActive(true);
                ItemElement.SetIcon(ItemInfo, enCreatureIcon_Type.Dispatch);

                ItemElement.SetActiveDispatchSelect(ItemInfo.IsDispatchSelect);
                ItemElement.SetDispatchSelectNumberLabel(ItemInfo.DispatchSelectNumber);
            }
            else
            {
                ItemElement.gameObject.SetActive(false);
            }
        }
    }
示例#3
0
    private void OnClickFriendItem(GameObject go)
    {
        if (go != null)
        {
            SoundManager.Instance.PlayFX(enSoundFXUI.BUTTON_MEDIUM);
        }

        for (int i = 0; i < _FriendList.Count; ++i)
        {
            DispatchTeamItemFriend friendItem = _FriendList[i];
            if (friendItem == null)
            {
                continue;
            }

            friendItem.SetActiveSelect(false);

            if (friendItem.gameObject == go)
            {
                if (friendItem.bDispatching == true)
                {
                    // 6747	친구 지원       // 6748	친구의 크리처는 1일 1회만 사용할 수 있습니다.
                    SystemPopupWindow.Instance.SetSystemPopup(enSystemPopupType.Ok, StringTableManager.GetData(6747), StringTableManager.GetData(6748));

                    if (m_SelectFriend != null)
                    {
                        m_SelectFriend.SetActiveSelect(true);
                    }

                    break;
                }
                else
                {
                    friendItem.SetActiveSelect(true);
                    m_SelectFriend = friendItem;

                    DispatchTeamSlot slot = m_DispatchTeamSlotList[m_DispatchTeamSlotList.Count - 1];       // 친구슬롯.
                    if (slot != null)
                    {
                        if (slot.CreatureIcon != null)
                        {
                            DestroyDispatchTeamCreature(slot);
                        }

                        SetTeamCount(1);

                        CreatureIcon creatureIcon = UIResourceMgr.CreatePrefab <CreatureIcon>(BUNDLELIST.PREFABS_UI_COMMON, slot.SlotObj.transform, "CreatureIcon");
                        creatureIcon.SetIcon(friendItem.FriendInfo.kCreatureID, enCreatureIcon_Type.DispatchDisplayFriend);
                        creatureIcon.CreatureKey = friendItem.FriendInfo.kFriendCharNo;
                        creatureIcon.AddPanel(m_iPanelDepth);
                        creatureIcon.RemoveBoxCollider();

                        slot.CreatureIcon = creatureIcon;
                        slot.SetActiveSelect(false);
                    }
                }
            }
        }
    }
示例#4
0
    private void SetDispatchInfo()
    {
        //m_DispatchTableData = CDATA_DISPATCH.Get(m_DispatchRecvData.kMissionCategory, m_DispatchRecvData.kDispatchSubID);
        if (m_DispatchTableData == null)
        {
            return;         // error.
        }
        // top
        {
            // 임무이름.
            m_DispatchDescLabel.text = StringTableManager.GetData(int.Parse(m_DispatchTableData.String_Name));

            // 6847    Lv {0} 이상 {1}성 이상
            m_DispatchContentLabel.text = string.Format(StringTableManager.GetData(6847), m_DispatchTableData.RequireLevel, (int)m_DispatchTableData.RequireGrade);
        }

        // middle
        {
            DestroyCreatureIcon();

            int iCount = m_DispatchRecvData.vCreatureKey.Count;
            for (int i = 0; i < iCount; ++i)
            {
                ulong kCreatureKey = m_DispatchRecvData.vCreatureKey[i];
                if (kCreatureKey == 0)
                {
                    continue;
                }

                CreatureIcon icon = UIResourceMgr.CreatePrefab <CreatureIcon>(BUNDLELIST.PREFABS_UI_COMMON, m_SlotList[i].transform, "CreatureIcon");
                icon.SetIcon(kCreatureKey, enCreatureIcon_Type.DispatchDisplay);
                icon.AddPanel(m_iPanelDepth);
                icon.RemoveBoxCollider();

                m_CreatureIconList.Add(icon);
            }

            //if(m_DispatchRecvData.kFriendCreatureID != DATA_CREATURE_NEWVER._enIndex.CREATURE_NONE)
            if (m_DispatchRecvData.kFriendCreatureID != 0)
            {
                CreatureIcon icon = UIResourceMgr.CreatePrefab <CreatureIcon>(BUNDLELIST.PREFABS_UI_COMMON, m_SlotList[m_SlotList.Count - 1].transform, "CreatureIcon");
                icon.SetIcon(m_DispatchRecvData.kFriendCreatureID, enCreatureIcon_Type.DispatchDisplayFriend);
                icon.AddPanel(m_iPanelDepth);
                icon.RemoveBoxCollider();

                m_CreatureIconList.Add(icon);
            }
        }

        // bottom
        {
            //SetDispatchButton(m_DispatchTableData);
        }
    }
示例#5
0
    private void CreateCreatureIcon(PvPCreaturesData creatureInfos)
    {
        ClearCreatureIcon();

        for (int i = 0; i < creatureInfos.Count; i++)
        {
            PvPCreatureInfo info = creatureInfos[i];

            CreatureIcon icon  = UIResourceMgr.CreatePrefab <CreatureIcon>(BUNDLELIST.PREFABS_UI_COMMON, _creatureIconTransforms[i], "CreatureIcon");
            int          Level = info.Level;
            icon.SetIcon(Level, info.forceCount, info.awake, CDATA_CREATURE_NEWVER.Get(info.enID), enCreatureIcon_Type.PvpDetail);
            icon.CreatureKey = info.key;
            icon.RemoveDragScrollView();
            UIEventListener.Get(icon.gameObject).onClick = OnClickIcon;

            _creatureIconList.Add(icon);
        }
    }
示例#6
0
    //===================================================================================
    //
    // Default Method
    //
    //===================================================================================

    //===================================================================================
    //
    // Method
    //
    //===================================================================================
    public void Init(CCreatureDetail creatureData)
    {
        _enCardType = enCardType.Creature;

        _CreatureCardParent.SetActive(true);
        _ItemCardParent.SetActive(false);

        _CreatureIcon = UIResourceMgr.CreatePrefab <CreatureIcon>(BUNDLELIST.PREFABS_UI_COMMON, _CreatureCardParent.transform, "CreatureIcon");
        _CreatureIcon.SetIcon(creatureData.kCreatureKey, enCreatureIcon_Type.Shop);
        _CreatureIcon.RemoveBoxCollider();
        _CreatureIcon.RemoveDragScrollView();

        // default layer is 0
        Transform[] tran = _CreatureIcon.GetComponentsInChildren <Transform>(true);
        foreach (Transform t in tran)
        {
            t.gameObject.layer = 0;
        }

        _CreatureIcon.gameObject.SetActive(true);
    }
示例#7
0
    private void SetDispatchCreature(CreatureIcon CreatureListIcon)
    {
        int iDispatchTeamSlotCount = m_DispatchTeamSlotList.Count - 1;

        if (CreatureListIcon.IsDispatchSelect == false)                    // 크리쳐를 추가할때
        {
            bool bAddCreature = false;
            for (int i = 0; i < iDispatchTeamSlotCount; ++i)
            {
                DispatchTeamSlot slot = m_DispatchTeamSlotList[i];
                if (slot == null)
                {
                    continue;
                }

                if (slot.bSelect == true)
                {
                    if (slot.CreatureIcon != null)
                    {
                        DestroyDispatchTeamCreature(slot);
                    }

                    SetTeamCount(1);

                    CreatureIcon creatureIcon = UIResourceMgr.CreatePrefab <CreatureIcon>(BUNDLELIST.PREFABS_UI_COMMON, slot.SlotObj.transform, "CreatureIcon");
                    creatureIcon.SetIcon(CreatureListIcon.CreatureKey, enCreatureIcon_Type.DispatchDisplay);
                    creatureIcon.AddPanel(m_iPanelDepth);
                    creatureIcon.RemoveBoxCollider();

                    slot.CreatureIcon = creatureIcon;
                    slot.SetActiveSelect(false);

                    CreatureListIcon.SetDispatchSelectNumberLabel(slot.iNum.ToString());
                    CreatureListIcon.SetActiveDispatchSelect(true);

                    bAddCreature = true;
                    break;
                }
            }

            if (bAddCreature == true)
            {
                for (int i = 0; i < iDispatchTeamSlotCount; ++i)                // 다음 선택될 칸을 지정한다.
                {
                    DispatchTeamSlot slot = m_DispatchTeamSlotList[i];
                    if (slot == null)
                    {
                        continue;
                    }

                    if (slot.CreatureIcon == null)
                    {
                        slot.SetActiveSelect(true);
                        break;
                    }
                }
            }
        }
        else if (CreatureListIcon.IsDispatchSelect == true)                // 추가된 크리쳐를 뺄때
        {
            for (int i = 0; i < iDispatchTeamSlotCount; ++i)
            {
                DispatchTeamSlot slot = m_DispatchTeamSlotList[i];
                if (slot == null)
                {
                    continue;
                }

                slot.SetActiveSelect(false);

                if (slot.CreatureIcon != null)
                {
                    if (slot.CreatureIcon.CreatureKey == CreatureListIcon.CreatureKey)
                    {
                        CreatureListIcon.SetActiveDispatchSelect(false);
                        DestroyDispatchTeamCreature(slot);
                        slot.SetActiveSelect(true);
                    }
                }
            }
        }
    }
示例#8
0
    //===================================================================================
    //
    // Default Method
    //
    //===================================================================================

    //===================================================================================
    //
    // Method
    //
    //===================================================================================
    public void Init(CFriend friendInfo, DATA_CREATURE_NEWVER pCreatureData)
    {
        m_FriendInfo = friendInfo;

        _vCharNo UsedFriendKeyList = UserInfo.Instance.DispatchInfoAck.vUsedFriendKey;

        bDispatching = false;
        m_CoolTimeObj.SetActive(false);

        for (int i = 0; i < UsedFriendKeyList.Count; ++i)
        {
            if (friendInfo.kFriendCharNo == UsedFriendKeyList[i])
            {
                // 쿨타임 표시.
                bDispatching = true;
                m_CoolTimeObj.SetActive(true);
                break;
            }
        }

        m_CreatureIcon.SetIcon(friendInfo.kCreatureID, enCreatureIcon_Type.Dispatch);
        //m_CreatureIcon.m_OnClickEvent += evt;

        m_CreatureIcon.m_IsNew = false;
        //icon.m_kCreatureKey = kCreatureKey;
        m_CreatureIcon.m_iGrade = pCreatureData.m_iGrade;
        m_CreatureIcon.m_szName = StringTableManager.GetData(pCreatureData.iCreatureName);
        //icon.m_Reinforce = pMy.GetForceCount();

        m_CreatureIcon.m_iCreatureTID = pCreatureData.m_iCreatureTID;
        m_CreatureIcon.m_szIcon       = pCreatureData.m_szIcon;
        //icon.m_iLevel = pMy.GetItemLV();
        m_CreatureIcon.m_enCreatureArmy = pCreatureData.m_enCreatureArmy; //병과
        m_CreatureIcon.m_SellCheck      = false;
        m_CreatureIcon.m_iSellCost      = pCreatureData.m_iSellCost;
        m_CreatureIcon.m_kLock          = 0;

        // vip정보 셋팅.
        {
            if (CDATA_VIP.GetCount() < 1)
            {
                CDATA_VIP.Load();
            }

            DATA_VIP vipData = CDATA_VIP.Get(friendInfo.kVIPLevel);
            if (vipData == null)
            {
                return;
            }

            m_VipSprite.spriteName = vipData.szGradeImg;
            m_VipLabel.text        = string.Format(StringTableManager.GetData(4984), (int)friendInfo.kVIPLevel);
        }

        // 친구 레벨, 아이디 셋팅.
        {
            m_UserLevelLabel.text = string.Format("{0}{1}", StringTableManager.GetData(12), friendInfo.kCharLevel);
            m_UserNameLabel.text  = friendInfo.kCharName;
        }

        // 접속시간 셋팅.
        {
            if (friendInfo.kFriendState == _enFriendState.eFriendState_OnLine)
            {
                m_LastLoginTimeLabel.text = StringTableManager.GetData(3473);
            }
            else if (friendInfo.kFriendState == _enFriendState.eFriendState_OffLine)
            {
                TimeSpan ts    = TimeManager.Instance.GetServerTime() - friendInfo.kGameLastLogonTime.GetDateTime();
                int      iDay  = ts.Days;
                int      iHour = ts.Hours;
                int      iMin  = ts.Minutes;

                if (iDay > 0)
                {
                    m_LastLoginTimeLabel.text = string.Format(StringTableManager.GetData(3470), iDay, StringTableManager.GetData(3472), StringTableManager.GetData(3483));
                }
                else if (iHour > 0)
                {
                    m_LastLoginTimeLabel.text = string.Format(StringTableManager.GetData(3470), iHour, StringTableManager.GetData(3471), StringTableManager.GetData(3483));
                }
                else if (iMin > 0)
                {
                    m_LastLoginTimeLabel.text = string.Format(StringTableManager.GetData(3470), iMin, StringTableManager.GetData(3482), StringTableManager.GetData(3483));
                }
                else
                {
                    // 1분전접속.
                    m_LastLoginTimeLabel.text = string.Format(StringTableManager.GetData(3470), 1, StringTableManager.GetData(3482), StringTableManager.GetData(3483));
                }
            }

            //TimeSpan ts = TimeManager.Instance.GetServerTime() - friendInfo.kGameLastLogonTime.GetDateTime();
            //int iDay = ts.Days;
            //int iHour = ts.Hours;
            //int iMin = ts.Minutes;

            //if (iDay > 0)
            //    m_LastLoginTimeLabel.text = string.Format(StringTableManager.GetData(3470), iDay, StringTableManager.GetData(3472), StringTableManager.GetData(3483));
            //else if (iHour > 0)
            //    m_LastLoginTimeLabel.text = string.Format(StringTableManager.GetData(3470), iHour, StringTableManager.GetData(3471), StringTableManager.GetData(3483));
            //else if (iMin > 0)
            //    m_LastLoginTimeLabel.text = string.Format(StringTableManager.GetData(3470), iMin, StringTableManager.GetData(3482), StringTableManager.GetData(3483));
            //else
            //{
            //    m_LastLoginTimeLabel.text = StringTableManager.GetData(3473);
            //}
        }

        SetActiveSelect(false);
    }