|
@ -51,7 +51,6 @@ namespace Net.Like.Xue.Tokyo.GameService
|
|||
|
||||
if (string.IsNullOrEmpty(portalNode.MapName?.Value) is false)
|
||||
{
|
||||
_waitPlayer?.TrySetCanceled();
|
||||
_waitPlayer = new();
|
||||
await _gameMapService.StartMapAsync(portalNode.MapName.Value);
|
||||
|
||||
|
|
|
@ -166,6 +166,7 @@ namespace Net.Like.Xue.Tokyo
|
|||
if (go)
|
||||
Object.Destroy(go);
|
||||
}
|
||||
_entities.Clear();
|
||||
_healthService.OnHealthChanged-=OnHealthChanged;
|
||||
}
|
||||
private void OnHealthChanged(int arg1, int arg2, int arg3, object arg4)
|
||||
|
|
|
@ -26,10 +26,9 @@
|
|||
<ui:Label tabindex="-1" text="100" parse-escape-sequences="true" display-tooltip-when-elided="true" class="tl" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; -unity-text-align: middle-center; -unity-font-style: bold;" />
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
<BITKit.UX.TabBar tabs="主页,记录" name="menu-tab" CurrentTab="0" style="position: absolute; left: 64px; right: 64px; top: 49px; flex-direction: row; justify-content: center;" />
|
||||
<BITKit.UX.TabContainer TabPath="menu-tab" style="position: absolute; left: 32px; top: 220px; right: 32px; bottom: 32px;">
|
||||
<ui:Instance template="ux_menu_home" name="ux_menu_home" style="flex-grow: 1;" />
|
||||
<ui:VisualElement style="flex-grow: 1;" />
|
||||
<ui:VisualElement style="flex-grow: 1;" />
|
||||
</BITKit.UX.TabContainer>
|
||||
<BITKit.UX.TabBar tabs="主页,记录" name="menu-tab" CurrentTab="0" allowFocus="false" style="position: absolute; left: 64px; right: 64px; top: 49px; flex-direction: row; justify-content: center;" />
|
||||
</ui:UXML>
|
||||
|
|
Before Width: | Height: | Size: 398 KiB After Width: | Height: | Size: 648 KiB |
Before Width: | Height: | Size: 613 KiB After Width: | Height: | Size: 786 KiB |
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 188 KiB |
Before Width: | Height: | Size: 741 KiB After Width: | Height: | Size: 2.8 MiB |
Before Width: | Height: | Size: 898 KiB After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 831 KiB After Width: | Height: | Size: 823 KiB |
Before Width: | Height: | Size: 415 KiB After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.6 MiB |
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.9 MiB |
Before Width: | Height: | Size: 826 KiB After Width: | Height: | Size: 971 KiB |
Before Width: | Height: | Size: 944 KiB After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 424 KiB |
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 404 KiB |
Before Width: | Height: | Size: 4.6 MiB After Width: | Height: | Size: 5.4 MiB |
Before Width: | Height: | Size: 473 KiB After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 274 KiB After Width: | Height: | Size: 960 KiB |
Before Width: | Height: | Size: 506 KiB After Width: | Height: | Size: 647 KiB |
After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 801 KiB After Width: | Height: | Size: 1012 KiB |
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 2.1 MiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 2.4 MiB After Width: | Height: | Size: 3.0 MiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 232 KiB |
Before Width: | Height: | Size: 518 KiB After Width: | Height: | Size: 950 KiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 2.2 MiB |
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 2.3 MiB |
Before Width: | Height: | Size: 417 KiB After Width: | Height: | Size: 2.5 MiB |
Before Width: | Height: | Size: 393 KiB After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 559 KiB After Width: | Height: | Size: 933 KiB |
Before Width: | Height: | Size: 474 KiB After Width: | Height: | Size: 1.6 MiB |
|
@ -25,50 +25,48 @@ namespace BITKit.UX
|
|||
public new class UxmlFactory : UxmlFactory<TabContainer, UxmlTraits> { }
|
||||
public TabContainer()
|
||||
{
|
||||
RegisterCallback<AttachToPanelEvent>(OnAttachToPanel);
|
||||
RegisterCallback<DetachFromPanelEvent>(OnDetachFromPanel);
|
||||
RegisterCallback<GeometryChangedEvent>(OnGeometryChanged);
|
||||
RegisterCallback<AttachToPanelEvent>(RebuildOnEvent);
|
||||
RegisterCallback<DetachFromPanelEvent>(RebuildOnEvent);
|
||||
RegisterCallback<GeometryChangedEvent>(RebuildOnEvent);
|
||||
RegisterCallback<BlurEvent>(RebuildOnEvent);
|
||||
RegisterCallback<FocusEvent>(RebuildOnEvent);
|
||||
}
|
||||
|
||||
private void OnGeometryChanged(GeometryChangedEvent evt)
|
||||
{
|
||||
Rebuild();
|
||||
}
|
||||
|
||||
public string TabPath
|
||||
{
|
||||
get=>_tabPath;
|
||||
set
|
||||
{
|
||||
_tabPath = value;
|
||||
Rebuild();
|
||||
}
|
||||
}
|
||||
private string _tabPath;
|
||||
private TabBar _tabBar;
|
||||
private int _index;
|
||||
private void OnDetachFromPanel(DetachFromPanelEvent evt)
|
||||
private void RebuildOnEvent<T>(T evt)
|
||||
{
|
||||
Rebuild();
|
||||
}
|
||||
private void OnAttachToPanel(AttachToPanelEvent evt)
|
||||
{
|
||||
Rebuild();
|
||||
}
|
||||
|
||||
private void Rebuild()
|
||||
{
|
||||
if (_tabBar is not null)
|
||||
{
|
||||
_tabBar.OnTabChanged -= OnTabChanged;
|
||||
}
|
||||
_tabBar = panel.visualTree.Q<TabBar>(TabPath);
|
||||
var p = parent;
|
||||
while (p is not null)
|
||||
{
|
||||
_tabBar = p.Q<TabBar>(TabPath);
|
||||
if (_tabBar is not null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
p = p.parent;
|
||||
}
|
||||
if (_tabBar is not null)
|
||||
{
|
||||
_tabBar.OnTabChanged += OnTabChanged;
|
||||
}
|
||||
if (_index <=0)
|
||||
{
|
||||
_index = 1;
|
||||
_index = _tabBar.CurrentTab;
|
||||
}
|
||||
OnTabChanged(_index);
|
||||
}
|
||||
|
@ -76,7 +74,7 @@ namespace BITKit.UX
|
|||
private void OnTabChanged(int obj)
|
||||
{
|
||||
_index = obj;
|
||||
if (childCount <= 0) return;
|
||||
if (childCount < 0) return;
|
||||
for (var i = 0; i < childCount; i++)
|
||||
{
|
||||
var visualElement = this[i];
|
||||
|
|
|
@ -504,3 +504,7 @@ Button.clear {
|
|||
border-top-color: rgba(0, 0, 0, 0);
|
||||
border-bottom-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
TabContainer > * {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
|
|
@ -210,11 +210,11 @@ Material:
|
|||
- _HorizonCloudStart: -0.01
|
||||
- _HorizonCloudStartPosition: -0.01
|
||||
- _HorizonCloudStep: 25
|
||||
- _HorizonExponent: 3.7988865
|
||||
- _HorizonExponent: 3.8273911
|
||||
- _HorizonStep: 1000
|
||||
- _HorizonThickness: 1
|
||||
- _MoonGlow: 0.236
|
||||
- _MoonLightIntensity: 0.0000098453875
|
||||
- _MoonLightIntensity: 0.00001139632
|
||||
- _MoonSize: 0.07
|
||||
- _MoonSoftEdge: 0.22
|
||||
- _OverheadCloudAltitude: 1000
|
||||
|
@ -223,8 +223,8 @@ Material:
|
|||
- _OverheadCloudFlowDirectionZ: 1
|
||||
- _OverheadCloudFlowX: 1
|
||||
- _OverheadCloudFlowZ: 1
|
||||
- _OverheadCloudRemapMax: 1.800091
|
||||
- _OverheadCloudRemapMin: 0.13612132
|
||||
- _OverheadCloudRemapMax: 1.8452492
|
||||
- _OverheadCloudRemapMin: 0.13822451
|
||||
- _OverheadCloudSize: 10
|
||||
- _OverheadCloudStep: 2
|
||||
- _StarsDensity0: 0.4
|
||||
|
@ -245,26 +245,26 @@ Material:
|
|||
- _StarsTwinkle1: 6
|
||||
- _StarsTwinkle2: 2
|
||||
- _SunGlow: 0.45
|
||||
- _SunLightIntensity: 0.4233988
|
||||
- _SunLightIntensity: 0.43717447
|
||||
- _SunSize: 0.07
|
||||
- _SunSoftEdge: 0.5
|
||||
m_Colors:
|
||||
- _DetailOverlayColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _DetailOverlayTintColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _FogColor: {r: 0.8490566, g: 0.69017035, b: 0.6287825, a: 1}
|
||||
- _GroundColor: {r: 0.42867428, g: 0.4124601, b: 0.4438662, a: 1}
|
||||
- _GroundColor: {r: 0.42987296, g: 0.41393125, b: 0.44480956, a: 1}
|
||||
- _HorizonCloudColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _HorizonColor: {r: 0.89745224, g: 0.8769851, b: 0.7890967, a: 1}
|
||||
- _HorizonColor: {r: 0.89692837, g: 0.87857676, b: 0.79214877, a: 1}
|
||||
- _MoonColor: {r: 1, g: 1, b: 1, a: 0}
|
||||
- _MoonDirection: {r: 0.24413833, g: 0.4449624, b: -0.8616293, a: 0}
|
||||
- _MoonDirection: {r: 0.25133455, g: 0.4580781, b: -0.85264057, a: 0}
|
||||
- _MoonLightColor: {r: 0.8431373, g: 0.9843138, b: 1, a: 1}
|
||||
- _OverheadCloudColor: {r: 1, g: 1, b: 1, a: 0.99058735}
|
||||
- _SkyColor: {r: 0.23968326, g: 0.4430076, b: 0.6904413, a: 1}
|
||||
- _OverheadCloudColor: {r: 1, g: 1, b: 1, a: 0.99229914}
|
||||
- _SkyColor: {r: 0.24189956, g: 0.44873634, b: 0.69703615, a: 1}
|
||||
- _StarsColor0: {r: 0.96470594, g: 0.9450981, b: 0.76470596, a: 1}
|
||||
- _StarsColor1: {r: 1, g: 0.5294118, b: 0.93725497, a: 1}
|
||||
- _StarsColor2: {r: 0, g: 0.92549026, b: 1, a: 1}
|
||||
- _SunColor: {r: 0.9716981, g: 0.9248151, b: 0.8473489, a: 1}
|
||||
- _SunDirection: {r: -0.45199794, g: -0.23085254, b: 0.86162925, a: 0}
|
||||
- _SunColor: {r: 0.9716981, g: 0.92477906, b: 0.8472319, a: 1}
|
||||
- _SunDirection: {r: -0.46532097, g: -0.23765716, b: 0.8526403, a: 0}
|
||||
- _SunLightColor: {r: 1, g: 0.99511117, b: 0.8632076, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!21 &8993251732621375409
|
||||
|
|