Did some doing V+D
This commit is contained in:
19
Assets/AssetsFORELLE/Script/LoadSceneOnCollision.cs
Normal file
19
Assets/AssetsFORELLE/Script/LoadSceneOnCollision.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class LoadSceneOnCollision: MonoBehaviour
|
||||
{
|
||||
public string newGameScene;
|
||||
|
||||
|
||||
void OnTriggerEnter2D(Collider2D other)
|
||||
{
|
||||
if(other.CompareTag("Player")){
|
||||
Debug.Log("SceneLoader: Next Scene");
|
||||
SceneManager.LoadScene(newGameScene);}
|
||||
}
|
||||
|
||||
|
||||
}
|
11
Assets/AssetsFORELLE/Script/LoadSceneOnCollision.cs.meta
generated
Normal file
11
Assets/AssetsFORELLE/Script/LoadSceneOnCollision.cs.meta
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0ca90d16c544e534db98f0e088afac9f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user