Player Items now carry over to the next scene

This commit is contained in:
Melbyj1125
2021-12-01 14:23:14 -06:00
parent 7185e3b870
commit 57385b47b4
10 changed files with 95 additions and 90 deletions

View File

@@ -6,63 +6,63 @@ using UnityEngine.Assertions;
public class PlayerStats : MonoBehaviour
{
//Maximum possible player speed
private float maxVel = 25.0f;
[SerializeField] private float maxVel = 25.0f;
public float MaxVel{
get{ return maxVel; }
set{ maxVel = value; }
}
//Minimum possible player speed
private float minVel = 2.0f;
[SerializeField] private float minVel = 2.0f;
public float MinVel{
get{ return minVel; }
set{ minVel = value; }
}
//Current player speed
private float curVel = 0.0f;
[SerializeField] private float curVel = 0.0f;
public float CurVel{
get{ return curVel; }
set{ curVel = value; }
}
//Player Acceleration
private float acc = 0.1f;
[SerializeField] private float acc = 0.1f;
public float Acc{
get{ return acc; }
set{ acc = value; }
}
//Player Jump power
private float jumpPow = 300.0f;
[SerializeField] private float jumpPow = 300.0f;
public float JumpPow{
get{ return jumpPow; }
set{ jumpPow = value; }
}
//Players Number of Jumps
private int jumpNum = 2;
[SerializeField] private int jumpNum = 2;
public int JumpNum{
get{ return jumpNum; }
set{ jumpNum = value; }
}
//Player Traction
private float traction = 3.0f;
[SerializeField] private float traction = 3.0f;
public float Traction{
get{ return traction; }
set{ traction = value; }
}
//Player Kick Power
private float kickPow = 100.0f;
[SerializeField] private float kickPow = 100.0f;
public float KickPow{
get{ return kickPow; }
set{ kickPow = value; }
}
//Player Recovery Time When Knocked Down
private float recovTime = 3.0f;
[SerializeField] private float recovTime = 3.0f;
public float RecovTime{
get{ return recovTime; }
set{ recovTime = value; }
@@ -70,55 +70,55 @@ public class PlayerStats : MonoBehaviour
//MAY BE UNNECCESARY DEPENDING ON HOW GLIDER TURNS OUT
//Gravity Affecting the player
private float playerGrav = 20.0f;
[SerializeField] private float playerGrav = 20.0f;
public float PlayerGrav{
get{ return playerGrav; }
set{ playerGrav = value; }
}
//If The Player Has Blink
private bool hasBlink = false;
[SerializeField] private bool hasBlink = false;
public bool HasBlink{
get{ return hasBlink; }
set{ hasBlink = value; }
}
//If The Player Has Glider
private bool hasGlider = false;
[SerializeField] private bool hasGlider = false;
public bool HasGlider{
get{ return hasGlider; }
set{ hasGlider = value; }
}
//If The Player Has Grapple
private bool hasGrapple = false;
[SerializeField] private bool hasGrapple = false;
public bool HasGrapple{
get{ return hasGrapple; }
set{ hasGrapple = value; }
}
//If The Player Has Wallrun
private bool hasWallrun = true;
[SerializeField] private bool hasWallrun = false;
public bool HasWallrun{
get{ return hasWallrun; }
set{ hasWallrun = value; }
}
//If The Player Has Nitro
private bool hasNitro = false;
[SerializeField] private bool hasNitro = false;
public bool HasNitro{
get{ return hasNitro; }
set{ hasNitro = value; }
}
//If The Player Has Dash
private bool hasDash;
[SerializeField] private bool hasDash = false;
public bool HasDash{
get{ return hasDash; }
set{ hasDash = value; }
}
private int playerPoints = 15;
[SerializeField] private int playerPoints = 15;
public int PlayerPoints{
get{ return playerPoints; }
set{ playerPoints = value; }