Created
July 2, 2020 19:24
-
-
Save kurtkaiser/e7030be8fa3842d6b00a80793a84d0a1 to your computer and use it in GitHub Desktop.
Dungeon Crawl RPG - game made for a video tutorial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class DoorToLevel1Script : MonoBehaviour | |
{ | |
public GameManager gameManager; | |
private void OnTriggerEnter2D(Collider2D collision) | |
{ | |
if (collision.gameObject.CompareTag("Player")) | |
{ | |
gameManager.LoadLevel(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment