60 lines
1.4 KiB
C#
60 lines
1.4 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using static WebInteraction;
|
|
|
|
public class LensUI : CabinetUIBase
|
|
{
|
|
public Button button;
|
|
public TextMeshProUGUI text;
|
|
public Text text1;
|
|
|
|
public static Transform Camera;
|
|
|
|
public Transform maodian;
|
|
|
|
private void Awake()
|
|
{
|
|
}
|
|
void Start()
|
|
{
|
|
Camera = UnityEngine.Camera.main.transform;
|
|
button.onClick.AddListener(() =>
|
|
{
|
|
var t = text.text.Replace("ÉãÏñ", "");
|
|
//if (BoolMonitor.Value)
|
|
{
|
|
WebInteraction.Inst.current_videoNumber = t;
|
|
WebInteraction.Inst.isVideoPlay = true;
|
|
WebInteraction.Inst.OpenVideo(t);
|
|
|
|
float x = Input.mousePosition.x;
|
|
float y = Screen.height - Input.mousePosition.y;
|
|
|
|
WebInteraction.Inst.SendVideoPosition(x, y);
|
|
}
|
|
});
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
maodian.transform.eulerAngles = Camera.eulerAngles;
|
|
}
|
|
|
|
public override void OnMenuChanged(Menu menu)
|
|
{
|
|
base.OnMenuChanged(menu);
|
|
if (menu == Menu.M_È«¾°¼à¿Ø_ÉãÏñÍ·)
|
|
{
|
|
//gameObject.SetActive(true);
|
|
}
|
|
else
|
|
{
|
|
gameObject.SetActive(false);
|
|
}
|
|
}
|
|
}
|