mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-31 14:55:01 -05:00
Merge branch 'rigidBodySetup'
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()));
|
||||
}*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user