Skip to content

Commit 5252e3e

Browse files
committed
Rename Renderer
1 parent d01cc57 commit 5252e3e

File tree

19 files changed

+91
-91
lines changed

19 files changed

+91
-91
lines changed

LDtk.Example/Entities/BulletEntity.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace LDtkMonogameExample.Entities;
88
using Microsoft.Xna.Framework;
99
using Microsoft.Xna.Framework.Graphics;
1010

11-
public class BulletEntity(Texture2D texture, LDtkRenderer renderer)
11+
public class BulletEntity(Texture2D texture, ExampleRenderer renderer)
1212
{
1313
public Vector2 Position { get; set; }
1414

@@ -19,7 +19,7 @@ public class BulletEntity(Texture2D texture, LDtkRenderer renderer)
1919
public Box Collider { get; set; } = new Box(Vector2.Zero, new Vector2(8, 8), new Vector2(0, -.5f));
2020

2121
readonly Texture2D texture = texture;
22-
readonly LDtkRenderer renderer = renderer;
22+
readonly ExampleRenderer renderer = renderer;
2323

2424
public void Update(float deltaTime)
2525
{

LDtk.Example/Entities/EnemyEntity.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ namespace LDtkMonogameExample.Entities;
1212
using Microsoft.Xna.Framework;
1313
using Microsoft.Xna.Framework.Graphics;
1414

15-
public class EnemyEntity(Enemy data, Texture2D texture, LDtkRenderer renderer)
15+
public class EnemyEntity(Enemy data, Texture2D texture, ExampleRenderer renderer)
1616
{
1717
readonly Enemy data = data;
1818
readonly Texture2D texture = texture;
19-
readonly LDtkRenderer renderer = renderer;
19+
readonly ExampleRenderer renderer = renderer;
2020
bool flip;
2121
int nextWander;
2222
bool dead;

LDtk.Example/Entities/GunEntity.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace LDtkMonogameExample.Entities;
1212
using Microsoft.Xna.Framework;
1313
using Microsoft.Xna.Framework.Graphics;
1414

15-
public class GunEntity(Gun_Pickup data, Texture2D texture, LDtkRenderer renderer)
15+
public class GunEntity(Gun_Pickup data, Texture2D texture, ExampleRenderer renderer)
1616
{
1717
public Vector2 Position
1818
{
@@ -26,7 +26,7 @@ public Vector2 Position
2626

2727
readonly Gun_Pickup data = data;
2828
readonly Texture2D texture = texture;
29-
readonly LDtkRenderer renderer = renderer;
29+
readonly ExampleRenderer renderer = renderer;
3030

3131
public void Update(float totalTime)
3232
{

LDtk.Example/Entities/PlayerEntity.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public Vector2 Position
3232
readonly Box collider;
3333
readonly Player data;
3434
readonly Texture2D texture;
35-
readonly LDtkRenderer renderer;
35+
readonly ExampleRenderer renderer;
3636
Vector2 velocity;
3737
List<Box> tiles;
3838
bool grounded;
@@ -43,7 +43,7 @@ public Vector2 Position
4343
float startTime;
4444
bool shoot;
4545

46-
public PlayerEntity(Player player, Texture2D texture, LDtkRenderer renderer, GunEntity gun)
46+
public PlayerEntity(Player player, Texture2D texture, ExampleRenderer renderer, GunEntity gun)
4747
{
4848
data = player;
4949
this.texture = texture;

LDtk.Example/Entry.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class Entry : Game
2020

2121
LDtkFile file;
2222
LDtkWorld world;
23-
LDtkRenderer renderer;
23+
ExampleRenderer renderer;
2424
readonly List<EnemyEntity> enemies = [];
2525
readonly List<BulletEntity> bullets = [];
2626
PlayerEntity player;
@@ -77,12 +77,12 @@ protected override void Initialize()
7777

7878
camera = new Camera(GraphicsDevice);
7979

80-
// renderer = new LDtkRenderer(spriteBatch, Content);
80+
// renderer = new ExampleRenderer(spriteBatch, Content);
8181
// file = LDtkFile.FromFile("Test/World", Content);
8282
// spriteSheet = Content.Load<Texture2D>("Characters");
8383

8484
// None ContentManager version
85-
renderer = new LDtkRenderer(spriteBatch);
85+
renderer = new ExampleRenderer(spriteBatch);
8686
file = LDtkFile.FromFile("Content/Test/World.ldtk");
8787
spriteSheet = Texture2D.FromFile(GraphicsDevice, System.IO.Path.Combine(System.IO.Path.GetDirectoryName(file.FilePath), "../Characters.png"));
8888

LDtk.LevelViewer/Entry.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class Entry : Game
1515

1616
LDtkFile file;
1717
LDtkWorld world;
18-
LDtkRenderer renderer;
18+
ExampleRenderer renderer;
1919

2020
// Monogame Stuff
2121

@@ -59,7 +59,7 @@ protected override void Initialize()
5959
{
6060
MonogameInitialize();
6161

62-
renderer = new LDtkRenderer(spriteBatch);
62+
renderer = new ExampleRenderer(spriteBatch);
6363
file = LDtkFile.FromFile("c:/Users/Econn/AppData/Local/Programs/ldtk/extraFiles/samples/Typical_2D_platformer_example.ldtk");
6464

6565
world = file.LoadSingleWorld();

LDtk/Renderer/LDtkRenderer.cs renamed to LDtk/Renderer/ExampleRenderer.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace LDtk.Renderer;
1616
/// This can all be done in your own class if you want to reimplement it and customize it differently
1717
/// this one is mostly here to get you up and running quickly.
1818
/// </summary>
19-
public class LDtkRenderer : IDisposable
19+
public class ExampleRenderer : IDisposable
2020
{
2121
/// <summary> Gets or sets the spritebatch used for rendering with this Renderer. </summary>
2222
public SpriteBatch SpriteBatch { get; set; }
@@ -32,9 +32,9 @@ public class LDtkRenderer : IDisposable
3232
readonly GraphicsDevice graphicsDevice;
3333
readonly ContentManager? content;
3434

35-
/// <summary> Initializes a new instance of the <see cref="LDtkRenderer"/> class. This is used to intizialize the renderer for use with direct file loading. </summary>
35+
/// <summary> Initializes a new instance of the <see cref="ExampleRenderer"/> class. This is used to intizialize the renderer for use with direct file loading. </summary>
3636
/// <param name="spriteBatch">Spritebatch</param>
37-
public LDtkRenderer(SpriteBatch spriteBatch)
37+
public ExampleRenderer(SpriteBatch spriteBatch)
3838
{
3939
SpriteBatch = spriteBatch;
4040
graphicsDevice = spriteBatch.GraphicsDevice;
@@ -58,10 +58,10 @@ public LDtkRenderer(SpriteBatch spriteBatch)
5858
}
5959
}
6060

61-
/// <summary> Initializes a new instance of the <see cref="LDtkRenderer"/> class. This is used to intizialize the renderer for use with content Pipeline. </summary>
61+
/// <summary> Initializes a new instance of the <see cref="ExampleRenderer"/> class. This is used to intizialize the renderer for use with content Pipeline. </summary>
6262
/// <param name="spriteBatch">SpriteBatch</param>
6363
/// <param name="content">Optional ContentManager</param>
64-
public LDtkRenderer(SpriteBatch spriteBatch, ContentManager content)
64+
public ExampleRenderer(SpriteBatch spriteBatch, ContentManager content)
6565
: this(spriteBatch)
6666
{
6767
this.content = content;

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ using LDtk.Renderer;
2626
```
2727

2828
LDtk.Renderer is a premade renderer for the levels, you can create your own if you have more specific needs
29-
[LDtkRenderer.cs](https://github.com/IrishBruse/LDtkMonogame/blob/main/LDtk/Renderer/LDtkRenderer.cs)
29+
[ExampleRenderer.cs](https://github.com/IrishBruse/LDtkMonogame/blob/main/LDtk/Renderer/ExampleRenderer.cs)
3030
is an example of how to make one. Or you can inherit it and extend it.
3131

3232
To get started loading ldtk files load the file in `Initialize`.
@@ -48,8 +48,8 @@ It is a class within in a class that represents the world name and the levels na
4848
Create the renderer in `Initialize`.
4949

5050
```cs
51-
LDtkRenderer renderer = new LDtkRenderer(spriteBatch, Content);
52-
LDtkRenderer renderer = new LDtkRenderer(spriteBatch);
51+
ExampleRenderer renderer = new ExampleRenderer(spriteBatch, Content);
52+
ExampleRenderer renderer = new ExampleRenderer(spriteBatch);
5353
```
5454

5555
Prerender Levels
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
# LDtkRenderer Constructors
1+
# ExampleRenderer Constructors
22

33
[Home](../../../../README.md)
44

5-
**Containing Type**: [LDtkRenderer](../README.md)
5+
**Containing Type**: [ExampleRenderer](../README.md)
66

77
**Assembly**: LDtkMonogame\.dll
88

99
## Overloads
1010

11-
| Constructor | Summary |
12-
| ----------- | ------- |
13-
| [LDtkRenderer(SpriteBatch, ContentManager)](#2642043051) | Initializes a new instance of the [LDtkRenderer](../README.md) class\. This is used to intizialize the renderer for use with content Pipeline\. |
14-
| [LDtkRenderer(SpriteBatch)](#3898746929) | Initializes a new instance of the [LDtkRenderer](../README.md) class\. This is used to intizialize the renderer for use with direct file loading\. |
11+
| Constructor | Summary |
12+
| ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
13+
| [ExampleRenderer(SpriteBatch, ContentManager)](#2642043051) | Initializes a new instance of the [ExampleRenderer](../README.md) class\. This is used to intizialize the renderer for use with content Pipeline\. |
14+
| [ExampleRenderer(SpriteBatch)](#3898746929) | Initializes a new instance of the [ExampleRenderer](../README.md) class\. This is used to intizialize the renderer for use with direct file loading\. |
1515

1616
<a id="2642043051"></a>
1717

18-
## LDtkRenderer\(SpriteBatch, ContentManager\)
18+
## ExampleRenderer\(SpriteBatch, ContentManager\)
1919

2020

21-
Initializes a new instance of the [LDtkRenderer](../README.md) class\. This is used to intizialize the renderer for use with content Pipeline\.
21+
Initializes a new instance of the [ExampleRenderer](../README.md) class\. This is used to intizialize the renderer for use with content Pipeline\.
2222

2323
```csharp
24-
public LDtkRenderer(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch, Microsoft.Xna.Framework.Content.ContentManager content)
24+
public ExampleRenderer(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch, Microsoft.Xna.Framework.Content.ContentManager content)
2525
```
2626

2727
### Parameters
@@ -34,17 +34,17 @@ SpriteBatch
3434

3535
Optional ContentManager<a id="3898746929"></a>
3636

37-
## LDtkRenderer\(SpriteBatch\)
37+
## ExampleRenderer\(SpriteBatch\)
3838

3939

40-
Initializes a new instance of the [LDtkRenderer](../README.md) class\. This is used to intizialize the renderer for use with direct file loading\.
40+
Initializes a new instance of the [ExampleRenderer](../README.md) class\. This is used to intizialize the renderer for use with direct file loading\.
4141

4242
```csharp
43-
public LDtkRenderer(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch)
43+
public ExampleRenderer(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch)
4444
```
4545

4646
### Parameters
4747

4848
**spriteBatch** &ensp; [SpriteBatch](https://docs.microsoft.com/en-us/dotnet/api/microsoft.xna.framework.graphics.spritebatch)
4949

50-
Spritebatch
50+
Spritebatch

docs/Api/LDtk/Renderer/LDtkRenderer/Dispose/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# LDtkRenderer\.Dispose\(\) Method
1+
# ExampleRenderer\.Dispose\(\) Method
22

33
[Home](../../../../README.md)
44

5-
**Containing Type**: [LDtkRenderer](../README.md)
5+
**Containing Type**: [ExampleRenderer](../README.md)
66

77
**Assembly**: LDtkMonogame\.dll
88

0 commit comments

Comments
 (0)