Пример #1
0
    public void show(GameIDData d, RuneInfoPopup.Type type, int rare, int level, bool isInventorySlot = true, bool isFirstSequenceForReinforce = true, GameIDData compareData = null)
    {
        spSkipModeBackground.gameObject.SetActive(false);
        spBackground.gameObject.SetActive(true);

//		btnPlayAttack.gameObject.SetActive((type == Type.Book));
//		btnPlayDeadAni.gameObject.SetActive((type == Type.Book));
//		btnPlaySkillAni.gameObject.SetActive(false);

                #if UNITY_EDITOR
        if (DebugManager.instance.useDebug == false)
                        #endif
        {
            GamePlayerData nowPlayerData;

            if (GameManager.me.uiManager.uiMenu.uiSummon.gameObject.activeSelf && GameDataManager.instance.serverHeroData.Count > 1 && GameDataManager.instance.heroes.ContainsKey(GameManager.me.uiManager.uiMenu.uiSummon.tabPlayer.currentTab))
            {
                nowPlayerData = GameDataManager.instance.heroes[GameManager.me.uiManager.uiMenu.uiSummon.tabPlayer.currentTab];
            }
            else
            {
                nowPlayerData = GameDataManager.selectedPlayerData;
            }

            GameManager.me.changeMainPlayer(nowPlayerData, nowPlayerData.id, nowPlayerData.partsVehicle.parts.resource.ToUpper());
        }


        if (GameManager.me.effectManager.isCompleteLoadEffect == false)
        {
            if (GameManager.me.effectManager.didStartLoadEffect == false)
            {
                GameManager.me.effectManager.startLoadEffects(true);
            }
        }


        _isOpenRuneBook = GameManager.me.uiManager.popupRuneBook.gameObject.activeSelf;

        if (_isOpenRuneBook)
        {
            GameManager.me.uiManager.uiMenuCamera.camera.enabled = false;
        }


        data.parse(d.serverId);
        _compareData = compareData;
        _rare        = rare;

        reinforceInfoBar.setReinforceData(data);

        isFromInventorySlot = isInventorySlot;

        popupType = type;

        if (sample != null)
        {
            GameManager.me.characterManager.cleanMonster(sample);
            sample = null;
        }


        descriptionContainer.SetActive(popupType != RuneInfoPopup.Type.Make);
        cardFrame.showDescriptionPanel(popupType != RuneInfoPopup.Type.Make, false);


        RuneStudioMain.instance.cam512.gameObject.SetActive(true);

        characterRotate.canRotate = true;

        rotater.enabled = (type == RuneInfoPopup.Type.Make);

        SoundData.play("uicm_popup_mid");

        movablePanel.localPosition = new Vector3(-3000, 0, 0);

        spBackground.color = new Color(0, 0, 0, 100.0f / 255.0f);

        gameObject.SetActive(true);

        characterRotate.state = UICharacterRotate.STATE_NORMAL;

        btnClose.gameObject.SetActive(type != RuneInfoPopup.Type.Reinforce);

        _activeButtons.Clear();

        if (type == RuneInfoPopup.Type.Reinforce && isFirstSequenceForReinforce)
        {
            btnInstantBuy.gameObject.SetActive(false);

            btnBreak.gameObject.SetActive(false);
            btnPutOn.gameObject.SetActive(false);
            btnPutOff.gameObject.SetActive(false);
            btnReinfoce.gameObject.SetActive(false);
            btnCompose.gameObject.SetActive(false);
            btnEvolution.gameObject.SetActive(false);
            btnReforge.gameObject.SetActive(false);
            goCannotWear.SetActive(false);
        }
        else if (type == RuneInfoPopup.Type.Book || type == RuneInfoPopup.Type.PreviewOnly || type == RuneInfoPopup.Type.Make)
        {
//			challengeItemData = null;

            btnInstantBuy.gameObject.SetActive(false);
            btnBreak.gameObject.SetActive(false);
            btnPutOn.gameObject.SetActive(false);
            btnPutOff.gameObject.SetActive(false);
            btnReinfoce.gameObject.SetActive(false);
            btnCompose.gameObject.SetActive(false);
            btnEvolution.gameObject.SetActive(false);
            btnReforge.gameObject.SetActive(false);
            goCannotWear.SetActive(false);
        }
        else         //Normal, Reinforce
        {
//			challengeItemData = null;

            btnInstantBuy.gameObject.SetActive(false);

            btnBreak.gameObject.SetActive(true);

            btnReinfoce.gameObject.SetActive(true);

            // 탭에서 온 녀석.
            if (isFromInventorySlot == false)
            {
                btnBreak.isEnabled = false;
                btnPutOn.gameObject.SetActive(false);
                btnPutOff.gameObject.SetActive(true);

                goCannotWear.SetActive(false);
            }
            // 일반으로 온 녀석.
            else
            {
                btnBreak.isEnabled = true;
                btnPutOff.gameObject.SetActive(false);

                if (GameManager.me.uiManager.uiMenu.uiSummon.checkCanPutOn(data.unitData))
                {
                    btnPutOn.gameObject.SetActive(true);
                    goCannotWear.SetActive(false);
                }
                else
                {
                    goCannotWear.SetActive(true);
                    btnPutOn.gameObject.SetActive(false);

                    lbWearCharacter.text = Util.getUIText("STR_USE_THIS", Util.getUIText(GameManager.me.uiManager.uiMenu.uiSummon.lastCheckPutOnCharacter));
                }
            }

            btnReinfoce.gameObject.SetActive(true);


//			* 제련 원본 룬 : 제련 레벨 99 미만의 SS등급 소환룬, 스킬룬, 히어로장비   (A이하 : 합성 버튼 / S : 진화 버튼 / SS : 제련 버튼)
//				* 제련 재료 룬 : (등급부분을 제외하고) 원본 룬과 동일한 베이스 아이디를 가진 SS등급 or S등급
//					예> UN613 의 제련 재료 : UN613, UN513 // SK_6110 : SK6110, SK5110 // LEO_BD6_22 : LEO_BD6_22, LEO_BD5_22
//					* 제련 시, 100,000 골드 소모

            if (data.canReforge())
            {
//				btnReinfoce.isEnabled = false;
                btnReforge.gameObject.SetActive(true);
            }
            else
            {
//				btnReinfoce.isEnabled = true;
                btnReforge.gameObject.SetActive(false);
            }

            btnEvolution.gameObject.SetActive(data.rare == RareType.S);
            btnCompose.gameObject.SetActive(data.rare < RareType.S);
        }


        _v.y = -253f;
        _v.z = -56f;

        if (goCannotWear.activeSelf)
        {
            _activeButtons.Add(goCannotWear);
        }
        if (btnPutOn.gameObject.activeSelf)
        {
            _activeButtons.Add(btnPutOn.gameObject);
        }
        if (btnPutOff.gameObject.activeSelf)
        {
            _activeButtons.Add(btnPutOff.gameObject);
        }
        if (btnReinfoce.gameObject.activeSelf)
        {
            _activeButtons.Add(btnReinfoce.gameObject);
        }
        if (btnReforge.gameObject.activeSelf)
        {
            _activeButtons.Add(btnReforge.gameObject);
        }
        if (btnCompose.gameObject.activeSelf)
        {
            _activeButtons.Add(btnCompose.gameObject);
        }
        if (btnEvolution.gameObject.activeSelf)
        {
            _activeButtons.Add(btnEvolution.gameObject);
        }


        for (int i = _activeButtons.Count - 1; i >= 0; --i)
        {
            _v.x = 323 - i * (323 - 177);
            _activeButtons[i].transform.localPosition = _v;
        }

        _activeButtons.Clear();

        cardFrame.showFrame(_rare);
        cardFrame.setTranscendLevel(data);


        if (data.unitData.atkPhysic > data.unitData.atkMagic)
        {
            spIconPhysicOrMagic.spriteName = "icn_animal_character_physicsattack";
            strIconDescription[0]          = Util.getUIText("STYPE_ATKPHYSIC");
        }
        else
        {
            spIconPhysicOrMagic.spriteName = "icn_animal_character_magicattack";
            strIconDescription[0]          = Util.getUIText("STYPE_ATKMAGIC");
        }

        if (data.unitData.attackType.type == 1 || data.unitData.attackType.type == 3)
        {
            spIconTargetingType.spriteName = "icn_animal_character_oneattack";
            strIconDescription[1]          = Util.getUIText("STYPE_ONEATK");
        }
        else
        {
            spIconTargetingType.spriteName = "icn_animal_character_multiattack";
            strIconDescription[1]          = Util.getUIText("STYPE_MULTIATK");
        }

        if (data.unitData.attackType.type == 1 || data.unitData.attackType.type == 2)
        {
            spIconRange.spriteName = "icn_animal_character_shortdistance";
            strIconDescription[2]  = Util.getUIText("STYPE_SHORTATK");
        }
        else
        {
            if (data.unitData.attackType.type == 14)
            {
                spIconRange.spriteName = "icn_skill_character_buster";
                strIconDescription[2]  = Util.getUIText("STYPE_BUSTATK");
            }
            else
            {
                spIconRange.spriteName = "icn_animal_character_longdistance";
                strIconDescription[2]  = Util.getUIText("STYPE_LONGATK");
            }
        }

        for (int i = 0; i < 3; ++i)
        {
            lbIconDescription[i].text = strIconDescription[i];
        }


        cardFrame.lbName.text = data.unitData.name;

        if (_compareData != null && popupType != RuneInfoPopup.Type.Book)
        {
            cardFrame.setLevel(level, (level - _compareData.level));
        }
        else
        {
            cardFrame.setLevel(level);
        }

        sb.Length  = 0;
        sb2.Length = 0;


        tabPassiveInfo[0].transform.parent.gameObject.SetActive(type == RuneInfoPopup.Type.Book && data.rare >= RareType.S);

        setPassiveInfo(0);


        setDescription(popupType == RuneInfoPopup.Type.Book, data);

        _q = sampleContainer.localRotation;
        //_v.x = 0; _v.y = 21; _v.z = 0;
        _q.eulerAngles = _v;
        sampleContainer.localRotation = _q;

        if (sample == null)
        {
            StartCoroutine(getMonster(sample, data.unitData, sampleContainer, _rare));
        }

        showProcess2();


        visibleComposeNoticeMark();

//		btnPlaySkillAni.gameObject.SetActive((type == Type.Book) && getActiveUnitSkillAttackType() > -1);
    }
