Compare commits

...
8 changed files with 1663 additions and 52 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:
+7 -6
View File
@@ -9,12 +9,13 @@ Material:
m_PrefabAsset: {fileID: 0}
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
+40 -17
View File
@@ -8,12 +8,19 @@ using UnityEngine.SceneManagement;
public class FloorLevel : MonoBehaviour
{
public int escalation;
public int escalation = 1;
public int level = 1;
public GameObject player;
public PlayerController script;
public GameObject[] obstacleList;
private int selection = 0;
private int height = 2;
void Awake()
{
script.respawnTime = Time.time;
}
// Start is called before the first frame update
void Start()
@@ -35,7 +42,8 @@ public class FloorLevel : MonoBehaviour
if(script.finished == true)
{
escalation++;
level++;
if(level > 3) escalation++;
respawn();
levelBuild();
@@ -61,7 +69,7 @@ public class FloorLevel : MonoBehaviour
void respawn()
{
script.transform.position = new Vector3((50*escalation)+100, 2, (50*escalation)+100);
script.transform.position = new Vector3((100*escalation)+50, 2, (100*escalation)+50);
script.transform.Rotate(0.0f, 0.0f, 0.0f, Space.Self);
}
@@ -76,28 +84,43 @@ public class FloorLevel : MonoBehaviour
Destroy(GameObject.FindWithTag("Finish"));
for(int i = 1; i <= escalation; i++){
for(int j = 1; j <= escalation; j++){
selection = Random.Range(2, obstacleList.Length);
Instantiate(obstacleList[selection], new Vector3(50*i, 2, 50*j), Quaternion.identity);
for(int i = 0; i < escalation; i++){
for(int j = 0; j < escalation; j++){
selection = Random.Range(2, obstacleList.Length);
Instantiate(obstacleList[selection], new Vector3(-50*i, 3, -50*j), Quaternion.identity);
if(Random.Range(0, 20) != 0 || (i == (escalation-1) && j == (escalation-1) && i == j))
{
height = Random.Range(0, 7);
selection = Random.Range(2, obstacleList.Length);
Instantiate(obstacleList[selection], new Vector3(100*i+50, height, 100*j+50), Quaternion.identity);
}
selection = Random.Range(2, obstacleList.Length);
Instantiate(obstacleList[selection], new Vector3(-50*i, 4, 50*j), Quaternion.identity);
if(Random.Range(0, 20) != 0 || (i == (escalation-1) && j == (escalation-1) && i == j))
{
height = Random.Range(0, 7);
selection = Random.Range(2, obstacleList.Length);
Instantiate(obstacleList[selection], new Vector3(-100*i-50, height, -100*j-50), Quaternion.identity);
}
selection = Random.Range(2, obstacleList.Length);
Instantiate(obstacleList[selection], new Vector3(50*i, 5, -50*j), Quaternion.identity);
if(Random.Range(0, 10) != 0)
{
height = Random.Range(0, 7);
selection = Random.Range(2, obstacleList.Length);
Instantiate(obstacleList[selection], new Vector3(-100*i-50, height, 100*j+50), Quaternion.identity);
}
if(Random.Range(0, 10) != 0)
{
height = Random.Range(0, 7);
selection = Random.Range(2, obstacleList.Length);
Instantiate(obstacleList[selection], new Vector3(100*i+50, height, -100*j-50), 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);
}
}
Instantiate(obstacleList[0], new Vector3((50*escalation)+100, 0, (50*escalation)+100), Quaternion.identity);
Instantiate(obstacleList[1], new Vector3(-((50*escalation)+100), 0, -((50*escalation)+100)), Quaternion.identity);
Instantiate(obstacleList[0], new Vector3((100*escalation)+50, 0, (100*escalation)+50), Quaternion.identity);
Instantiate(obstacleList[1], new Vector3(-((100*escalation)+50), 0, -((100*escalation)+50)), Quaternion.identity);
script.finished = false;
}
+14 -6
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()
@@ -140,14 +146,14 @@ public class PlayerController : MonoBehaviour
}
}
if(Input.GetButton("Crouch"))
if(Input.GetButton("Crouch") || Input.GetAxis("Crouch") == 1.0f)
{
characterController.height /= 2;
capsule.height /= 2;
transform.localScale = new Vector3(transform.localScale.x, transformHeight/2, transform.localScale.z);
if(Input.GetButtonDown("Crouch"))
if(Input.GetButtonDown("Crouch") || Input.GetAxis("Crouch") == 1.0f)
{
if((Input.GetAxis("Horizontal") != 0 || Input.GetAxis("Vertical") != 0))
{
@@ -191,7 +197,7 @@ public class PlayerController : MonoBehaviour
} else {
slideTime = Time.time;
if(Input.GetButton("Crouch"))
if(Input.GetButton("Crouch") || Input.GetAxis("Crouch") == 1.0f)
{
characterController.height /= 2;
@@ -208,7 +214,7 @@ public class PlayerController : MonoBehaviour
}
//Might want to change move direction value to make triggering this speed up effect easier/harder
if(diving && moveDirection.y > 0.75 && Input.GetButtonDown("Crouch"))
if(diving && moveDirection.y > 0.75 && (Input.GetButtonDown("Crouch") || Input.GetAxis("Crouch") == 1.0f ))
{
dive++;
if(dive == 1){
@@ -262,7 +268,7 @@ public class PlayerController : MonoBehaviour
velocity.x += moveDirection.x;
velocity.z += moveDirection.z;
if((Input.GetAxis("Horizontal") == 0 && Input.GetAxis("Vertical") == 0) || Input.GetButton("Stop")){
if((Input.GetAxis("Horizontal") == 0 && Input.GetAxis("Vertical") == 0) || (Input.GetButton("Stop") || Input.GetAxis("Stop") == 1.0f)){
//Remove or "lower" friction to add an 'ice' effect
velocity.x = Mathf.SmoothDamp(velocity.x, 0.0f, ref xVelocity, friction);
@@ -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)
{
+22 -22
View File
@@ -186,16 +186,16 @@ InputManager:
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton: joystick button 7
positiveButton:
altNegativeButton:
altPositiveButton:
gravity: 1000
dead: 0.001
sensitivity: 1000
snap: 0
gravity: 0
dead: 0.19
sensitivity: 1
snap: 1
invert: 0
type: 0
axis: 0
type: 2
axis: 9
joyNum: 0
- serializedVersion: 3
m_Name: Walk
@@ -218,23 +218,23 @@ InputManager:
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton: joystick button 6
positiveButton:
altNegativeButton:
altPositiveButton:
gravity: 1000
dead: 0.001
sensitivity: 1000
snap: 0
gravity: 0
dead: 0.19
sensitivity: 1
snap: 1
invert: 0
type: 0
axis: 0
type: 2
axis: 8
joyNum: 0
- serializedVersion: 3
m_Name: Jump
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton: joystick button 1
positiveButton: joystick button 0
altNegativeButton:
altPositiveButton:
gravity: 1000
@@ -253,13 +253,13 @@ InputManager:
positiveButton:
altNegativeButton:
altPositiveButton:
gravity: 1000
gravity: 0
dead: 0.25
sensitivity: 0.1
sensitivity: 1
snap: 0
invert: 0
type: 2
axis: 2
axis: 3
joyNum: 0
- serializedVersion: 3
m_Name: Mouse Y
@@ -269,13 +269,13 @@ InputManager:
positiveButton:
altNegativeButton:
altPositiveButton:
gravity: 1000
gravity: 0
dead: 0.25
sensitivity: 0.1
sensitivity: 1
snap: 0
invert: 1
type: 2
axis: 3
axis: 4
joyNum: 0
- serializedVersion: 3
m_Name: Pause
@@ -298,7 +298,7 @@ InputManager:
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton: joystick button 9
positiveButton: joystick button 7
altNegativeButton:
altPositiveButton:
gravity: 1000
+4
View File
@@ -7,6 +7,10 @@ TagManager:
- Environment
- Wall
- Obstacle
- Obstacle Portal
- Waypoint Portal
- Infinite Portal
- Waypoint
layers:
- Default
- TransparentFX