Spawners and Borders

I used box sprites for spawners and borders and hid them using sorting layers.

Borders are basically small boxes with scripts that interact with the player and enemies accordingly.

If the player touches the border the level resets and the player spawns at his last checkpoint.

If an enemy touches the border it dies or in fact I forgot to make it do that. But normally it would. Now it just teleports the enemy to a room that the player can’t see.

This is the script for it:

Capture14

The old spawner was basically a teleporter which teleported the enemies from that room when the player entered the collider area.

Capture13

But I made a new spawner which is much simpler it just spawns the enemy and deletes the spawner.Capture19

 

Leave a comment