Exemplo n.º 1
0
        public void SetMatrixRegion(IMatrixRegion <TSceneObject> matrixRegion)
        {
            this.matrixRegion = matrixRegion;

            UpdateNearbyRegions();
            SubscribeToPositionChanged();
        }
Exemplo n.º 2
0
        public static IEnumerable <IRegion <TSceneObject> > GetRegions <TSceneObject>(
            this IMatrixRegion <TSceneObject> @this,
            ITransform transform)
            where TSceneObject : ISceneObject
        {
            var vertices = Rectangle.GetVertices(
                transform.Position,
                transform.Size);

            return(@this.GetRegions(vertices));
        }
Exemplo n.º 3
0
 public void SetMatrixRegion(IMatrixRegion <IGameObject> region)
 {
     interestArea?.Dispose();
     interestArea?.SetMatrixRegion(region);
 }
Exemplo n.º 4
0
 public Scene(Vector2 worldSize, Vector2 regionSize)
 {
     MatrixRegion =
         new MatrixRegion <TSceneObject>(worldSize, regionSize);
 }