jump-game/Jump Game/Assets/Scripts/World/Winner.cs

16 lines
330 B
C#
Raw Normal View History

2020-04-29 21:04:48 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class Winner : MonoBehaviour
{
void OnCollisionEnter2D(Collision2D collision)
{
if (collision.gameObject.tag == "Player")
{
SceneManager.LoadScene(3);
}
}
}