Пример #1
0
    public void OnAddSeq(System.Object param)
    {
        SeqNodeCnf  info  = param as SeqNodeCnf;
        GameObject  go    = Resources.Load <GameObject>("Prefab/UI/Skill/" + info.Pfb);
        GameObject  insGo = Instantiate(go);
        SeqNodeItem item  = insGo.GetComponent <SeqNodeItem>();

        item.Add(_info);
        GameObjectHelper.SetParent(insGo, _nodesParent);
    }
Пример #2
0
 private void OnSelectDes(System.Object param)
 {
     _selectCnf = param as SeqNodeCnf;
     if (_selectCnf == null)
     {
         _des.text = String.Empty;
     }
     else
     {
         _des.text = _selectCnf.Des;
     }
 }
Пример #3
0
    private void Init()
    {
        TextAsset       textAsset = Resources.Load <TextAsset>("Config/01");
        List <string[]> info      = StringHelper.ParseData(textAsset.text);

        _map.Clear();

        int length = info.Count;

        for (int i = 0; i < length; i++)
        {
            SeqNodeCnf cnf = new SeqNodeCnf();
            cnf.Set(info[i]);
            if (!_map.ContainsKey(cnf.Menu))
            {
                _map.Add(cnf.Menu, new List <SeqNodeCnf>());
            }
            _map[cnf.Menu].Add(cnf);
        }
    }
Пример #4
0
 public void SetEmpty()
 {
     _cnf      = null;
     _des.text = string.Empty;
 }
Пример #5
0
 public void Set(SeqNodeCnf cnf)
 {
     _cnf      = cnf;
     _des.text = _cnf.Title;
 }