Selling Functionality, Picking up items, Basic computer

This commit is contained in:
2024-10-21 01:07:44 +02:00
parent f594bdf112
commit 19b7964f83
117 changed files with 9452 additions and 540 deletions

View File

@@ -0,0 +1,23 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SelectedObjectVisual : MonoBehaviour {
[SerializeField] private GameObject _baseCounter;
[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 == _baseCounter) {
_visualCounterSelected.SetActive(true);
}
else {
_visualCounterSelected.SetActive(false);
}
}
}