This commit is contained in:
DESKTOP-SAJ6RKV\Administrator 2025-06-11 18:01:35 +08:00
parent c6ae1eb331
commit 96213cba61
7 changed files with 37 additions and 20 deletions

View File

@ -77856,7 +77856,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 304.8744, y: -875.7611} m_AnchoredPosition: {x: 357, y: -348}
m_SizeDelta: {x: 296.859, y: 391.3584} m_SizeDelta: {x: 296.859, y: 391.3584}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7107826902313543558 --- !u!222 &7107826902313543558

View File

@ -317,7 +317,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0} m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: 1716} m_AnchoredPosition: {x: 0, y: 1564}
m_SizeDelta: {x: 376, y: 168} m_SizeDelta: {x: 376, y: 168}
m_Pivot: {x: 0.5, y: 0} m_Pivot: {x: 0.5, y: 0}
--- !u!222 &1262919798139157747 --- !u!222 &1262919798139157747

View File

@ -1636,7 +1636,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0.00038004026, y: 0.00013983398} m_AnchoredPosition: {x: -0.00010880414, y: -0.00044178174}
m_SizeDelta: {x: 0, y: 1292.4} m_SizeDelta: {x: 0, y: 1292.4}
m_Pivot: {x: 0, y: 1} m_Pivot: {x: 0, y: 1}
--- !u!114 &6944785608262845692 --- !u!114 &6944785608262845692
@ -1710,7 +1710,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: -0, y: -0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 879.0811, y: 408.919} m_SizeDelta: {x: 879.0811, y: 408.919}
m_Pivot: {x: 0, y: 1} m_Pivot: {x: 0, y: 1}
--- !u!114 &8725143268810197699 --- !u!114 &8725143268810197699
@ -2316,7 +2316,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: -0, y: -0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 879.0811, y: 118.2536} m_SizeDelta: {x: 879.0811, y: 118.2536}
m_Pivot: {x: 0, y: 1} m_Pivot: {x: 0, y: 1}
--- !u!114 &4487970101200929661 --- !u!114 &4487970101200929661
@ -3202,7 +3202,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 2.0921, y: 2.7802} m_AnchoredPosition: {x: 2.092102, y: 2.780201}
m_SizeDelta: {x: -71.9134, y: -56.7932} m_SizeDelta: {x: -71.9134, y: -56.7932}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4189406281391591810 --- !u!222 &4189406281391591810
@ -3540,7 +3540,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 2.0921, y: 2.7802} m_AnchoredPosition: {x: 2.092102, y: 2.780201}
m_SizeDelta: {x: -71.9134, y: -56.7932} m_SizeDelta: {x: -71.9134, y: -56.7932}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5698852707877253819 --- !u!222 &5698852707877253819
@ -4349,7 +4349,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 349.0418, y: 1} m_AnchoredPosition: {x: 349.04184, y: 1}
m_SizeDelta: {x: 107.9163, y: 39.4938} m_SizeDelta: {x: 107.9163, y: 39.4938}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &442681237643629642 --- !u!222 &442681237643629642
@ -5333,9 +5333,9 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 182721815195331612} m_Father: {fileID: 182721815195331612}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: -940} m_AnchoredPosition: {x: 0, y: 7}
m_SizeDelta: {x: 454, y: 128} m_SizeDelta: {x: 454, y: 128}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7419086050736273723 --- !u!222 &7419086050736273723
@ -5519,7 +5519,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0.00038004026, y: -0.00003568369} m_AnchoredPosition: {x: -0.000033585555, y: -0.000919627}
m_SizeDelta: {x: 0, y: 1292.4} m_SizeDelta: {x: 0, y: 1292.4}
m_Pivot: {x: 0, y: 1} m_Pivot: {x: 0, y: 1}
--- !u!114 &5343428874745105376 --- !u!114 &5343428874745105376
@ -6602,7 +6602,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 2.0921, y: 2.7802} m_AnchoredPosition: {x: 2.092102, y: 2.780201}
m_SizeDelta: {x: -71.9134, y: -56.7932} m_SizeDelta: {x: -71.9134, y: -56.7932}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4273565244923817053 --- !u!222 &4273565244923817053
@ -9982,7 +9982,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 290, y: -88.70279} m_AnchoredPosition: {x: 289.99997, y: -88.70279}
m_SizeDelta: {x: 281.327, y: 209.0494} m_SizeDelta: {x: 281.327, y: 209.0494}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &4908524071717043739 --- !u!114 &4908524071717043739
@ -10417,7 +10417,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -115.1, y: 0.00005340576} m_AnchoredPosition: {x: -115.100006, y: 0.00005340576}
m_SizeDelta: {x: 198.7485, y: 39.4938} m_SizeDelta: {x: 198.7485, y: 39.4938}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7362209414838379860 --- !u!222 &7362209414838379860

