52 lines
1.3 KiB
C#
52 lines
1.3 KiB
C#
using JetBrains.Annotations;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Unity.VisualScripting;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
namespace DongWuYiXue.DaoNiaoShu
|
|
{
|
|
public class Point : MonoBehaviour
|
|
{
|
|
public enum Group
|
|
{
|
|
group1,
|
|
group2,
|
|
group3,
|
|
group4
|
|
}
|
|
public Group group;
|
|
public bool multip;
|
|
public List<Point> answers;
|
|
[SerializeField]
|
|
private GameObject selectImage;
|
|
private GameObject falseImage;
|
|
PointLineManager pointLineManager;
|
|
[HideInInspector]
|
|
public Button btn;
|
|
public void Init(PointLineManager pointLineManager)
|
|
{
|
|
this.pointLineManager = pointLineManager;
|
|
btn = GetComponent<Button>();
|
|
btn.onClick.AddListener(Click);
|
|
}
|
|
public void Click()
|
|
{
|
|
selectImage.SetActive(true);
|
|
pointLineManager.DrawLine(this);
|
|
}
|
|
public void Select()
|
|
{
|
|
selectImage.SetActive(true);
|
|
}
|
|
public void UnSelect()
|
|
{
|
|
selectImage.SetActive(false);
|
|
}
|
|
public bool IsSelect()
|
|
{
|
|
return selectImage.activeSelf;
|
|
}
|
|
}
|
|
}
|