Merge branch 'GameLoading'

This commit is contained in:
2021-11-05 12:46:18 -05:00
13 changed files with 211 additions and 409 deletions

View File

@@ -5,7 +5,7 @@ using UnityEngine;
public class Blink : NetworkBehaviour{
public class Blink : NetworkBehaviour {
// Start is called before the first frame update
@@ -43,7 +43,6 @@ public class Blink : NetworkBehaviour{
//blinks the player forwards
private void BlinkMove()
{
if (!IsLocalPlayer) { return; }
if (Input.GetMouseButton(1))

View File

@@ -4,7 +4,7 @@ using MLAPI;
using UnityEngine;
public class Dash : NetworkBehaviour{
public class Dash : NetworkBehaviour {
public Vector3 moveDirection;
public const float maxDashTime = 1.0f;
@@ -21,8 +21,7 @@ public class Dash : NetworkBehaviour{
//UPDATE CHECK FOR MOVEMENT ONLY WHEN DASHING
void FixedUpdate(){
//if (!IsLocalPlayer) { return; }
if (!IsLocalPlayer) { return; }
if (Input.GetKeyDown(KeyCode.E))
{

View File

@@ -68,8 +68,7 @@ public class WallRun : NetworkBehaviour
public void WallRunRoutine()
{
//if (!IsLocalPlayer) { return; }
if (!IsLocalPlayer) { return; }
isWallRunning = false;

View File

@@ -17,7 +17,7 @@ public class PlayerCam : NetworkBehaviour
void Update ()
{
//if (!IsLocalPlayer) { return; }
if (!IsLocalPlayer) { return; }
offset = transform.parent.forward * rad.magnitude;
transform.position = new Vector3((player.transform.position.x - offset.x),((player.transform.position.y - offset.y)+2),(player.transform.position.z - offset.z));

View File

@@ -165,11 +165,8 @@ public class PlayerMovement : NetworkBehaviour
//TEMP FOR TESTING
//Checks if player should respawn
Respawn();
}
//Reads inputs and moves player
private void InputController()
{
@@ -237,7 +234,7 @@ public class PlayerMovement : NetworkBehaviour
//Apply Impact for when force needs to be applied without ragdolling
public void AddImpact(Vector3 dir, float force)
{
//if (!IsLocalPlayer) { return; }
if (!IsLocalPlayer) { return; }
dir.Normalize();
if (dir.y < 0) dir.y = -dir.y; // reflect down force on the ground