Add items, Pickup logic works

This commit is contained in:
2024-10-17 01:22:54 +02:00
parent ec487096bf
commit f594bdf112
72 changed files with 7258 additions and 918 deletions

View File

@@ -0,0 +1,23 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CounterSelecedVisual : MonoBehaviour {
[SerializeField] private EmptyCounter _emptyCounter;
[SerializeField] private GameObject _visualCounterSelected;
private void Start() {
//Using start to I can assure the player exists
PlayerController.Instance.GetComponent<InteractionBehaviour>().OnSelectedCounter += OnOnSelectedCounterChange;
}
private void OnOnSelectedCounterChange(object sender, InteractionBehaviour.OnSelectedCounterArgs e) {
if (e.selectedCounter == _emptyCounter) {
_visualCounterSelected.SetActive(true);
}
else {
_visualCounterSelected.SetActive(false);
}
}
}