merge joonasp's branches

This commit is contained in:
HelarJ 2022-04-11 19:03:18 +03:00
commit ca41eda129
2 changed files with 9 additions and 1 deletions

View File

@ -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);
}

View File

@ -1,5 +1,9 @@
fileFormatVersion: 2
<<<<<<<< HEAD:Assets/Scenes/JoonasP/Homebase_JP.unity.meta
guid: 97fc7747e77335e4483b4a65db2e4fc1
========
guid: 6d5f257272c8a9840891d8745d7bc200
>>>>>>>> joonasp_Milestone2:Assets/Scenes/JoonasP/Homebase_JoonasP.unity.meta
DefaultImporter:
externalObjects: {}
userData: