Json修改
This commit is contained in:
parent
44400ea519
commit
a6002493cd
File diff suppressed because it is too large
Load Diff
@ -115,27 +115,27 @@ public class Panel : Base
|
||||
//动态加载人员
|
||||
public async void DynamicLoadingPeople()
|
||||
{
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
GameObject item = GameObject.Instantiate<GameObject>(peoplePrefab, peopleCountent);
|
||||
PeopleItem peopleItem = item.GetComponent<PeopleItem>();
|
||||
peopleItem.nameText.text = "角色1";
|
||||
peopleItem.peopleId = "0";
|
||||
Button peoplebutton = item.transform.Find("TextBtn").GetComponent<Button>();
|
||||
peoplebutton.onClick.AddListener(() => OnPeopleItemClicked(item, Color.yellow, selectedPerson));
|
||||
peopleList.Add(item);// 将每个实例化的角色添加到列表中
|
||||
}
|
||||
//PlayerListResponse playerListResponse = await userInfo.GetPlayerList();
|
||||
//foreach (PlayerListData player in playerListResponse.data)
|
||||
//for (int i = 0; i < 10; i++)
|
||||
//{
|
||||
// GameObject item = GameObject.Instantiate<GameObject>(peoplePrefab, peopleCountent);
|
||||
// PeopleItem peopleItem = item.GetComponent<PeopleItem>();
|
||||
// peopleItem.nameText.text = player.NickName;
|
||||
// peopleItem.peopleId = player.UserId;
|
||||
// peopleItem.nameText.text = "角色1";
|
||||
// peopleItem.peopleId = "0";
|
||||
// Button peoplebutton = item.transform.Find("TextBtn").GetComponent<Button>();
|
||||
// peoplebutton.onClick.AddListener(() => OnPeopleItemClicked(item, Color.yellow, selectedPerson));
|
||||
// peopleList.Add(item);// 将每个实例化的角色添加到列表中
|
||||
//}
|
||||
PlayerListResponse playerListResponse = await userInfo.GetPlayerList();
|
||||
foreach (PlayerListData player in playerListResponse.data)
|
||||
{
|
||||
GameObject item = GameObject.Instantiate<GameObject>(peoplePrefab, peopleCountent);
|
||||
PeopleItem peopleItem = item.GetComponent<PeopleItem>();
|
||||
peopleItem.nameText.text = player.NickName;
|
||||
peopleItem.peopleId = player.UserId;
|
||||
Button peoplebutton = item.transform.Find("TextBtn").GetComponent<Button>();
|
||||
peoplebutton.onClick.AddListener(() => OnPeopleItemClicked(item, Color.yellow, selectedPerson));
|
||||
peopleList.Add(item);// 将每个实例化的角色添加到列表中
|
||||
}
|
||||
}
|
||||
|
||||
//动态加载职责
|
||||
|
Loading…
Reference in New Issue
Block a user