添加宁夏银川万达广场室外场景

This commit is contained in:
2026-02-09 14:35:12 +08:00
parent cdc7964835
commit 3a7b2d560a
18 changed files with 26758 additions and 345 deletions

View File

@@ -8,7 +8,7 @@
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<data android:scheme="picoapp" android:host="launch" android:path="/com.pineappletech.xmen2.hunanchangdelixianwandaguangchang"/>
<data android:scheme="picoapp" android:host="launch" android:path="/com.pineappletech.xmen2.ningxiayinchuanxingqingxinhuabaihuoshiwai"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>

View File

@@ -1 +1 @@
Build from CHINAMI-UKDLSK3 at 2026/2/7 11:25:47
Build from LAPTOP-9VA5LMOP at 2026/2/9 14:27:57

View File

@@ -6064,9 +6064,9 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1815463941771659894}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.8, y: 0.8, z: 0.8}
m_LocalScale: {x: 2, y: 2, z: 2}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 4038051567966124574}
@@ -6268,8 +6268,8 @@ MonoBehaviour:
byteData:
byteDataArray:
Version: 1.7.12
gizmoViewMode: 2
showBehaviorDesignerGizmo: 1
gizmoViewMode: 0
showBehaviorDesignerGizmo: 0
--- !u!114 &2643019778098727240
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@@ -4230,9 +4230,9 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7102886678596991033}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.8, y: 0.8, z: 0.8}
m_LocalScale: {x: 2, y: 2, z: 2}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 8732222001177498588}

View File

@@ -32294,7 +32294,7 @@ Transform:
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 2, y: 2, z: 2}
m_LocalScale: {x: 2.5, y: 2.5, z: 2.5}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 8814151823842215044}
@@ -32496,8 +32496,8 @@ MonoBehaviour:
byteData:
byteDataArray:
Version: 1.7.12
gizmoViewMode: 2
showBehaviorDesignerGizmo: 1
gizmoViewMode: 0
showBehaviorDesignerGizmo: 0
--- !u!114 &67190724729745845
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@@ -1049,7 +1049,7 @@ Transform:
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalScale: {x: 2.5, y: 2.5, z: 2.5}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 8490760035586366739}

View File

@@ -22359,7 +22359,7 @@ Transform:
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.7, y: 0.7, z: 0.7}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 4496741784546641191}
@@ -22497,8 +22497,8 @@ MonoBehaviour:
byteData:
byteDataArray:
Version: 1.7.12
gizmoViewMode: 2
showBehaviorDesignerGizmo: 1
gizmoViewMode: 0
showBehaviorDesignerGizmo: 0
--- !u!114 &288329057834394054
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@@ -39555,8 +39555,8 @@ MonoBehaviour:
byteData:
byteDataArray:
Version: 1.7.12
gizmoViewMode: 2
showBehaviorDesignerGizmo: 1
gizmoViewMode: 0
showBehaviorDesignerGizmo: 0
--- !u!114 &8252241399972572735
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@@ -27,9 +27,9 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6966636241292980092}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_LocalScale: {x: 0.7, y: 0.7, z: 0.7}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 7621879113247452582}

View File

@@ -1569,12 +1569,12 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 196697458}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.6168882, y: 1.6579438, z: 2.1100957}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_Father: {fileID: 1132763769}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &196697460
MonoBehaviour:
@@ -15600,6 +15600,7 @@ Transform:
- {fileID: 398566737836198098}
- {fileID: 1980961103}
- {fileID: 1306763404}
- {fileID: 196697459}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1132993221
@@ -26964,4 +26965,3 @@ SceneRoots:
- {fileID: 1657300549}
- {fileID: 727780346}
- {fileID: 2110442825}
- {fileID: 196697459}

View File

@@ -1674,12 +1674,12 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 196697458}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.6168882, y: 1.6579438, z: 2.1100957}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_Father: {fileID: 1132763769}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &196697460
MonoBehaviour:
@@ -15390,6 +15390,7 @@ Transform:
- {fileID: 398566737836198098}
- {fileID: 1980961103}
- {fileID: 1306763404}
- {fileID: 196697459}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1132993221
@@ -26752,4 +26753,3 @@ SceneRoots:
- {fileID: 1657300549}
- {fileID: 727780346}
- {fileID: 2110442825}
- {fileID: 196697459}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9534b8b537b322a4d8cf03fbe9567f15
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -104,6 +104,16 @@ public enum GamePlace
Hunan_Xiangxi_Yongshun_XintiandiShangchang=67,
Shanxi_Yuncheng_Yanhu_WandaGuangchang = 68,
Bejing_Miyun_RuijiaShangchang = 69,
Henan_Kaifeng_Longting_XihuJingqu = 70,
Henan_Kaifeng_Longting_XihuJingqu_Shiwai = 71,
Jiangxi_Nanchang_Xihu_NanchangDongwuyuan = 72,
Liaoning_Panjin_Xinglongtai_Shuiyoucheng = 73,
Shanxi_Yulin_Shenmu_Liuta_Yuyuecheng = 74,
Sichuan_Liangshan_Mianning_GaoyangJiedao = 75,
Jiangxi_Nanchang_Xihu_NanchangDongwuyuan_Shinei = 76,
Ningxia_Yinchuan_Xingqing_XinhuaBaihuo = 77,
Liaoning_Huludao_Jianchang_XinglongDajiating = 78,
Ningxia_Yinchuan_Xingqing_XinhuaBaihuo_Shiwai = 79,
}
public enum GameKey

