Add skybox, fix world map, temporarily break level load to demo stuff
This commit is contained in:
28
Assets/Scripts/TerrainTypeFinder.cs
Normal file
28
Assets/Scripts/TerrainTypeFinder.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Scampz.GameJam.Assets.Scripts
|
||||
{
|
||||
public class TerrainTypeFinder : MonoBehaviour
|
||||
{
|
||||
public static TerrainType Find()
|
||||
{
|
||||
var sceneCount = SceneManager.sceneCount;
|
||||
var scenes = new List<Scene>();
|
||||
|
||||
for (var i = 0; i < sceneCount; ++i)
|
||||
scenes.Add(SceneManager.GetSceneAt(i));
|
||||
|
||||
if (scenes.Any(x => x.name.Contains("Temple")))
|
||||
return TerrainType.Temple;
|
||||
if (scenes.Any(x => x.name.Contains("Grass")))
|
||||
return TerrainType.Grass;
|
||||
if (scenes.Any(x => x.name.Contains("Sand")))
|
||||
return TerrainType.Sand;
|
||||
|
||||
return TerrainType.Temple;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user