Пример #2
0
    void setButtons(bool isFirstSequenceForReinforce)
    {
        _activeButtons.Clear();

        if (popupType == RuneInfoPopup.Type.Reinforce && isFirstSequenceForReinforce)
        {
            btnWear.gameObject.SetActive(false);
            btnSell.gameObject.SetActive(false);
            btnReinfoce.gameObject.SetActive(false);
            btnInstantBuy.gameObject.SetActive(false);
            btnCompose.gameObject.SetActive(false);
            btnEvolution.gameObject.SetActive(false);
            btnReforge.gameObject.SetActive(false);
        }
        else if (popupType == RuneInfoPopup.Type.Book || popupType == RuneInfoPopup.Type.PreviewOnly || popupType == RuneInfoPopup.Type.Make)
        {
            btnWear.gameObject.SetActive(false);
            btnSell.gameObject.SetActive(false);
            btnReinfoce.gameObject.SetActive(false);
            btnCompose.gameObject.SetActive(false);
            btnInstantBuy.gameObject.SetActive(false);
            btnEvolution.gameObject.SetActive(false);
            btnReforge.gameObject.SetActive(false);
        }
        else         //Normal, Reinforce
        {
            btnInstantBuy.gameObject.SetActive(false);

            btnWear.gameObject.SetActive(true);
            btnSell.gameObject.SetActive(true);

            // 탭에서 온 녀석.
            if (isFromInventorySlot == false)
            {
                btnWear.isEnabled = false;
                btnSell.isEnabled = false;
            }
            // 일반으로 온 녀석.
            else
            {
                btnWear.isEnabled = (data.partsData.character == GameManager.me.uiManager.uiMenu.uiHero.tabPlayer.currentTab);                //GameDataManager.instance.selectHeroId);
                btnSell.isEnabled = true;
            }

            btnReinfoce.gameObject.SetActive(true);

            if (data.canReforge())
            {
//				btnReinfoce.isEnabled = false;
                btnReforge.gameObject.SetActive(true);
            }
            else
            {
//				btnReinfoce.isEnabled = true;
                btnReforge.gameObject.SetActive(false);
            }

            btnEvolution.gameObject.SetActive(data.rare == RareType.S);

            btnCompose.gameObject.SetActive(data.rare < RareType.S);
        }

        _v = btnWear.transform.localPosition;



        if (btnWear.gameObject.activeSelf)
        {
            _activeButtons.Add(btnWear.gameObject);
        }
        if (btnReinfoce.gameObject.activeSelf)
        {
            _activeButtons.Add(btnReinfoce.gameObject);
        }
        if (btnReforge.gameObject.activeSelf)
        {
            _activeButtons.Add(btnReforge.gameObject);
        }
        if (btnCompose.gameObject.activeSelf)
        {
            _activeButtons.Add(btnCompose.gameObject);
        }
        if (btnEvolution.gameObject.activeSelf)
        {
            _activeButtons.Add(btnEvolution.gameObject);
        }

        for (int i = _activeButtons.Count - 1; i >= 0; --i)
        {
            _v.x = 323 - i * (323 - 177);
            _activeButtons[i].transform.localPosition = _v;
        }

        _activeButtons.Clear();
    }