merge joonasp's branches
This commit is contained in:
@@ -7,7 +7,8 @@ public class EssenceNodeController : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private AudioSource chime;
|
||||
|
||||
|
||||
private Inventory playerInventory;
|
||||
|
||||
public bool isTouched;
|
||||
private bool followPlayer = false;
|
||||
@@ -25,6 +26,7 @@ public class EssenceNodeController : MonoBehaviour
|
||||
{
|
||||
nodeMaterial = GetComponent<Renderer>().material;
|
||||
playerInfo = PlayerInfo.Instance;
|
||||
playerInventory = GameObject.Find("Inventory").GetComponent<Inventory>();
|
||||
}
|
||||
|
||||
public void Touched()
|
||||
@@ -62,6 +64,8 @@ public class EssenceNodeController : MonoBehaviour
|
||||
{
|
||||
playerInfo.AddEssenceBasic(1);
|
||||
yield return new WaitForSeconds(2f);
|
||||
//TODO: Update value in player inventory
|
||||
playerInventory.AddItem(GetComponent<ItemData>());
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user