示例#1
0
 void OnProfessionCell(ButtonScript obj, object args, int param1, int param2)
 {
     if (selectCell != null)
     {
         selectCell.back.spriteName = "jn_jinlan";
     }
     crtSelect_ = param1;
     profCellList[param1].back.spriteName = "jn_jinlanliang";
     selectCell = profCellList[param1];
     UpdateInfo(profCellList [param1].jobId);
 }
示例#2
0
    // Use this for initialization2294 【11372 BUG】主线任务应该不可以放弃
    void Start()
    {
        //InitUIText ();
        crtSelect_ = 0;
        if (GamePlayer.Instance.GetIprop(PropertyType.PT_Profession) == (int)JobType.JT_Newbie)
        {
            NpcData nData = NpcData.GetData(NpcRenwuUI.NpcId);
            if (nData.BabySkillLearn != "")
            {
                questIds_ = nData.BabySkillLearn.Split(';');
            }
        }

        UIManager.SetButtonEventHandler(CloseBtn_.gameObject, EnumButtonEvent.OnClick, OnClose, 0, 0);
        UIManager.SetButtonEventHandler(jobOkBtn.gameObject, EnumButtonEvent.OnClick, OnJobOk, 0, 0);
        for (int i = 0; i < profCellList.Count; i++)
        {
            UIManager.SetButtonEventHandler(profCellList[i].gameObject, EnumButtonEvent.OnClick, OnProfessionCell, i, 0);
        }
        selectCell = profCellList [0];
        UpdateInfo(profCellList [0].jobId);
    }