public MessagingSpace(ISubscribableRouter router, Func <T, Vector2> getPoint, Func <T, TopLeftRectangle> getBox, IPartitioner partitioner = null) { _router = router; _space = new Space <T>(getPoint, getBox, partitioner); _newInstances = new List <T>(); NewInstances = new ReadOnlyCollection <T>(_newInstances); _router.Add <ICompositionMessage <T> >(Interpret); _router.Add <IDecompositionMessage <T> >(Interpret); }
public MessagingTracker(ISubscribableRouter router) { _router = router; _tracker = new List <T>(); _newInstances = new List <T>(); NewInstances = new ReadOnlyCollection <T>(_newInstances); _router.Add <ICompositionMessage <T> >(Interpret); _router.Add <IDecompositionMessage <T> >(Interpret); }
public ProjectionManager(RootView rootView, ISubscribableRouter subscribableRouter) { _rootView = rootView; _views = new MessagingTracker <IView>(subscribableRouter); _sceneRoots = new ObservableList <ISceneNodeComponent>(); SceneRoots = new ReadOnlyObservableList <ISceneNodeComponent>(_sceneRoots); subscribableRouter.Add <ICompositionMessage <ISceneNodeComponent> >(Interpret); subscribableRouter.Add <IDecompositionMessage <ISceneNodeComponent> >(Interpret); }
public MessagingSpace(ISubscribableRouter router, Func <T, TopLeftRectangle> getBox, IPartitioner partitioner = null) : this(router, x => getBox(x).Center, getBox, partitioner) { }
public MessagingSpace(ISubscribableRouter router, Func <T, Vector2> getPoint, IPartitioner partitioner = null) : this(router, getPoint, x => new CenteredRectangle(getPoint(x), 0, 0), partitioner) { }