mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-25 08:22:15 +00:00
changed the tools versions in the project files to be compatible with xamrain studio
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 676 KiB |
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
|
||||
|
||||
@@ -5,8 +5,6 @@ namespace MonoGame.Extended.Graphics
|
||||
{
|
||||
public sealed class TiledMapLayerAnimatedModel : TiledMapLayerModel
|
||||
{
|
||||
public TiledMapTilesetAnimatedTile[] AnimatedTilesetTiles { get; }
|
||||
|
||||
internal TiledMapLayerAnimatedModel(ContentReader reader, TiledMap map)
|
||||
: base(reader, true)
|
||||
{
|
||||
@@ -22,5 +20,7 @@ namespace MonoGame.Extended.Graphics
|
||||
AnimatedTilesetTiles[i] = tileset.GetAnimatedTilesetTileByLocalTileIdentifier(tileLocalIdentifier);
|
||||
}
|
||||
}
|
||||
|
||||
public TiledMapTilesetAnimatedTile[] AnimatedTilesetTiles { get; }
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Content;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -10,38 +8,14 @@ namespace MonoGame.Extended.Tiled
|
||||
{
|
||||
public class TiledMapTileset
|
||||
{
|
||||
private readonly List<TiledMapTilesetTile> _tiles;
|
||||
// ReSharper disable once InconsistentNaming
|
||||
internal readonly List<TiledMapTilesetAnimatedTile> _animatedTiles;
|
||||
private readonly Dictionary<int, TiledMapTilesetAnimatedTile> _animatedTilesByLocalTileIdentifier;
|
||||
|
||||
public string Name => Texture.Name;
|
||||
public Texture2D Texture { get; }
|
||||
public int FirstGlobalIdentifier { get; }
|
||||
public int TileWidth { get; }
|
||||
public int TileHeight { get; }
|
||||
public int Spacing { get; }
|
||||
public int Margin { get; }
|
||||
public int TileCount { get; }
|
||||
public int Columns { get; }
|
||||
public IReadOnlyList<TiledMapTilesetTile> Tiles { get; private set; }
|
||||
public IReadOnlyList<TiledMapTilesetAnimatedTile> AnimatedTiles { get; private set; }
|
||||
public TiledMapProperties Properties { get; private set; }
|
||||
|
||||
private TiledMapTileset()
|
||||
{
|
||||
Properties = new TiledMapProperties();
|
||||
_tiles = new List<TiledMapTilesetTile>();
|
||||
_animatedTiles = new List<TiledMapTilesetAnimatedTile>();
|
||||
Tiles = new ReadOnlyCollection<TiledMapTilesetTile>(_tiles);
|
||||
AnimatedTiles = new ReadOnlyCollection<TiledMapTilesetAnimatedTile>(_animatedTiles);
|
||||
_animatedTilesByLocalTileIdentifier = new Dictionary<int, TiledMapTilesetAnimatedTile>();
|
||||
}
|
||||
|
||||
internal TiledMapTileset(ContentReader input)
|
||||
: this()
|
||||
{
|
||||
var textureAssetName = input.GetRelativeAssetName(input.ReadString());
|
||||
var animatedTiles = new List<TiledMapTilesetAnimatedTile>();
|
||||
var tiles = new List<TiledMapTilesetTile>();
|
||||
|
||||
_animatedTilesByLocalTileIdentifier = new Dictionary<int, TiledMapTilesetAnimatedTile>();
|
||||
|
||||
Texture = input.ContentManager.Load<Texture2D>(textureAssetName);
|
||||
FirstGlobalIdentifier = input.ReadInt32();
|
||||
TileWidth = input.ReadInt32();
|
||||
@@ -50,6 +24,7 @@ namespace MonoGame.Extended.Tiled
|
||||
Spacing = input.ReadInt32();
|
||||
Margin = input.ReadInt32();
|
||||
Columns = input.ReadInt32();
|
||||
Properties = new TiledMapProperties();
|
||||
|
||||
var explicitTileCount = input.ReadInt32();
|
||||
|
||||
@@ -67,19 +42,37 @@ namespace MonoGame.Extended.Tiled
|
||||
else
|
||||
{
|
||||
var animatedTilesetTile = new TiledMapTilesetAnimatedTile(this, input, localTileIdentifier, animationFramesCount);
|
||||
_animatedTiles.Add(animatedTilesetTile);
|
||||
animatedTiles.Add(animatedTilesetTile);
|
||||
_animatedTilesByLocalTileIdentifier.Add(localTileIdentifier, animatedTilesetTile);
|
||||
tilesetTile = animatedTilesetTile;
|
||||
}
|
||||
|
||||
_tiles.Add(tilesetTile);
|
||||
tiles.Add(tilesetTile);
|
||||
|
||||
input.ReadTiledMapProperties(tilesetTile.Properties);
|
||||
}
|
||||
|
||||
input.ReadTiledMapProperties(Properties);
|
||||
|
||||
Tiles = tiles;
|
||||
AnimatedTiles = animatedTiles;
|
||||
}
|
||||
|
||||
private readonly Dictionary<int, TiledMapTilesetAnimatedTile> _animatedTilesByLocalTileIdentifier;
|
||||
|
||||
public string Name => Texture.Name;
|
||||
public Texture2D Texture { get; }
|
||||
public int FirstGlobalIdentifier { get; }
|
||||
public int TileWidth { get; }
|
||||
public int TileHeight { get; }
|
||||
public int Spacing { get; }
|
||||
public int Margin { get; }
|
||||
public int TileCount { get; }
|
||||
public int Columns { get; }
|
||||
public IReadOnlyList<TiledMapTilesetTile> Tiles { get; }
|
||||
public IReadOnlyList<TiledMapTilesetAnimatedTile> AnimatedTiles { get; }
|
||||
public TiledMapProperties Properties { get; }
|
||||
|
||||
public Rectangle GetTileRegion(int localTileIdentifier)
|
||||
{
|
||||
return TiledMapHelper.GetTileSourceRectangle(localTileIdentifier, TileWidth, TileHeight, Columns, Margin, Spacing);
|
||||
@@ -94,7 +87,7 @@ namespace MonoGame.Extended.Tiled
|
||||
|
||||
public bool ContainsGlobalIdentifier(int globalIdentifier)
|
||||
{
|
||||
return (globalIdentifier >= FirstGlobalIdentifier) && (globalIdentifier < FirstGlobalIdentifier + TileCount);
|
||||
return globalIdentifier >= FirstGlobalIdentifier && globalIdentifier < FirstGlobalIdentifier + TileCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,13 +2,13 @@
|
||||
{
|
||||
public class TiledMapTilesetTile
|
||||
{
|
||||
public int LocalTileIdentifier { get; set; }
|
||||
public TiledMapProperties Properties { get; private set; }
|
||||
|
||||
internal TiledMapTilesetTile(int localTileIdentifier)
|
||||
{
|
||||
LocalTileIdentifier = localTileIdentifier;
|
||||
Properties = new TiledMapProperties();
|
||||
}
|
||||
|
||||
public int LocalTileIdentifier { get; set; }
|
||||
public TiledMapProperties Properties { get; private set; }
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -18,6 +18,6 @@ There's also a few other NuGet packages available including:
|
||||
- MonoGame.Extended.Graphics
|
||||
- MonoGame.Extended.Gui
|
||||
- MonoGame.Extended.NuclexGui
|
||||
- MonoGame.Particles
|
||||
- MonoGame.Entities
|
||||
- MonoGame.Extended.Particles
|
||||
- MonoGame.Extended.Entities
|
||||
- and more to come...
|
||||
|
||||
Reference in New Issue
Block a user