Example #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");
        }
Example #2
0
        private void AddEffect(EButton button)
        {
            string data = _effect_popup.GetData();

            E_EffectType eff_type = (E_EffectType)Enum.Parse(typeof(E_EffectType), data);

            EEffectInfoItem effect_info_item = new EEffectInfoItem(Ew - 70, 460, eff_type);

            //AddComponent(effect_info_item, 10, _des_text_area.Ey + _des_text_area.Eh / 2 + 5);
            _scroll_view.AddItem(effect_info_item);
        }