scene change hole
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class DropletMovement : MonoBehaviour
|
||||
{
|
||||
@@ -97,7 +98,8 @@ public class DropletMovement : MonoBehaviour
|
||||
//Hole
|
||||
if (other.CompareTag("Hole"))
|
||||
{
|
||||
//Destroy(gameObject);
|
||||
SceneManager.LoadScene(2, LoadSceneMode.Single);
|
||||
Destroy(gameObject);
|
||||
Debug.Log("Fell in hole!");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
|
||||
public class SceneController : MonoBehaviour
|
||||
{
|
||||
@@ -9,6 +9,7 @@ public class SceneController : MonoBehaviour
|
||||
private void OggerEnter2D(Collider2D collision)
|
||||
{
|
||||
Debug.Log("Hole");
|
||||
SceneManager.LoadScene(sceneIndex, LoadSceneMode.Single);
|
||||
// Destroy(collision.gameObject);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user