View File

@@ -1,304 +0,0 @@
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Threading;
using System.Collections.Concurrent;
using UnityEngine;
[Serializable]
public class IntentMessage
{
public string intent;
}
[Serializable]
public class PlayingStatusResponse
{
public int code;
public ServerData data;
public string message;
}
[Serializable]
public class ServerData
{
public string gameName;
public int gameTotalTime;
public int currentPlayTime;
}
public class HttpServer : MonoBehaviour
{
private HttpListener listener;
private Thread serverThread;
private volatile bool isRunning;
private const string SERVER_URL = "http://+:12345/";
// 子线程 → 主线程
private static ConcurrentQueue<NetMessage> messageQueue = new ConcurrentQueue<NetMessage>();
void Awake()
{
DontDestroyOnLoad(gameObject);
}
void Start()
{
StartServer();
}
#region HTTP Server
private void StartServer()
{
try
{
listener = new HttpListener();
listener.Prefixes.Add(SERVER_URL);
listener.Start();
isRunning = true;
serverThread = new Thread(ListenLoop)
{
IsBackground = true
};
serverThread.Start();
Debug.Log($"✅ HTTP Server 启动成功:{SERVER_URL}");
}
catch (Exception e)
{
Debug.LogError("❌ HTTP Server 启动失败:" + e);
}
}
private void ListenLoop()
{
while (isRunning && listener.IsListening)
{
try
{
var context = listener.GetContext();
ThreadPool.QueueUserWorkItem(ProcessRequest, context);
}
catch (HttpListenerException)
{
break;
}
catch (Exception e)
{
Debug.LogError(e);
}
}
}
private void ProcessRequest(object state)
{
var context = (HttpListenerContext)state;
var request = context.Request;
var response = context.Response;
response.AddHeader("Access-Control-Allow-Origin", "*");
response.AddHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS");
response.AddHeader("Access-Control-Allow-Headers", "Content-Type");
response.ContentType = "application/json; charset=utf-8";
try
{
if (request.HttpMethod == "POST")
{
string raw;
using (var reader = new StreamReader(
request.InputStream,
request.ContentEncoding ?? Encoding.UTF8))
{
raw = reader.ReadToEnd();
}
Debug.Log($"📩 收到原始 JSON{raw}");
// 解析 intent
IntentMessage intentMsg = null;
try
{
intentMsg = JsonUtility.FromJson<IntentMessage>(raw);
}
catch (Exception e)
{
Debug.LogError("JSON 解析失败:" + e);
}
// 只处理 is_playing
if (intentMsg != null && intentMsg.intent == "is_playing")
{
var resp = new PlayingStatusResponse
{
code = 200,
data = new ServerData()
{
gameName = GetCurrentGameName(),
gameTotalTime = GetGameTotalTime(),
currentPlayTime = GetCurrentPlayTime()
},
message = "请求成功"
};
string json = JsonUtility.ToJson(resp);
byte[] data = Encoding.UTF8.GetBytes(json);
response.OutputStream.Write(data, 0, data.Length);
}
else
{
// 未知 intent
string err = "{\"code\":400,\"msg\":\"unknown intent\"}";
byte[] data = Encoding.UTF8.GetBytes(err);
response.OutputStream.Write(data, 0, data.Length);
}
response.Close();
return;
}
}
catch (Exception e)
{
Debug.LogError(e);
WriteResponse(response, 500, "error");
}
finally
{
response.Close();
}
}
private void WriteResponse(HttpListenerResponse response, int code, string msg)
{
string json = $"{{\"code\":{code},\"msg\":\"{msg}\"}}";
byte[] data = Encoding.UTF8.GetBytes(json);
response.OutputStream.Write(data, 0, data.Length);
}
#endregion
#region Unity Main Thread
void Update()
{
while (messageQueue.TryDequeue(out var msg))
{
Debug.Log($"📩 来自 [{msg.sender}] 指令 [{msg.command}]");
HandleMessage(msg);
}
}
#endregion
#region Message Logic
[Serializable]
public class NetMessage
{
public string sender;
public string command;
}
private NetMessage ParseMessage(string raw)
{
if (string.IsNullOrEmpty(raw))
return null;
try
{
raw = raw.Replace("\"", "").Trim();
var parts = raw.Split(':');
if (parts.Length != 2)
{
Debug.LogWarning($"消息格式错误:{raw}");
return null;
}
return new NetMessage
{
sender = parts[0].Trim(),
command = parts[1].Trim()
};
}
catch (Exception e)
{
Debug.LogError($"解析失败:{raw}\n{e}");
return null;
}
}
private void HandleMessage(NetMessage msg)
{
switch (msg.command)
{
case "isStart":
OnStartCommand(msg.sender);
break;
default:
Debug.LogWarning($"未知指令:{msg.command}");
break;
}
}
private void OnStartCommand(string sender)
{
Debug.Log($"🚀 Start 指令来自:{sender}");
// ✅ 在这里安全调用 Unity API
// GameManager.Ins.QuitGame();
}
private string GetCurrentGameName()
{
return GameInit.Ins.gameId.ToString(); // 或你自己的 GameManager
}
private int GetGameTotalTime()
{
return Mathf.FloorToInt(GameInit.Ins.gameTime); // 举例1 小时(秒)
}
private int GetCurrentPlayTime()
{
return GameInit.Ins.GetNowTime();
}
#endregion
#region Shutdown
void OnDestroy()
{
StopServer();
}
private void StopServer()
{
isRunning = false;
try
{
listener?.Stop();
listener?.Close();
}
catch { }
try
{
if (serverThread != null && serverThread.IsAlive)
serverThread.Join(300);
}
catch { }
Debug.Log("🛑 HTTP Server 已关闭");
}
#endregion
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 782aa6b3a63a93044a5ce7fc397413d5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -7,7 +7,7 @@ EditorBuildSettings:
m_Scenes:
- enabled: 0
path: Assets/_FutureMen2/Scenes/Company1Floor.unity
guid: 58e6928b7ab8fef4d89228bad6b6b5da
guid: 85a76b6d090403d43a583743d21fc1b8
- enabled: 0
path: Assets/_FutureMen2/Scenes/Nanjing_Pukou_Longhutianjie.unity
guid: 588881595f76e994a8b7c61d3655ad33
@@ -98,9 +98,12 @@ EditorBuildSettings:
- enabled: 0
path: Assets/_FutureMen2/Scenes/Hebei_Hengshui_Taocheng_WandaGuangchang.unity
guid: fda6b537d5ec20a40b2a38de1c9b4b78
- enabled: 1
- enabled: 0
path: Assets/_FutureMen2/Scenes/Hunan_Changde_Lixian_WandaGuangchang.unity
guid: aac513edb67a7194ab733832df4d7da1
- enabled: 1
path: Assets/_FutureMen2/Scenes/Ningxia_Yinchuan_Xingqing_XinhuaBaihuo_Shiwai.unity
guid: 9534b8b537b322a4d8cf03fbe9567f15
m_configObjects:
Unity.XR.PXR.Settings: {fileID: 11400000, guid: 394d00ed08bdcde4c96c9952ff9a20ce, type: 2}
com.unity.xr.openxr.settings4: {fileID: 11400000, guid: 7d54fe958ff70274898aedb4739d2f73, type: 2}

View File

@@ -13,7 +13,7 @@ PlayerSettings:
useOnDemandResources: 0
accelerometerFrequency: 60
companyName: PineappleGame
productName: "\u94F6\u6CB3\u5B88\u62A4\u80052\u5F02\u5F62"
productName: "\u94F6\u6CB3\u5B88\u62A4\u80052\u5F02\u5F62_\u5BA4\u5916"
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.12156863, g: 0.12156863, b: 0.1254902, a: 1}
@@ -141,7 +141,10 @@ PlayerSettings:
visionOSBundleVersion: 1.0
tvOSBundleVersion: 1.0
bundleVersion: 1.0.1
preloadedAssets: []
preloadedAssets:
- {fileID: -8694443260321748181, guid: 4b42739a1e92cc548bfd5b2228834c88, type: 2}
- {fileID: 11400000, guid: 394d00ed08bdcde4c96c9952ff9a20ce, type: 2}
- {fileID: 5433630323398730205, guid: 7d54fe958ff70274898aedb4739d2f73, type: 2}
metroInputSource: 0
wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1
@@ -162,7 +165,7 @@ PlayerSettings:
androidSupportedAspectRatio: 1
androidMaxAspectRatio: 2.1
applicationIdentifier:
Android: com.pineappletech.xmen2.hunanchangdelixianwandaguangchang
Android: com.pineappletech.xmen2.ningxiayinchuanxingqingxinhuabaihuoshiwai
Standalone: com.PineappleGame.---------------2------
buildNumber:
Standalone: 0