Skip to content

Instantly share code, notes, and snippets.

@kurtkaiser
Created July 2, 2020 19:24
Show Gist options
  • Save kurtkaiser/e7030be8fa3842d6b00a80793a84d0a1 to your computer and use it in GitHub Desktop.
Save kurtkaiser/e7030be8fa3842d6b00a80793a84d0a1 to your computer and use it in GitHub Desktop.
Dungeon Crawl RPG - game made for a video tutorial
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