Exemple #1
0
 private PlayerHelpItem CreateAnItem(PlayerHelp help)
 {
     item  = ObjectManager.Instance.GetPoolObject(itemPfb, itemPfb.transform.parent, false);
     hItem = item.GetComponent <PlayerHelpItem>();
     hItem.InitPlayerHelpItem(help.title, help.infomation, titleInput, infoInput);
     return(hItem);
 }
Exemple #2
0
    private void InsertBtnClicked()
    {
        string title = titleInput.text;

        if (title != null && itemDic.ContainsKey(title))
        {
            data.RemoveAll((x) => x.title == titleInput.text);
            PlayerHelp help = new PlayerHelp(titleInput.text, infoInput.text);
            data.Insert(0, help);
            itemDic[title].LoadBack();
        }
        else if (title != "")
        {
            PlayerHelp help = new PlayerHelp(titleInput.text, infoInput.text);
            data.Insert(0, help);
            hItem = CreateAnItem(help);
            itemDic.Add(hItem.title.text, hItem);
        }
    }