protected override void OnSet(ObjectiveController item) { Objectives = new ViewList <Objective, Objective_View>(); Objectives.Init(MakeView, GetTarget, ListToShow(), OnRemove, ShowItemCount); item.OnComplete += OnItemUpdated; }
public void SetEffects(List <UnitEffect> new_effects) { if (views == null) { views = new ViewList <UnitEffect, UI_EffectItemView>(); } views.Init(MakeNewView, GetTransform, RemoveView, 10); UpdateViews(new_effects); }
public void Init(TurnSystem turn_system) { AnchoredList.Init(TurnListEntries); views = new ViewList <ITurn, UI_TurnListItem>(); views.Init(MakeItem, getTarget, RemoveView, 99); if (turn_system != null) { turn_system.OnListUpdated += OnListUpdate; OnListUpdate(turn_system.Turnables); } }
public void Init(List <ScriptableUnitConfig> configs) { views = new ViewList <ScriptableUnitConfig, UI_UnitMiniView>(); views.Init(MakeView, delegate { return(this.transform); }, configs, Remove, 100); }