Merge pull request #22 from gjcampbell777/doorway_to_new_scene

Implemented all needed to get a portal working to floor level as well…
This commit is contained in:
Gregory Campbell
2020-01-11 15:56:14 -05:00
committed by GitHub
7 changed files with 1605 additions and 12 deletions
+78
View File
@@ -0,0 +1,78 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Prototype Portal
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 3
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 0
m_Colors:
- _Color: {r: 0.26779994, g: 0.5402736, b: 0.9622642, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5624862376087f240b50f6a8a373bb83
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
+8 -7
View File
@@ -7,14 +7,15 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Prototype checker
m_Name: Prototype Checker
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
@@ -59,19 +60,19 @@ Material:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlend: 10
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _Mode: 3
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
- _ZWrite: 0
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
File diff suppressed because it is too large Load Diff
+9 -4
View File
@@ -8,13 +8,18 @@ using UnityEngine.SceneManagement;
public class FloorLevel : MonoBehaviour
{
public int escalation;
public int escalation = 1;
public GameObject player;
public PlayerController script;
public GameObject[] obstacleList;
private int selection = 0;
void Awake()
{
script.respawnTime = Time.time;
}
// Start is called before the first frame update
void Start()
{
@@ -82,13 +87,13 @@ public class FloorLevel : MonoBehaviour
Instantiate(obstacleList[selection], new Vector3(50*i, 2, 50*j), Quaternion.identity);
selection = Random.Range(2, obstacleList.Length);
Instantiate(obstacleList[selection], new Vector3(-50*i, 3, -50*j), Quaternion.identity);
Instantiate(obstacleList[selection], new Vector3(-50*i, 2, -50*j), Quaternion.identity);
selection = Random.Range(2, obstacleList.Length);
Instantiate(obstacleList[selection], new Vector3(-50*i, 4, 50*j), Quaternion.identity);
Instantiate(obstacleList[selection], new Vector3(-50*i, 2, 50*j), Quaternion.identity);
selection = Random.Range(2, obstacleList.Length);
Instantiate(obstacleList[selection], new Vector3(50*i, 5, -50*j), Quaternion.identity);
Instantiate(obstacleList[selection], new Vector3(50*i, 2, -50*j), Quaternion.identity);
script.transform.position = new Vector3((50*escalation)+100, 2, (50*escalation)+100);
script.transform.Rotate(0.0f, 0.0f, 0.0f, Space.Self);
+9 -1
View File
@@ -45,7 +45,7 @@ public class PlayerController : MonoBehaviour
float slideTime = 0.0f;
float wallRunTime = 0.0f;
float respawnTime = 1.0f;
public float respawnTime = 0.0f;
float oneSec = 1.0f;
float halfSec = 0.5f;
float quarterSec = 0.25f;
@@ -82,6 +82,12 @@ public class PlayerController : MonoBehaviour
respawnTime = Time.time;
}
if(hit.gameObject.tag == "Obstacle Portal")
{
SceneManager.LoadScene("Floor Level", LoadSceneMode.Single);
respawnTime = Time.time;
}
}
void Update()
@@ -290,6 +296,8 @@ public class PlayerController : MonoBehaviour
velocity.z = velocity.z * Mathf.Abs(moveDirection.y);
}
Debug.Log(transform.position);
// Move the controller
if((finished == false || respawn == false) && respawnTime + tenthSec < Time.time)
{
+4
View File
@@ -7,6 +7,10 @@ TagManager:
- Environment
- Wall
- Obstacle
- Obstacle Portal
- Waypoint Portal
- Infinite Portal
- Waypoint
layers:
- Default
- TransparentFX