Current progress (working build i think)
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Scampz.GameJam.Assets.Scripts
|
||||
@@ -9,17 +7,13 @@ namespace Scampz.GameJam.Assets.Scripts
|
||||
{
|
||||
public static TerrainType Find()
|
||||
{
|
||||
var sceneCount = SceneManager.sceneCount;
|
||||
var scenes = new List<Scene>();
|
||||
var scene = SceneManager.GetActiveScene();
|
||||
|
||||
for (var i = 0; i < sceneCount; ++i)
|
||||
scenes.Add(SceneManager.GetSceneAt(i));
|
||||
|
||||
if (scenes.Any(x => x.name.Contains("Temple")))
|
||||
if (scene.name.Equals("Temple"))
|
||||
return TerrainType.Temple;
|
||||
if (scenes.Any(x => x.name.Contains("Grass")))
|
||||
if (scene.name.Equals("WorldMap"))
|
||||
return TerrainType.Grass;
|
||||
if (scenes.Any(x => x.name.Contains("Sand")))
|
||||
if (scene.name.Equals("Mountain") || scene.name.Equals("Airship"))
|
||||
return TerrainType.Sand;
|
||||
|
||||
return TerrainType.Temple;
|
||||
|
||||
Reference in New Issue
Block a user