49 lines
1.1 KiB
C#
49 lines
1.1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class JueseChoicePop : MonoBehaviour
|
|
{
|
|
public Button CloseBtn;
|
|
public Button Surebtn;
|
|
public GameObject classmatePrefab;
|
|
public Transform content;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
this.gameObject.SetActive(false);
|
|
CloseBtn.onClick.AddListener(CLosePop);
|
|
Surebtn.onClick.AddListener(CLosePop);
|
|
Surebtn.onClick.AddListener(SetFenguan);
|
|
SetClass();
|
|
}
|
|
void CLosePop()
|
|
{
|
|
this.gameObject.SetActive(false);
|
|
}
|
|
public void openPop()
|
|
{
|
|
this.gameObject.SetActive(true);
|
|
}
|
|
void SetFenguan()
|
|
{
|
|
//设置此区分的分管人员为用户选中的角色,并刷新界面信息
|
|
|
|
}
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
public void SetClass()
|
|
{
|
|
for (int i = 0; i < 10; i++)
|
|
{
|
|
|
|
GameObject item = GameObject.Instantiate<GameObject>(classmatePrefab, content);
|
|
ClassMate classMate = item.GetComponent<ClassMate>();
|
|
}
|
|
}
|
|
}
|