技能主要更新,修复卡顿并加入动画,以及各种其他更新。
This commit is contained in:
@@ -6,7 +6,7 @@ using System.IO;
|
||||
|
||||
public class game_card_Prefab : MonoBehaviour, IPointerClickHandler
|
||||
{
|
||||
[Header("Prefab基本信息")]
|
||||
[Header("Prefab������Ϣ")]
|
||||
public Image card_icon_image;
|
||||
public Text card_name_text;
|
||||
public Text authorName_text;
|
||||
@@ -19,10 +19,10 @@ public class game_card_Prefab : MonoBehaviour, IPointerClickHandler
|
||||
[Header("Optional clickable Button (auto-find if null)")]
|
||||
public Button clickButton;
|
||||
|
||||
// 存储对应 index.html 的本地路径(不含 file:// 前缀)
|
||||
// �洢��Ӧ index.html �ı���·�������� file:// ǰ��
|
||||
private string indexFilePath;
|
||||
|
||||
// 给 loadLittleGamesPrefab 调用以填充文本和路径
|
||||
// �� loadLittleGamesPrefab ����������ı���·��
|
||||
public void SetData(string indexPath, string cardName, string authorName, string description, string isOfficial, string source, string yyyyMmDd, string version = null)
|
||||
{
|
||||
indexFilePath = indexPath;
|
||||
@@ -96,7 +96,7 @@ public class game_card_Prefab : MonoBehaviour, IPointerClickHandler
|
||||
OpenIndexPath();
|
||||
}
|
||||
|
||||
// 点击时尝试通过 WebViewLauncher 打开对应的 index.html
|
||||
// ���ʱ����ͨ�� WebViewLauncher ��Ӧ�� index.html
|
||||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
UnityEngine.Debug.Log($"game_card_Prefab.OnPointerClick: indexPath='{indexFilePath}'");
|
||||
@@ -111,7 +111,7 @@ public class game_card_Prefab : MonoBehaviour, IPointerClickHandler
|
||||
return;
|
||||
}
|
||||
|
||||
// 优先使用 WebViewLauncher 单例
|
||||
// ����ʹ�� WebViewLauncher ����
|
||||
if (WebViewLauncher.Instance != null)
|
||||
{
|
||||
UnityEngine.Debug.Log("Calling WebViewLauncher.OpenUrl with: " + indexFilePath);
|
||||
@@ -135,8 +135,8 @@ public class game_card_Prefab : MonoBehaviour, IPointerClickHandler
|
||||
else
|
||||
{
|
||||
UnityEngine.Debug.LogWarning("WebViewLauncher instance not found. Attempting to start new launcher.");
|
||||
// 尝试查找场景中的 WebViewLauncher 或创建一个新的 GameObject
|
||||
var launcherObj = GameObject.FindObjectOfType<WebViewLauncher>();
|
||||
// ���Բ��ҳ����е� WebViewLauncher ��һ���µ� GameObject
|
||||
var launcherObj = UnityEngine.Object.FindAnyObjectByType<WebViewLauncher>();
|
||||
if (launcherObj != null)
|
||||
{
|
||||
UnityEngine.Debug.Log("Found launcher in scene, calling OpenUrl: " + indexFilePath);
|
||||
|
||||
Reference in New Issue
Block a user