View File

@ -83,6 +83,20 @@ namespace GameLogic
actor.AddPlayer(data); actor.AddPlayer(data);
return; return;
} }
else if (int.TryParse(number, out int index))
{
// 超过最大数
if (index > EventConts.MaxPlayerIds)
{
index = UnityEngine.Random.Range(2, EventConts.MaxPlayerIds);
}
var actor = DataGameSceneManager.Instance.GetTeamActor(index.ToString());
//actor.AddUnitPlayer(data);
data = DataGameSceneManager.Instance.CreateUnitPlayerData(protCustMessageData, index);
actor.AddPlayer(data);
}
} }
} }
else else

View File

@ -2,6 +2,7 @@ using System;
using System.Collections; using System.Collections;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using TEngine;
using UnityEngine; using UnityEngine;
using UnityEngine.Events; using UnityEngine.Events;
@ -396,12 +397,13 @@ namespace DanMuHelper.Tools
width = pixelWidthOfCurrentScreen; width = pixelWidthOfCurrentScreen;
height = Mathf.RoundToInt(pixelWidthOfCurrentScreen / aspect); height = Mathf.RoundToInt(pixelWidthOfCurrentScreen / aspect);
} }
Log.Debug("宽高比 {0}{1}", width, height);
Screen.SetResolution(width, height, true); Screen.SetResolution(width, height, true);
resolutionChangedFunc(); resolutionChangedFunc();
} }
else if (!Screen.fullScreen && wasFullscreenLastFrame) else if (!Screen.fullScreen && wasFullscreenLastFrame)
{ {
Log.Debug("宽高比 {0}{1}", setWidth, setHeight);
// 从全屏切换到检测到的窗口。设置上一个窗口的分辨率。 // 从全屏切换到检测到的窗口。设置上一个窗口的分辨率。
Screen.SetResolution(setWidth, setHeight, false); Screen.SetResolution(setWidth, setHeight, false);
resolutionChangedFunc(); resolutionChangedFunc();
@ -416,7 +418,7 @@ namespace DanMuHelper.Tools
//根据高度设置宽度因为Aero Snap不会触发WM_SIZING。 //根据高度设置宽度因为Aero Snap不会触发WM_SIZING。
setHeight = Screen.height; setHeight = Screen.height;
setWidth = Mathf.RoundToInt(Screen.height * aspect); setWidth = Mathf.RoundToInt(Screen.height * aspect);
Log.Debug("宽高比 {0}{1}", setWidth, setHeight);
Screen.SetResolution(setWidth, setHeight, Screen.fullScreen); Screen.SetResolution(setWidth, setHeight, Screen.fullScreen);
resolutionChangedFunc(); resolutionChangedFunc();
} }
@ -438,6 +440,7 @@ namespace DanMuHelper.Tools
{ {
setWidth = Screen.width; setWidth = Screen.width;
setHeight = Screen.height; setHeight = Screen.height;
Log.Debug("宽高比 {0}{1}", setWidth, setHeight);
resolutionChangedFunc(); resolutionChangedFunc();
} }
#endif #endif

View File

@ -1090,11 +1090,11 @@ MonoBehaviour:
resolutionChangedEvent: resolutionChangedEvent:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
allowFullscreen: 0 allowFullscreen: 1
aspectRatioWidth: 9 aspectRatioWidth: 9
aspectRatioHeight: 16 aspectRatioHeight: 16
minWidthPixel: 506 minWidthPixel: 680
minHeightPixel: 900 minHeightPixel: 1280
maxWidthPixel: 2250 maxWidthPixel: 2250
maxHeightPixel: 4000 maxHeightPixel: 4000
--- !u!4 &1402821813 --- !u!4 &1402821813