Skip to content

Commit

Permalink
Fix side spikes
Browse files Browse the repository at this point in the history
  • Loading branch information
nfaltermeier committed Mar 13, 2021
1 parent 798a40d commit 179e24a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Engine/Actors/TilemapRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ protected override void Start()
{
for (int y = 0; y < tilemap.GetLength(1); y++)
{
if (tilemap[x, y] == (byte)Tiles.Wall || tilemap[x, y] == (byte)Tiles.UpSpike)
if (tilemap[x, y] == (byte)Tiles.Wall || tilemap[x, y] == (byte)Tiles.UpSpike || tilemap[x, y] == (byte)Tiles.DownSpike ||
tilemap[x, y] == (byte)Tiles.LeftSpike || tilemap[x, y] == (byte)Tiles.RightSpike)
{
Body b = MainGame.Instance.World.CreateRectangle(colliderSize, colliderSize, 20, GetPositionOfTile(x, y) / MainGame.PhysicsScale);
foreach (Fixture f in b.FixtureList)
Expand Down

0 comments on commit 179e24a

Please sign in to comment.