Exemple #1
0
    void OnDisableUnLockPanel()
    {
        //    NotGoldPanel.SetActive(false);
        NotCompletePanel.SetActive(false);
        BuyProcessPanel.SetActive(false);

        BuyPanel.SetActive(false);
    }
Exemple #2
0
    void InfoDisplayProcess(GameObject go)
    {
        BuyPanel.SetActive(false);
        DisplayPanel.SetActive(true);
        int enhanceLevel = 0;

        InfoDisplay(go.tag, go.name);
        upgradeObject = go;

        UIEventListener.Get(EnhanceButton).onClick -= new UIEventListener.VoidDelegate(UpgradeProcess);
        UIEventListener.Get(EnhanceButton).onClick += new UIEventListener.VoidDelegate(UpgradeProcess);
    }
Exemple #3
0
    void MonsterBuyProcess(GameObject go)
    {
        NotCompletePanel.SetActive(false);
        BuyProcessPanel.SetActive(false);
        CancleButton.SetActive(true);


        if (go.tag.Equals("Alias"))
        {
            unlockObjectSprite.atlas      = characterAtlas;
            unlockObjectSprite.spriteName = GM.getMonsterName(go.name, GM.LoadLevelData(go.name), true);
        }
        else if (go.tag.Equals("Obstacle"))
        {
            unlockObjectSprite.atlas      = trapAtlas;
            unlockObjectSprite.spriteName = go.name + "_" + GM.LoadLevelData(go.name);
        }
        unlockObjectSprite.MakePixelPerfect();
        unlockObjectSprite.transform.localPosition = unlockPos;

        int peekPrice = GM.getPrice(go.name, "enhance", go.tag);

        if (peekPrice > TempStaticMemory.gold)
        {
            GM.SendToAlert(AlertDialog.NotGold, peekPrice.ToString("0"));
        }
        else if (!isBuyCharacter(go.name))
        {
//            DisplayPanel.SetActive(false);
            BuyPanel.SetActive(true);
            NotCompletePanel.SetActive(true);
            NotCompletePanel.transform.FindChild("ContextLabel").GetComponent <UILabel>().text
                = GM.getContext("Context", "NotComplete");
            NotCompletePanel.transform.FindChild("NeedConditionLabel").GetComponent <UILabel>().text
                = GM.getContext("LockCondition", go.name);

            UIEventListener.Get(CancleButton).onClick += new UIEventListener.VoidDelegate(process =>
            {
                OnDisableUnLockPanel();
            });
        }
        else
        {
            DisplayPanel.SetActive(false);
            int   range, size;
            float hp, atk, speed;
            unlockObjectSprite.transform.localPosition = lockpos;
            UnlockButton.transform.FindChild("Label").GetComponent <UILabel>().text
                = "해금 : " + peekPrice + "G";
            GM.setCharacterData(go.name, out hp, out atk, out range, out speed, out size);
            //"Level : " + GM.LoadLevelData(go.name) + "\n" +
            buyDescriptLabel.text =
                "hp : " + hp.ToString("#") + "\n" +
                "공격력 : " + atk.ToString("#") + "\n" +
                "공격속도 : " + speed.ToString("#") + "\n" +
                "공격범위 : " + range.ToString("#") + "\n" +
                "캐릭터크기 : " + size.ToString("#");

            BuyPanel.SetActive(true);
            CancleButton.SetActive(false);
            BuyProcessPanel.SetActive(true);
            upgradeObject = go;
            UIEventListener.Get(UnlockButton).onClick +=
                new UIEventListener.VoidDelegate(buybuttonProcess);
        }
    }