提交
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DontConfuse;
|
||||
using ScrewsMaster;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace DontConfuse
|
||||
{
|
||||
public class TwistNode : MonoBehaviour
|
||||
{
|
||||
public GameObject bg;
|
||||
public void TwistPos(string str = "")
|
||||
{
|
||||
// Vector3 v3 = new Vector3(0, 0, 0);
|
||||
// if (str != "")
|
||||
// {
|
||||
// v3.x = float.Parse(str.Split("##")[0]) * Screen.width;
|
||||
// v3.y = float.Parse(str.Split("##")[1]) * Screen.height;
|
||||
// }
|
||||
|
||||
if (str != "")
|
||||
{
|
||||
string[] a = str.Split("##");
|
||||
if (a.Length >= 2)
|
||||
{
|
||||
// WebviewManager.Instance.TouchClickPoint(a[0] + "|" + a[1]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// PointerEventData pointerEventData = new PointerEventData(EventSystem.current);
|
||||
// pointerEventData.position = new Vector2(v3.x, v3.y);
|
||||
// Debug.Log("------------------------" + str);
|
||||
// Debug.Log(v3.x + "------------------------" + v3.y);
|
||||
// List<RaycastResult> results = new List<RaycastResult>();
|
||||
// EventSystem.current.RaycastAll(pointerEventData, results);
|
||||
|
||||
// // Debug.Log("------------------------"+results.Count);
|
||||
// if (results.Count > 0)
|
||||
// {
|
||||
// pointerEventData.pointerCurrentRaycast = results[0];
|
||||
// ExecuteEvents.Execute(results[0].gameObject, pointerEventData, ExecuteEvents.pointerClickHandler);
|
||||
// if (results[0].gameObject.GetComponent<InputField>() != null)
|
||||
// {
|
||||
// EventSystem.current.SetSelectedGameObject(results[0].gameObject.gameObject);
|
||||
// results[0].gameObject.GetComponent<InputField>().OnPointerClick(new PointerEventData(EventSystem.current));
|
||||
// }
|
||||
// }
|
||||
// EventSystem.current.SetSelectedGameObject(null);
|
||||
// pointerEventData.pointerCurrentRaycast = new RaycastResult();
|
||||
// results.Clear();
|
||||
}
|
||||
|
||||
public void TwistBg(string alp)
|
||||
{
|
||||
#if JarvisRelease
|
||||
int a = int.Parse(alp);
|
||||
Color cl = bg.GetComponent<Image>().color;
|
||||
cl.a = a;
|
||||
//bg为游戏背景图片
|
||||
bg.GetComponent<Image>().color = cl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user