Merge branch 'grayboxPlains' into main

This commit is contained in:
Evan Nydahl
2021-11-29 13:48:18 -06:00
26 changed files with 5908 additions and 28 deletions

View File

@@ -3,10 +3,12 @@ using System.Collections.Generic;
using MLAPI;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.InputSystem;
public class PlayerMovement : NetworkBehaviour
{
//Controller object
new GamePadControlls controler;
//Scripts
public PlayerStats pStats;
@@ -88,6 +90,8 @@ public class PlayerMovement : NetworkBehaviour
capCol = GetComponent<CapsuleCollider>();
pStats = GetComponent<PlayerStats>();
parentObj = transform.parent.gameObject;
controler = new GamePadControlls();
controler.Runner.Enable();
capCol.enabled = false;
//Wallrun
@@ -237,7 +241,7 @@ public class PlayerMovement : NetworkBehaviour
private void Jump()
{
//If space is pressed apply an upwards force to the player
if (Input.GetAxis("Jump") != 0 && !jumpPressed && curJumpNum + 1 < pStats.JumpNum && !isSliding)
if ((Input.GetAxis("Jump") != 0) && !jumpPressed && curJumpNum + 1 < pStats.JumpNum && !isSliding)
{
AddImpact(transform.up, pStats.JumpPow);
curJumpNum++;