예제 #1
0
        private void OnSaveInfo(EButton button)
        {
            BuffTemplateInfo info = ScriptableObjectHelper.Create <BuffTemplateInfo>();

            info.desc          = "";
            info.id            = _buff_id_input.Value;
            info.duration      = _buff_id_input.Value;
            info.interval_time = interval_time_input.Value;
            info.max_layer     = max_layer_input.Value;
            info._effs.Clear();

            List <ERect> effect_list = _scroll_view.GetChilds();

            for (int i = 0; i < effect_list.Count; i++)
            {
                EEffectInfoItem item = effect_list[i] as EEffectInfoItem;
                if (item == null)
                {
                    continue;
                }

                EffectTemplateInfo eff_info = item.GetValue();
                info._effs.Add(eff_info);
            }
            AssetDatabase.CreateAsset(info, "Assets/Resources/test_buff_dat.asset");
            //ScriptableObjectHelper.Save<BuffTemplateInfo>(info, "Assets/Resources", "test_buff_dat");
        }
예제 #2
0
        public TextNode GetValue()
        {
            TextNode node = new TextNode();

            node.Name = "Root";
            List <ERect> items = _scrollview.GetChilds();

            for (int i = 0; i < items.Count; i++)
            {
                ETargetItem item = items[i] as ETargetItem;
                if (item == null)
                {
                    continue;
                }
                node.AddNode(item.GetValue());
            }

            return(node);
        }