Finish production line logic
This commit is contained in:
21
Assets/Scripts/UI/Spinbox.cs
Normal file
21
Assets/Scripts/UI/Spinbox.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
|
||||
public class Spinbox : MonoBehaviour
|
||||
{
|
||||
public AssignableWorker target;
|
||||
[SerializeField]
|
||||
private TMP_Text numAssignedLabel;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
target = transform.parent.GetComponent<AssignableWorker>();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
numAssignedLabel.text = target.GetAssignedWorkers().ToString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user