Skip to content

Commit d3e2620

Browse files
committed
Nuget 0.3.0 Release
1 parent c3facae commit d3e2620

32 files changed

+2008
-170
lines changed

LDtkMonogame.Examples/Source/LDtkExample.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ private void DebugRendering()
297297
}
298298
}
299299

300+
#if DEBUG
300301
if (showEntityColliders)
301302
{
302303
for (int i = 0; i < doors.Length; i++)
@@ -316,6 +317,7 @@ private void DebugRendering()
316317

317318
spriteBatch.DrawRect(player.collider, player.editorVisualColor);
318319
}
320+
#endif
319321
}
320322
}
321323
}

LDtkMonogame/Icon.bmp

-4 MB
Binary file not shown.

LDtkMonogame/Icon.png

5.18 KB
Loading

LDtkMonogame/LDtkMonogame.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1717
<RepositoryUrl>https://github.com/IrishBruse/LDtkMonogame</RepositoryUrl>
1818
<PackageTags>LDtk, Monogame, Level Editor</PackageTags>
19-
<PackageIcon>Icon.bmp</PackageIcon>
19+
<PackageIcon>Icon.png</PackageIcon>
2020
<RepositoryType>git</RepositoryType>
2121
<PackageReleaseNotes>Changes on wiki</PackageReleaseNotes>
2222
<RootNamespace>LDtk</RootNamespace>
@@ -31,7 +31,7 @@
3131
</ItemGroup>
3232

3333
<ItemGroup>
34-
<EmbeddedResource Include="Icon.bmp">
34+
<EmbeddedResource Include="Icon.png">
3535
<Pack>True</Pack>
3636
<PackagePath></PackagePath>
3737
</EmbeddedResource>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Version 0.0.1
2+
3+
## Added
4+
- `Project` Class
5+
- Added basic level rendering
6+
- `Level` Class
7+
8+
## Changed
9+
- n/a
10+
11+
## Removed
12+
- n/a
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Version 0.1.0
2+
3+
## Added
4+
- `Project` Class
5+
- Added `Reload` method
6+
- `Background` Class
7+
8+
## Changed
9+
- `Level` Class
10+
- layers -> Layers
11+
12+
## Removed
13+
- n/a
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Version 0.1.1
2+
3+
## Added
4+
- `Project` Class
5+
- Added `Reload` method
6+
- `Background` Class
7+
8+
## Changed
9+
- `Level` Class
10+
- layers -> Layers
11+
12+
## Removed
13+
- n/a
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Version 0.2.0
2+
3+
## Added
4+
- `IntGrid` Class
5+
- Entities
6+
- ISprite Interface
7+
8+
## Changed
9+
- Moved Json loading to `LDtk.Json` Namespace
10+
- `Const` to `Enum` Class
11+
- `Project` to `World` class
12+
13+
## Removed
14+
- `Background` Class
15+
- `LDtk.Internal` Namespace
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Version 0.3.0
2+
3+
## Added
4+
- n/a
5+
6+
## Changed
7+
- n/a
8+
9+
## Removed
10+
- n/a
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Quick Start Guide
2+
The easiest way to start using LDtkMonogame is to import it into the project using
3+
4+
<a href="https://www.nuget.org/packages/LDtkMonogame/"><img src="https://img.shields.io/nuget/v/LDtkMonogame?" /></a>
5+
6+
Make sure to import the namespace at the top
7+
```csharp
8+
using LDtk;
9+
```
10+
11+
To get started loading ldtk files create a
12+
```csharp
13+
World world = new World(spriteBatch,"Assets/MyProject.ldtk");
14+
```
15+
16+
Now to load the level
17+
```csharp
18+
Level startLevel = world.GetLevel("Level1");
19+
```
20+
21+
Now to load the entities
22+
```csharp
23+
Entity[] diamonds = startLevel.GetEntities<Entity>("Diamond");
24+
```
25+
26+
Now to render the level and entities we loaded in `Draw`
27+
```csharp
28+
spriteBatch.Begin(samplerState: SamplerState.PointClamp);
29+
{
30+
for(int i = 0; i < startLevel.Layers.Length; i++)
31+
{
32+
spriteBatch.Draw(startLevel.Layers[i], startLevel.WorldPosition, Color.White);
33+
}
34+
35+
for (int i = 0; i < entities.Count; i++)
36+
{
37+
spriteBatch.Draw(diamonds[i].texture, diamonds[i].position, diamonds.size,
38+
Color.White, 0, diamonds[i].pivot * diamonds[i].size, 1, SpriteEffects.None, 0);
39+
}
40+
}
41+
spriteBatch.End();
42+
```

0 commit comments

Comments
 (0)