GQ_Communicate/GQ_URP/GQ/Assets/Scripts/Focus/ThreeDUIClick.cs

37 lines
1.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Adam;
using HUD;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//============================================================
//支持中文文件使用UTF-8编码
//@author YangHua
//@create 20230531
//@company Adam
//
//@description:
//============================================================
namespace Focus
{
public class ThreeDUIClick : MonoBehaviour
{
public HUDController hudController;
// Use this for initialization
private void Start()
{
for (int i = 0; i < hudController.modelInformations.Count; i++)
{
for (int j = 0; j < hudController.modelInformations[i].tations.Count; j++)
{
int modelIndex = i;
int tationIndex = j;
hudController.modelInformations[i].tations[j].transform.GetChild(0).GetComponent<StationInformation>().onClick.AddListener(() =>
{
CameraMgr.Instance.GotoView(hudController.modelInformations[modelIndex].tations[tationIndex].transform, 20f);
});
}
}
}
}
}