hole, scene management

This commit is contained in:
orsolya-st
2026-06-06 15:19:13 +02:00
parent 21e49157ab
commit 8cb4fd5d93
2 changed files with 19 additions and 8 deletions
+13
View File
@@ -11,6 +11,7 @@ GameObject:
- component: {fileID: 7329357223832181834} - component: {fileID: 7329357223832181834}
- component: {fileID: 1230242963583950091} - component: {fileID: 1230242963583950091}
- component: {fileID: 9204716000211697423} - component: {fileID: 9204716000211697423}
- component: {fileID: -7265910902094411698}
m_Layer: 0 m_Layer: 0
m_Name: Hole m_Name: Hole
m_TagString: Hole m_TagString: Hole
@@ -129,3 +130,15 @@ CapsuleCollider2D:
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
m_Size: {x: 0.8, y: 0.8} m_Size: {x: 0.8, y: 0.8}
m_Direction: 0 m_Direction: 0
--- !u!114 &-7265910902094411698
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3028864304894384228}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bbf8ab4673d6bf447aab098a12320431, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::SceneController
+6 -8
View File
@@ -1,16 +1,14 @@
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneController : MonoBehaviour public class SceneController : MonoBehaviour
{ {
// Start is called once before the first execution of Update after the MonoBehaviour is created // Start is called once before the first execution of Update after the MonoBehaviour is created
void Start() public int sceneIndex;
{
}
// Update is called once per frame private void OggerEnter2D(Collider2D collision)
void Update()
{ {
Debug.Log("Hole");
SceneManager.LoadScene(sceneIndex, LoadSceneMode.Single);
} }
} }