Skip to content
Snippets Groups Projects

Ruud1

Merged Robin Ruud Kristensen requested to merge ruud1 into main
6 files
+ 769
17
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -11,14 +11,15 @@ namespace BigSock.Interact {
public Sprite newSprite;
private GameObject[] enemies;
private GameObject player;
private GameObject cameraPlayer;
private int i = TilemapGenerator.NextRoom();
private GameObject boundary;
private GameObject cameraPlayer;
private int i = TilemapGenerator.NextRoom();
private GameObject boundary;
public string InteractionPrompt => _prompt;
public string InteractionPrompt => _prompt;
public bool Interact(Interactor interactor) {
enemies = GameObject.FindGameObjectsWithTag((i - 1).ToString());
public bool Interact(Interactor interactor) {
if(i > 0)enemies = GameObject.FindGameObjectsWithTag((i - 1).ToString());
else if (i > 0) enemies = GameObject.FindGameObjectsWithTag((0).ToString());
if (enemies.Length == 0)
{
Debug.Log("Opening door!");
Loading