protected override void OnSetModel(ref object model) { list.Clear(); SystemComponent sc; if (model is Tuple <string, SystemComponent> ) { sc = ((Tuple <string, SystemComponent>)model).Item2; energyIndicator.gameObject.SetActive(true); } else { sc = (SystemComponent)model; energyIndicator.gameObject.SetActive(false); } foreach (var i in sc.GetInfo()) { list.AddItem(null, f => ((FieldView)f).SetField(i.Name, i.Value)); } var config = sc.GetConfig(); foreach (var c in config.GetNames()) { list.AddItem(null, f => ((FieldView)f).SetField(c, config.GetField(c).ToString())); } }
protected override void OnSetModel(ref object model) { Campaign.Stage stage = (Campaign.Stage)model; storyText.text = stage.storyString; choiseList.Clear(); foreach (var s in stage.forwardStages) { choiseList.AddItem(s); } }
public void AddFrag() { fragList.AddItem(new object()); }