Added Inventory

Player Inventory takes scriptable objects
Items defines a scriptable object that modifies stats
This commit is contained in:
Melbyj1125
2021-10-08 13:46:00 -05:00
parent c16f07986d
commit 3569ef0366
4 changed files with 41 additions and 55 deletions

View File

@@ -5,49 +5,49 @@ using UnityEngine;
public class PlayerStats : MonoBehaviour
{
//Maximum possible player speed
private float maxVel;
private float maxVel = 30.0f;
public float MaxVel{
get{ return maxVel; }
set{ maxVel = value; }
}
//Minimum possible player speed
private float minVel;
private float minVel = 2.0f;
public float MinVel{
get{ return minVel; }
set{ minVel = value; }
}
//Current player speed
private float curVel;
private float curVel = 0.0f;
public float CurVel{
get{ return curVel; }
set{ curVel = value; }
}
//Player Jump power
private float acc;
private float acc = 0.06f;
public float Acc{
get{ return acc; }
set{ acc = value; }
}
//Player Jump power
private float jumpPow;
private float jumpPow = 300.0f;
public float JumpPow{
get{ return jumpPow; }
set{ jumpPow = value; }
}
//Players Number of Jumps
private int jumpNum;
private int jumpNum = 60; ////// UPDATE TO 2 WHEN THE JUMP ISSUE IS FIXED
public int JumpNum{
get{ return jumpNum; }
set{ jumpNum = value; }
}
//Player Traction
private float traction;
private float traction = 3.0f;
public float Traction{
get{ return traction; }
set{ traction = value; }
@@ -69,35 +69,35 @@ public class PlayerStats : MonoBehaviour
//MAY BE UNNECCESARY DEPENDING ON HOW GLIDER TURNS OUT
//Gravity Affecting the player
private float playerGrav;
private float playerGrav = 20.0f;
public float PlayerGrav{
get{ return playerGrav; }
set{ playerGrav = value; }
}
//If The Player Has Blink
private bool hasBlink;
private bool hasBlink = false;
public bool HasBlink{
get{ return hasBlink; }
set{ hasBlink = value; }
}
//If The Player Has Glider
private bool hasGlider;
private bool hasGlider = false;
public bool HasGlider{
get{ return hasGlider; }
set{ hasGlider = value; }
}
//If The Player Has Grapple
private bool hasGrapple;
private bool hasGrapple = false;
public bool HasGrapple{
get{ return hasGrapple; }
set{ hasGrapple = value; }
}
//If The Player Has Wallrun
private bool hasWallrun;
private bool hasWallrun = false;
public bool HasWallrun{
get{ return hasWallrun; }
set{ hasWallrun = value; }