37 lines
884 B
C#
37 lines
884 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
using UnityEngine.UI;
|
|
|
|
// 房间显示
|
|
public class RootView : MonoBehaviour, IPointerClickHandler
|
|
{
|
|
public GameObject roomInfoPanels;
|
|
public List<GameObject> OutlineObjects;
|
|
public Image roomInfoImage;
|
|
private bool isShowAll = false;
|
|
|
|
public void OnPointerClick(PointerEventData eventData)
|
|
{
|
|
isShowAll = !isShowAll;
|
|
|
|
roomInfoPanels.SetActive(isShowAll);
|
|
|
|
for (int i = 0; i < OutlineObjects.Count; i++)
|
|
{
|
|
OutlineObjects[i].GetComponent<Outline>().enabled = isShowAll;
|
|
}
|
|
|
|
if (isShowAll)
|
|
{
|
|
roomInfoImage.color = new Color(0, 1, 0, 0.8f);
|
|
}
|
|
else
|
|
{
|
|
roomInfoImage.color = new Color(1, 1, 1, 0.8f);
|
|
}
|
|
}
|
|
}
|