public void activate() { //Checks to see if the player is in the room with the enemy (will make this more industrial later) if (!SpawnedOnce && !doorBlock) { //block player path doors.blockPath(); // set door block and room activation doorBlock = true; SpawnedOnce = true; //Spawn the boss GetComponent <Boss_EnablePathing>().spawnBoss(); } }
public void activate() { if (!SpawnedOnce && !doorBlock) { this.gameObject.GetComponent <BoxCollider2D>().enabled = false; //block player path doors.blockPath(); // Activate spawner spawner.GetComponent <Spawner>().spawnEnemies(); // set door block and room activation doorBlock = true; SpawnedOnce = true; //Spawn the boss try { GetComponent <Boss_EnablePathing>().spawnBoss(); } catch (Exception e) { print(e.Message); } } }