Add Alot of stuff, Computer, repairStation, Whole game, Many things!
This commit is contained in:
29
Assets/RepairHudController.cs
Normal file
29
Assets/RepairHudController.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class RepairHudController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private TextMeshProUGUI _currentItemText;
|
||||
[SerializeField] private TextMeshProUGUI _timeToFixText;
|
||||
[SerializeField] private TextMeshProUGUI _costToFixText;
|
||||
|
||||
private Object _currentObject;
|
||||
|
||||
RepairStationBehaviour _repairStationBehaviour;
|
||||
|
||||
public void SetObject(RepairStationBehaviour repairStationBehaviour, Object obj, float timeToFix, float costToFix) {
|
||||
_currentObject = obj;
|
||||
_repairStationBehaviour = repairStationBehaviour;
|
||||
_currentItemText.text = obj.ObjectSo.objectName;
|
||||
_timeToFixText.text = timeToFix.ToString();
|
||||
_costToFixText.text = costToFix.ToString();
|
||||
}
|
||||
|
||||
//Callback for if the player quits the UI without clicking the repair button
|
||||
public void ConfirmRepair() {
|
||||
_repairStationBehaviour.ConfirmRepair();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user