コード例 #1
0
 public TiledMapMover(TiledTileLayer startCollisionLayer)
 {
     //this.collisionLayer = collisionLayer;
     this.collisionLayers.Add(startCollisionLayer);
     tiledMap = startCollisionLayer.tiledMap;
     Assert.isNotNull(startCollisionLayer, nameof(startCollisionLayer) + " is required");
 }
コード例 #2
0
ファイル: TiledMap.cs プロジェクト: Hengle/cavesnez
        public TiledTileLayer createTileLayer(string name, int width, int height, TiledTile[] tiles)
        {
            var layer = new TiledTileLayer(this, name, width, height, tiles);

            layers.Add(layer);
            return(layer);
        }
コード例 #3
0
ファイル: TiledMapComponent.cs プロジェクト: RastaCow/Nez
        public TiledMapComponent( TiledMap tiledmap, string collisionLayerName = null )
        {
            this.tiledMap = tiledmap;

            if( collisionLayerName != null )
                collisionLayer = tiledmap.getLayer<TiledTileLayer>( collisionLayerName );
        }
コード例 #4
0
ファイル: TiledMapComponent.cs プロジェクト: prime31/Nez
		public TiledMapComponent( TiledMap tiledMap, string collisionLayerName = null, bool shouldCreateColliders = true )
		{
			this.tiledMap = tiledMap;
			_shouldCreateColliders = shouldCreateColliders;

			if( collisionLayerName != null )
				collisionLayer = tiledMap.getLayer<TiledTileLayer>( collisionLayerName );
		}
コード例 #5
0
        public TiledLayer createTileLayer(string name, int width, int height, TiledTile[] tiles)
        {
            if (orientation == TiledMapOrientation.Orthogonal)
            {
                var layer = new TiledTileLayer(this, name, width, height, tiles);
                layers.Add(layer);
                return(layer);
            }

            if (orientation == TiledMapOrientation.Isometric)
            {
                var layer = new TiledIsometricTiledLayer(this, name, width, height, tiles);
                layers.Add(layer);
                return(layer);
            }

            throw new NotImplementedException();
        }
コード例 #6
0
 public TiledMapMover(TiledTileLayer collisionLayer)
 {
     this.collisionLayer = collisionLayer;
     tiledMap            = collisionLayer.tiledMap;
     Assert.isNotNull(collisionLayer, nameof(collisionLayer) + " is required");
 }
コード例 #7
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="newCollisionLayer"></param>
 public void addCollisionLayer(TiledTileLayer newCollisionLayer)
 {
     collisionLayers.Add(newCollisionLayer);
 }
コード例 #8
0
 public TiledMapMover(TiledTileLayer collisionLayer)
 {
     Insist.IsNotNull(collisionLayer, nameof(collisionLayer) + " is required");
     this.CollisionLayer = collisionLayer;
     TiledMap            = collisionLayer.TiledMap;
 }
コード例 #9
0
ファイル: TiledMapMover.cs プロジェクト: prime31/Nez
		public TiledMapMover( TiledTileLayer collisionLayer )
		{
			this.collisionLayer = collisionLayer;
			tiledMap = collisionLayer.tiledMap;
			Assert.isNotNull( collisionLayer, nameof( collisionLayer ) + " is required" );
		}