42 lines
855 B
C#
42 lines
855 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class HeatPointManager : MonoBehaviour
|
|
{
|
|
private HeatPointItem[] pointList;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 初始化热力图点位
|
|
/// </summary>
|
|
public void InitPoint()
|
|
{
|
|
pointList = transform.GetComponentsInChildren<HeatPointItem>(true);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据楼层显示热力图
|
|
/// </summary>
|
|
/// <param name="floorindex"></param>
|
|
public void ShowHeatPointByFloor(bool isShow, int floorindex)
|
|
{
|
|
foreach (HeatPointItem item in pointList)
|
|
{
|
|
item.gameObject.SetActive(isShow && item.floorIndex == floorindex);
|
|
}
|
|
}
|
|
}
|
|
|
|
|