예제 #1
0
    private void BtnClick(Button btn)
    {
        switch (btn.name)
        {
        case "btnLevelUp":
            int result = nowVo.LevelUp();
            if (result == 0)
            {
                UIManager.Instance.CreateTipPanel("技能已满级");
            }
            else if (result == 1)
            {
                UIManager.Instance.CreateTipPanel("灵魂不足");
            }
            else if (result == 2)
            {
                UIManager.Instance.CreateTipPanel("升级成功");
                GameRoot.Instance.evt.CallEvent(GameEventDefine.UPDATE_SKILL, null);
            }
            break;

        case "btnRemove":
            DataManager.Instance.skillModel.RemoveNow(nowCellPos);
            GameRoot.Instance.evt.CallEvent(GameEventDefine.UPDATE_SKILL, null);
            break;
        }
    }
예제 #2
0
    private void BtnClick()
    {
        int result = skillVo.LevelUp();

        if (result == 0)
        {
            UIManager.Instance.CreateTipPanel("技能已满级");
        }
        else if (result == 1)
        {
            UIManager.Instance.CreateTipPanel("经验不足");
        }
        else if (result == 2)
        {
            UIManager.Instance.CreateTipPanel("升级成功");
            GameRoot.Instance.evt.CallEvent(GameEventDefine.UPDATE_SERVANT, null);
        }
    }