mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-09-07 09:55:24 -05:00
Rigidbody Standup has been implemented
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,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));
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user