Merge branch 'rigidBodySetup'

This commit is contained in:
Melbyj1125
2021-11-01 12:21:31 -05:00
17 changed files with 484 additions and 266 deletions

View File

@@ -4,15 +4,17 @@ using UnityEngine;
public class InventoryManager : MonoBehaviour
{
public Item[] allItems;
private List<Item> itemList;
public List<Item> ItemList{
public Item[] allItems;
private List<Item> itemList;
public List<Item> ItemList{
get{ return itemList; }
set{ itemList = value; }
}
void Awake(){
allItems = Resources.LoadAll<Item>("ItemObjects");
}
void Awake(){
allItems = Resources.LoadAll<Item>("ItemObjects");
itemList = new List<Item>(allItems);
}
itemList = new List<Item>(allItems);
}
}

View File

@@ -13,8 +13,7 @@ public class SpecialItem : Item
public bool hasNitroM;
public bool hasDashM;
public float cooldownM;
//public MonoScript scriptM;
public override void Equip(PlayerStats p, GameObject player){
if(maxVelM != 0){
p.MaxVel += maxVelM;
@@ -61,9 +60,6 @@ public class SpecialItem : Item
if(hasDashM != false){
p.HasDash = hasDashM;
}
/*if(scriptM != null){
player.AddComponent(scriptM.GetClass());
}*/
}
public override void Unequip(PlayerStats p, GameObject player){
@@ -112,9 +108,7 @@ public class SpecialItem : Item
if(hasDashM != false){
p.HasDash = false;
}
/*if(scriptM != null){
Destroy(player.GetComponent(scriptM.GetClass()));
}*/
}
}