Commit 798bc184 authored by Chae Ho Shin's avatar Chae Ho Shin

Merge remote-tracking branch 'origin/collision-model' into collision-model

# Conflicts:
#	ProjectSettings/EditorBuildSettings.asset
parents 5de2a416 37c6f888
This diff is collapsed.
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement;
public class LevelManager : MonoBehaviour public class LevelManager : MonoBehaviour
{ {
...@@ -59,11 +60,12 @@ public class LevelManager : MonoBehaviour ...@@ -59,11 +60,12 @@ public class LevelManager : MonoBehaviour
protected virtual void OnWin() protected virtual void OnWin()
{ {
uiManager.WinTextOn(); uiManager.WinTextOn();
GoToSelectTime(3.0f);
} }
protected virtual void OnLose() protected virtual void OnLose()
{ {
GoToSelectTime(3.0f);
} }
protected virtual bool LoseCondition() protected virtual bool LoseCondition()
...@@ -96,4 +98,15 @@ public class LevelManager : MonoBehaviour ...@@ -96,4 +98,15 @@ public class LevelManager : MonoBehaviour
{ {
return (a.x - b.x) * (a.x - b.x) + (a.z - b.z) * (a.z - b.z); return (a.x - b.x) * (a.x - b.x) + (a.z - b.z) * (a.z - b.z);
} }
public void GoToSelectTime(float time)
{
Invoke("GoToSelect", time);
}
public void GoToSelect()
{
SceneManager.LoadScene("level select");
}
} }
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class SelectManager : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void Tutorial1()
{
SceneManager.LoadScene("Tutorial1");
}
public void Tutorial2()
{
SceneManager.LoadScene("Tutorial2");
}
public void ClockLevel()
{
SceneManager.LoadScene("ClockLevel");
}
public void LaserLevel()
{
SceneManager.LoadScene("LaserLevel");
}
}
fileFormatVersion: 2
guid: 96c5efcc6eb4ba34fbbba782b8ce6cef
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
...@@ -17,4 +17,19 @@ EditorBuildSettings: ...@@ -17,4 +17,19 @@ EditorBuildSettings:
- enabled: 0 - enabled: 0
path: Assets/Scenes/Tutorial2.unity path: Assets/Scenes/Tutorial2.unity
guid: 75d221baaab6fff42966b5c132c589be guid: 75d221baaab6fff42966b5c132c589be
- enabled: 1
path: Assets/Scenes/level select.unity
guid: ac215a62b362fed4c96e1b743e6129d6
- enabled: 1
path: Assets/Scenes/Tutorial1.unity
guid: 12692d9cab42fcb40b798b950551a49f
- enabled: 1
path: Assets/Scenes/Tutorial2.unity
guid: 75d221baaab6fff42966b5c132c589be
- enabled: 1
path: Assets/Scenes/ClockLevel.unity
guid: 09fd81914134c4f4a823ec2102b1bbfb
- enabled: 1
path: Assets/Scenes/LaserLevel.unity
guid: 17819fa3b8a4bc74a86a04ff0afd313c
m_configObjects: {} m_configObjects: {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment