16 if (this.card !=
null)
18 return this.card.id +
"(" + this.card.NameSimple +
")";
27 public string idEditor
31 Card card = this.card;
36 return card.c_idEditor;
40 if (this.card !=
null)
42 this.card.c_idEditor = value;
54 Card card = this.card;
59 return card.c_idTrait;
63 if (this.card !=
null)
65 this.card.c_idTrait = value;
77 if (this.card ==
null || this.card.refVal == 0)
81 BGMData bgmdata =
EMono.core.refs.bgms.FirstOrDefault((BGMData a) => a.id ==
this.card.refVal);
82 if (!(bgmdata ==
null))
90 if (this.card !=
null)
92 this.card.refVal = value.Split(
' ', StringSplitOptions.None)[0].ToInt();
98 private IEnumerable<string> _TapeList()
100 List<string> list =
new List<string>();
101 foreach (BGMData bgmdata
in EMono.core.refs.bgms)
103 list.Add(bgmdata.name);
114 Card card = this.card;
115 return ((card !=
null) ? card.trait :
null) is
TraitTape;
120 private IEnumerable<string> Traits()
122 IEnumerable<Type> enumerable = (this.card ==
null || !this.card.isChara) ? this.GetInheritedClasses(typeof(
Trait), typeof(
TraitChara)) : this.GetInheritedClasses(typeof(
TraitChara),
null);
123 List<string> list =
new List<string>();
125 foreach (Type type
in enumerable)
133 private IEnumerable<Type> GetInheritedClasses(Type MyType, Type exclude =
null)
135 return from TheType in Assembly.GetAssembly(MyType).GetTypes()
136 where TheType.IsClass && TheType.IsSubclassOf(MyType) && (exclude ==
null || !TheType.IsSubclassOf(exclude))
143 public string spawnList
147 if (this.card ==
null || this.card.c_idRefCard.IsEmpty() || !
EMono.editorSources.spawnLists.map.ContainsKey(
this.card.c_idRefCard))
160 if (this.card !=
null)
162 this.card.c_idRefCard = value;
168 protected IEnumerable<string> _SpawnList()
170 return EMono.editorSources.spawnLists.GetListString();
176 CardInspector.Instance =
this;
180 public void SetCard(
Card c,
bool select =
true)
184 if (c !=
null && !c.c_editorTags.IsEmpty())
186 foreach (
string text
in c.c_editorTags.Split(
',', StringSplitOptions.None))
190 this.tags.Add(text.ToEnum(
true));
194 Debug.Log(
"No Editor Tag Found:" + text);
198 this.traitVals = c.c_editorTraitVal;
202 private void OnValidate()
204 if (!Application.isPlaying || !
EMono.core.IsGameStarted ||
this.card ==
null)
210 if (this.tags !=
null)
212 foreach (EditorTag editorTag
in this.tags)
214 text = text + (flag ?
"" :
",") + editorTag.ToString();
218 this.card.c_editorTags = text;
219 this.card.c_editorTraitVal = (this.traitVals.IsEmpty() ?
null : this.traitVals);
229 public List<EditorTag> tags =
new List<EditorTag>();
232 public string traitVals;