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()
|
|||
|
{
|
|||
|
//<2F><><EFBFBD>ô<EFBFBD><C3B4><EFBFBD><EFBFBD>ֵķֹ<C4B7><D6B9><EFBFBD>ԱΪ<D4B1>û<EFBFBD>ѡ<EFBFBD>еĽ<D0B5>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>ˢ<EFBFBD>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|||
|
|
|||
|
}
|
|||
|
// 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>();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|