public void ReplaceEventComp(Utils.Event.EventDispatcher newDispatcher) { var index = GameComponentsLookup.EventComp; var component = (Components.Event.EventComp)CreateComponent(index, typeof(Components.Event.EventComp)); component.Dispatcher = newDispatcher; ReplaceComponent(index, component); }
public void ReplaceStatsComp(float[] newVars, Utils.Event.EventDispatcher newEventDispatcher) { var index = GameComponentsLookup.StatsComp; var component = (Components.Stat.StatsComp)CreateComponent(index, typeof(Components.Stat.StatsComp)); component.Vars = newVars; component.EventDispatcher = newEventDispatcher; ReplaceComponent(index, component); }