mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-21 18:04:27 -05:00
Merge branch 'grayboxPlains' into main
This commit is contained in:
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user