Rigidbody Standup has been implemented

This commit is contained in:
Melbyj1125
2021-10-29 12:28:36 -05:00
parent 5c8e13e0f5
commit 45a2c5b473
15 changed files with 246 additions and 155 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,7 +13,7 @@ public class SpecialItem : Item
public bool hasNitroM;
public bool hasDashM;
public float cooldownM;
public MonoScript scriptM;
//public TextAsset scriptM;
public override void Equip(PlayerStats p, GameObject player){
if(maxVelM != 0){
@@ -61,9 +61,11 @@ public class SpecialItem : Item
if(hasDashM != false){
p.HasDash = hasDashM;
}
/*
if(scriptM != null){
player.AddComponent(scriptM.GetClass());
player.AddComponent(scriptM);
}
*/
}
public override void Unequip(PlayerStats p, GameObject player){
@@ -112,9 +114,11 @@ public class SpecialItem : Item
if(hasDashM != false){
p.HasDash = false;
}
/*
if(scriptM != null){
Destroy(player.GetComponent(scriptM.GetClass()));
Destroy(player.GetComponent(scriptM));
}
*/
}
}