-
Notifications
You must be signed in to change notification settings - Fork 0
/
MenuLabels.cs
40 lines (32 loc) · 909 Bytes
/
MenuLabels.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class MenuLabels : MonoBehaviour
{
public GroundController g;
public Text[] list1;
private List<GameObject> objList;
int count = 0;
// Start is called before the first frame update
void Start()
{
g = GroundController.Instance;
objList = g.ObjectList;
list1 = this.GetComponentsInChildren<Text>();
//Debug.Log(list1.Length + " " + g.ObjectList.Length);
foreach (GameObject g in objList)
{
if (objList[count] != null)
{
list1[count].text = objList[count].name;
}
count++;
}
}
// Update is called once per frame
void Update()
{
//update with new hotbar items
}
}