17 lines
361 B
C#
17 lines
361 B
C#
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.SceneManagement;
|
|||
|
|
|||
|
public class GameScene : MonoBehaviour
|
|||
|
{
|
|||
|
void OnTriggerEnter2D(Collider2D other)
|
|||
|
{
|
|||
|
if (other.CompareTag("Player"))
|
|||
|
{
|
|||
|
SceneManager.LoadScene("GameScene");
|
|||
|
Debug.Log("You won!");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|