mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-21 09:54:28 -05:00
Implemented Item Scripts into objects
Implemented Ragdoll kinda There are some issues with getting hit while ragdolling that need to be fixed Adjusted Dash Dash still needs some adjustments before being fully implemented
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Assertions;
|
||||
|
||||
public class PlayerStats : MonoBehaviour
|
||||
{
|
||||
//Maximum possible player speed
|
||||
[SerializeField]
|
||||
private float maxVel = 25.0f;
|
||||
public float MaxVel{
|
||||
get{ return maxVel; }
|
||||
@@ -13,7 +13,6 @@ public class PlayerStats : MonoBehaviour
|
||||
}
|
||||
|
||||
//Minimum possible player speed
|
||||
[SerializeField]
|
||||
private float minVel = 2.0f;
|
||||
public float MinVel{
|
||||
get{ return minVel; }
|
||||
@@ -21,7 +20,6 @@ public class PlayerStats : MonoBehaviour
|
||||
}
|
||||
|
||||
//Current player speed
|
||||
[SerializeField]
|
||||
private float curVel = 0.0f;
|
||||
public float CurVel{
|
||||
get{ return curVel; }
|
||||
@@ -29,7 +27,6 @@ public class PlayerStats : MonoBehaviour
|
||||
}
|
||||
|
||||
//Player Jump power
|
||||
[SerializeField]
|
||||
private float acc = 0.1f;
|
||||
public float Acc{
|
||||
get{ return acc; }
|
||||
@@ -37,7 +34,6 @@ public class PlayerStats : MonoBehaviour
|
||||
}
|
||||
|
||||
//Player Jump power
|
||||
[SerializeField]
|
||||
private float jumpPow = 300.0f;
|
||||
public float JumpPow{
|
||||
get{ return jumpPow; }
|
||||
@@ -45,7 +41,6 @@ public class PlayerStats : MonoBehaviour
|
||||
}
|
||||
|
||||
//Players Number of Jumps
|
||||
[SerializeField]
|
||||
private int jumpNum = 2; ////// UPDATE TO 2 WHEN THE JUMP ISSUE IS FIXED
|
||||
public int JumpNum{
|
||||
get{ return jumpNum; }
|
||||
@@ -53,7 +48,6 @@ public class PlayerStats : MonoBehaviour
|
||||
}
|
||||
|
||||
//Player Traction
|
||||
[SerializeField]
|
||||
private float traction = 3.0f;
|
||||
public float Traction{
|
||||
get{ return traction; }
|
||||
@@ -61,7 +55,6 @@ public class PlayerStats : MonoBehaviour
|
||||
}
|
||||
|
||||
//Player Kick Power
|
||||
[SerializeField]
|
||||
private float kickPow;
|
||||
public float KickPow{
|
||||
get{ return kickPow; }
|
||||
@@ -69,7 +62,6 @@ public class PlayerStats : MonoBehaviour
|
||||
}
|
||||
|
||||
//Player Recovery Time When Knocked Down
|
||||
[SerializeField]
|
||||
private float recovTime;
|
||||
public float RecovTime{
|
||||
get{ return recovTime; }
|
||||
@@ -78,7 +70,6 @@ public class PlayerStats : MonoBehaviour
|
||||
|
||||
//MAY BE UNNECCESARY DEPENDING ON HOW GLIDER TURNS OUT
|
||||
//Gravity Affecting the player
|
||||
[SerializeField]
|
||||
private float playerGrav = 20.0f;
|
||||
public float PlayerGrav{
|
||||
get{ return playerGrav; }
|
||||
@@ -86,7 +77,6 @@ public class PlayerStats : MonoBehaviour
|
||||
}
|
||||
|
||||
//If The Player Has Blink
|
||||
[SerializeField]
|
||||
private bool hasBlink = false;
|
||||
public bool HasBlink{
|
||||
get{ return hasBlink; }
|
||||
@@ -94,7 +84,6 @@ public class PlayerStats : MonoBehaviour
|
||||
}
|
||||
|
||||
//If The Player Has Glider
|
||||
[SerializeField]
|
||||
private bool hasGlider = false;
|
||||
public bool HasGlider{
|
||||
get{ return hasGlider; }
|
||||
@@ -102,7 +91,6 @@ public class PlayerStats : MonoBehaviour
|
||||
}
|
||||
|
||||
//If The Player Has Grapple
|
||||
[SerializeField]
|
||||
private bool hasGrapple = false;
|
||||
public bool HasGrapple{
|
||||
get{ return hasGrapple; }
|
||||
@@ -110,7 +98,6 @@ public class PlayerStats : MonoBehaviour
|
||||
}
|
||||
|
||||
//If The Player Has Wallrun
|
||||
[SerializeField]
|
||||
private bool hasWallrun = false;
|
||||
public bool HasWallrun{
|
||||
get{ return hasWallrun; }
|
||||
@@ -118,7 +105,6 @@ public class PlayerStats : MonoBehaviour
|
||||
}
|
||||
|
||||
//If The Player Has Nitro
|
||||
[SerializeField]
|
||||
private bool hasNitro = false;
|
||||
public bool HasNitro{
|
||||
get{ return hasNitro; }
|
||||
@@ -126,17 +112,24 @@ public class PlayerStats : MonoBehaviour
|
||||
}
|
||||
|
||||
//If The Player Has Dash
|
||||
[SerializeField]
|
||||
private bool hasDash = false;
|
||||
public bool HasDash{
|
||||
get{ return hasDash; }
|
||||
set{ hasDash = value; }
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private int playerPoints = 15;
|
||||
public int PlayerPoints{
|
||||
get{ return playerPoints; }
|
||||
set{ playerPoints = value; }
|
||||
}
|
||||
|
||||
// void Update(){
|
||||
// VariableValidation();
|
||||
// }
|
||||
|
||||
// void VariableValidation(){
|
||||
// Debug.Assert((playerPoints != null && playerPoints > 0), "Not valid value");
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user