超大量的更新 修复很多问题,gameplay特效初步
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.EventSystems;
|
||||
using System;
|
||||
@@ -6,7 +6,7 @@ using System.IO;
|
||||
|
||||
public class game_card_Prefab : MonoBehaviour, IPointerClickHandler
|
||||
{
|
||||
[Header("Prefab������Ϣ")]
|
||||
[Header("Inspector")]
|
||||
public Image card_icon_image;
|
||||
public Text card_name_text;
|
||||
public Text authorName_text;
|
||||
@@ -19,11 +19,10 @@ public class game_card_Prefab : MonoBehaviour, IPointerClickHandler
|
||||
[Header("Optional clickable Button (auto-find if null)")]
|
||||
public Button clickButton;
|
||||
|
||||
// �洢��Ӧ index.html �ı���·�������� file:// ǰ��
|
||||
// Documentation text normalized.
|
||||
private string indexFilePath;
|
||||
|
||||
// �� loadLittleGamesPrefab ����������ı���·��
|
||||
public void SetData(string indexPath, string cardName, string authorName, string description, string isOfficial, string source, string yyyyMmDd, string version = null)
|
||||
public void SetData(string indexPath, string cardName, string authorName, string description, string isOfficial, string source, string yyyyMmDd, string version)
|
||||
{
|
||||
indexFilePath = indexPath;
|
||||
if (card_name_text != null) card_name_text.text = cardName ?? "";
|
||||
@@ -96,7 +95,7 @@ public class game_card_Prefab : MonoBehaviour, IPointerClickHandler
|
||||
OpenIndexPath();
|
||||
}
|
||||
|
||||
// ���ʱ����ͨ�� WebViewLauncher ��Ӧ�� index.html
|
||||
// Documentation text normalized.
|
||||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
UnityEngine.Debug.Log($"game_card_Prefab.OnPointerClick: indexPath='{indexFilePath}'");
|
||||
@@ -111,7 +110,7 @@ public class game_card_Prefab : MonoBehaviour, IPointerClickHandler
|
||||
return;
|
||||
}
|
||||
|
||||
// ����ʹ�� WebViewLauncher ����
|
||||
// Documentation text normalized.
|
||||
if (WebViewLauncher.Instance != null)
|
||||
{
|
||||
UnityEngine.Debug.Log("Calling WebViewLauncher.OpenUrl with: " + indexFilePath);
|
||||
@@ -135,7 +134,7 @@ public class game_card_Prefab : MonoBehaviour, IPointerClickHandler
|
||||
else
|
||||
{
|
||||
UnityEngine.Debug.LogWarning("WebViewLauncher instance not found. Attempting to start new launcher.");
|
||||
// ���Բ��ҳ����е� WebViewLauncher ��һ���µ� GameObject
|
||||
// Documentation text normalized.
|
||||
var launcherObj = UnityEngine.Object.FindAnyObjectByType<WebViewLauncher>();
|
||||
if (launcherObj != null)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
@@ -14,11 +14,11 @@ public class loadLittleGamesPrefab : MonoBehaviour
|
||||
|
||||
[Header("Prefab")]
|
||||
public GameObject littleGames_card_Prefab;
|
||||
[Tooltip("Ĭ��iconͼ")]
|
||||
[Tooltip("Documentation text normalized.")]
|
||||
public Sprite default_card_icon_sprite;
|
||||
|
||||
[Header("Refresh")]
|
||||
public Button refreshButton; // �����������ɨ�貢ˢ������б�
|
||||
public Button refreshButton; // Documentation text normalized.
|
||||
|
||||
[Header("H5 Root Path (optional, leave empty to use WebViewLauncher settings)")]
|
||||
public string h5RootPath;
|
||||
@@ -108,11 +108,11 @@ public class loadLittleGamesPrefab : MonoBehaviour
|
||||
continue;
|
||||
|
||||
// defaults
|
||||
string defName = "δ֪Html�ļ�";
|
||||
string defAuthor = "δ֪����";
|
||||
string defDesc = "�������������Ϣ";
|
||||
string defIsOfficial = "δ֪��Դ";
|
||||
string defSource = "�Զ�������";
|
||||
string defName = "Unknown HTML Page";
|
||||
string defAuthor = "Unknown Author";
|
||||
string defDesc = "No description provided.";
|
||||
string defIsOfficial = "Unknown Source";
|
||||
string defSource = "Unknown";
|
||||
string defDateRaw = "19700101";
|
||||
|
||||
string cardName = GetMeta(meta, "card_name") ?? defName;
|
||||
@@ -128,12 +128,12 @@ public class loadLittleGamesPrefab : MonoBehaviour
|
||||
|
||||
if (cat == "_officialDocs" || cat == "_officialGames")
|
||||
{
|
||||
isOfficial = "�ٷ�";
|
||||
source = "С��ϷDLC";
|
||||
isOfficial = "Official";
|
||||
source = "MiniGame DLC";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrEmpty(isOfficial)) isOfficial = "��������Դ";
|
||||
if (string.IsNullOrEmpty(isOfficial)) isOfficial = "Community";
|
||||
if (string.IsNullOrEmpty(source)) source = defSource;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user