Example #1
0
        public static bool IntersectsWithTile(Engine.ICollisionable collisionAble1, Engine.World world, int tileX, int tileY, out int maxY)
        {
            Engine.TileData data = world.Level.getTile(tileX, tileY);
            Tile            tile = world.Level.TileSet[data.ID];
            Rectangle       rect = tile.CollisionArea, coll = collisionAble1.CollisionArea;

            rect.Offset(tileX * Tile.STANDARD_GTILE_WIDTH, tileY * Tile.STANDARD_GTILE_HEIGHT);

            return(IntersectPixels(coll, collisionAble1.Mask, rect, tile.Mask, false, data.Flipped, out maxY));
        }
Example #2
0
        public RenderManager(Engine.World world, ushort layers, ushort entityLayer)
        {
            this.world       = world;
            this.layers      = new List <MapLayer>();
            this.entityLayer = entityLayer;

            for (int i = 0; i < layers; i++)
            {
                this.layers.Add(new MapLayer(world, null, (float)i / (float)layers));
            }
        }
Example #3
0
 public MapLayer(Engine.World world, TileMap map, float depth, bool autoscroll = true)
     : base(world.Game.GraphicsDevice)
 {
     this.world      = world;
     this.depth      = depth;
     this.xspeed     = 1f;
     this.yspeed     = 1f;
     this.widthWrap  = false;
     this.heightWrap = false;
     this.map        = map;
     this.autoX      = 0f;
     this.autoY      = 0f;
     this.scrollX    = 0f;
     this.scrollY    = 0f;
     this.autoscroll = autoscroll;
     extraTransform  = Matrix.Identity;
 }
Example #4
0
        private void BuildEngine(ConnectingStaticData sData)
        {
            var world = new Engine.World(sData.Arena);

            engine = new Engine.Engine(world);
        }