修复bug

This commit is contained in:
ALIENJACK\alien 2024-11-08 16:23:26 +08:00
parent 4bba088077
commit 357936866d
12 changed files with 1774 additions and 88 deletions

View File

@ -1210,6 +1210,14 @@ PrefabInstance:
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1746243318642131728, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1746243318642131728, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1746243318642131728, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
@ -1218,6 +1226,54 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1777012203952456443, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1777012203952456443, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1777012203952456443, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1777012203952456443, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1777012203952456443, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1777012203952456443, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2005113594707322973, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2005113594707322973, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2005113594707322973, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2005113594707322973, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2005113594707322973, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2005113594707322973, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4195056312044822544, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_AnchorMax.y
value: 0
@ -1226,6 +1282,14 @@ PrefabInstance:
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4195056312044822544, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4195056312044822544, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4195056312044822544, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
@ -1322,6 +1386,34 @@ PrefabInstance:
propertyPath: m_Name
value: XMBTopGroup
objectReference: {fileID: 0}
- target: {fileID: 7158194035478552859, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7158194035478552859, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7158194035478552859, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7158194035478552859, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7158194035478552859, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7158194035478552859, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8076460496124549573, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
propertyPath: m_ChildControlHeight
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3b211f31b55a35e44a8fa38666f63383, type: 3}
--- !u!224 &7093465798161333352 stripped

View File

@ -1,5 +1,101 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2950463686674914991
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1777012203952456443}
- component: {fileID: 283040890266611972}
- component: {fileID: 8647257958016890797}
- component: {fileID: 8755531529332700427}
m_Layer: 5
m_Name: Icon
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1777012203952456443
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2950463686674914991}
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_Children: []
m_Father: {fileID: 2005113594707322973}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &283040890266611972
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2950463686674914991}
m_CullTransparentMesh: 1
--- !u!114 &8647257958016890797
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2950463686674914991}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: b1d6f002b5917d74ba29bec4941d451c, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &8755531529332700427
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2950463686674914991}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 60
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &3494385166013178536
GameObject:
m_ObjectHideFlags: 0
@ -111,7 +207,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 2.4864, y: 1.9341}
m_AnchoredPosition: {x: 2.4864044, y: 1.9340992}
m_SizeDelta: {x: -32.6004, y: -34.8105}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &5495363713580354324
@ -169,6 +265,7 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 2005113594707322973}
- {fileID: 4195056312044822544}
- {fileID: 1746243318642131728}
m_Father: {fileID: 0}
@ -196,11 +293,11 @@ MonoBehaviour:
m_Right: 2
m_Top: 8
m_Bottom: 0
m_ChildAlignment: 2
m_Spacing: 20
m_ChildAlignment: 5
m_Spacing: 10
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 0
m_ChildControlWidth: 1
m_ChildControlHeight: 0
m_ChildScaleWidth: 1
m_ChildScaleHeight: 1
@ -217,11 +314,12 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1090d0b1aa26fc64dbbf646b016dec5f, type: 3}
m_Name:
m_EditorClassIdentifier:
txtDateTime: {fileID: 0}
imgPowerRoot: {fileID: 0}
imgPower1: {fileID: 0}
imgPower2: {fileID: 0}
imgPower3: {fileID: 0}
txtDateTime: {fileID: 8650011087057002385}
imgPowerRoot: {fileID: 9044910433836903452}
imgPower1: {fileID: 6101511842922175030}
imgPower2: {fileID: 7232861150095392420}
imgPower3: {fileID: 6694955234077232327}
DelayValue: {fileID: 6486398873987280650}
--- !u!1 &5629957813601835122
GameObject:
m_ObjectHideFlags: 0
@ -233,6 +331,7 @@ GameObject:
- component: {fileID: 1746243318642131728}
- component: {fileID: 3344265524197250960}
- component: {fileID: 9044910433836903452}
- component: {fileID: 1514684931291976970}
m_Layer: 5
m_Name: imgPowerRoot
m_TagString: Untagged
@ -253,12 +352,12 @@ RectTransform:
m_Children:
- {fileID: 1735688216191931001}
m_Father: {fileID: 5353336693430589123}
m_RootOrder: 1
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 78.5143, y: 57.882812}
m_SizeDelta: {x: 0, y: 60.7053}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3344265524197250960
CanvasRenderer:
@ -298,6 +397,26 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &1514684931291976970
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5629957813601835122}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 80
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &6140890295709974557
GameObject:
m_ObjectHideFlags: 0
@ -373,6 +492,70 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &7520417476292222346
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2005113594707322973}
- component: {fileID: 2144786247258680794}
m_Layer: 5
m_Name: NetDelay
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2005113594707322973
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7520417476292222346}
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_Children:
- {fileID: 1777012203952456443}
- {fileID: 7158194035478552859}
m_Father: {fileID: 5353336693430589123}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2144786247258680794
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7520417476292222346}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 20
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 4
m_Spacing: 0
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 1
m_ChildControlHeight: 1
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!1 &7995691286082973795
GameObject:
m_ObjectHideFlags: 0
@ -403,12 +586,12 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 5353336693430589123}
m_RootOrder: 0
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 254.3097, y: 53}
m_SizeDelta: {x: 0, y: 53}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2824301762730404849
CanvasRenderer:
@ -452,6 +635,85 @@ MonoBehaviour:
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 9/12 22:42
--- !u!1 &8128211952025970945
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7158194035478552859}
- component: {fileID: 4034383014465403301}
- component: {fileID: 6486398873987280650}
m_Layer: 5
m_Name: DelayValue
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7158194035478552859
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8128211952025970945}
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_Children: []
m_Father: {fileID: 2005113594707322973}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4034383014465403301
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8128211952025970945}
m_CullTransparentMesh: 1
--- !u!114 &6486398873987280650
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8128211952025970945}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 44
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 44
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 123ms
--- !u!1 &8186751534006508635
GameObject:
m_ObjectHideFlags: 0

View File

@ -5,7 +5,6 @@ using AxibugEmuOnline.Client.Network;
using AxibugProtobuf;
using AxiReplay;
using Google.Protobuf;
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -68,6 +68,9 @@ namespace AxibugEmuOnline.Client
var screenBuffer = NesCore.ppu.GetScreenPtr();
var lineColorMode = NesCore.ppu.GetLineColorMode();
VideoProvider.SetDrawData(screenBuffer, lineColorMode, 256, 240);
var state= NesCore.GetState();
NesCore.LoadState(state);
}
}

View File

@ -23,6 +23,7 @@ namespace AxibugEmuOnline.Client
Stopwatch sw = Stopwatch.StartNew();
object state = m_gameUI.Core.GetState();
m_gameUI.SaveQuickState(state);
sw.Stop();
App.log.Info($"{m_gameUI.RomFile.Platform}====>获取快照耗时:{sw.Elapsed.TotalMilliseconds}ms");

View File

@ -1,4 +1,6 @@
using AxibugEmuOnline.Client.ClientCore;
using AxibugEmuOnline.Client.Common;
using UnityEngine;
namespace AxibugEmuOnline.Client
{
@ -24,12 +26,14 @@ namespace AxibugEmuOnline.Client
if (App.roomMgr.IsHost)
{
var stateRaw = m_inGameUI.Core.GetStateBytes();
Debug.Log($"快照上报:{Helper.FileMD5Hash(stateRaw)}");
App.roomMgr.SendHostRaw(stateRaw);
}
break;
//加载存档并发送Ready通知
case 1:
PauseCore();
Debug.Log($"快照加载:{Helper.FileMD5Hash(App.roomMgr.RawData)}");
m_inGameUI.Core.LoadStateFromBytes(App.roomMgr.RawData);
App.roomMgr.SendRoomPlayerReady();
break;

View File

@ -222,8 +222,9 @@ namespace AxibugEmuOnline.Client
protected override bool OnCmdEnter()
{
m_runtimeMenuItems[SelectIndex].OnExecute();
var executer = m_runtimeMenuItems[SelectIndex];
Hide();
executer.OnExecute();
return true;
}
}

View File

@ -19,74 +19,35 @@ Material:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _PalTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Frequency1: 2
- _Frequency2: 2.1
- _MaxHeight1: 0.5
- _MaxHeight2: 0.54
- _MidHeight1: 0.4
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _MidHeight2: 0.42
- _Power1: 50
- _Power2: 50
- _Speed1: 0.4
- _Speed2: 0.3
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _UseUIAlphaClip: 0
- _ZWrite: 1
- _WaveFrequency1: 4
- _WaveMaxHeight1: 0.02
- _WaveMidHeight1: 0
- _WaveSpd1: 0.02
- _WaveX1: 0
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color1: {r: 0, g: 0.4, b: 1, a: 1}
- _Color2: {r: 0, g: 0.7, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@ -11,18 +11,12 @@ public class XMBTopGroup : MonoBehaviour
public Image imgPower1;
public Image imgPower2;
public Image imgPower3;
void Awake()
{
txtDateTime = this.transform.Find("txtDateTime").GetComponent<Text>();
imgPowerRoot = this.transform.Find("imgPowerRoot").GetComponent<Image>();
imgPower1 = imgPowerRoot.transform.Find("PowerGroup/imgPower1").GetComponent<Image>();
imgPower2 = imgPowerRoot.transform.Find("PowerGroup/imgPower1").GetComponent<Image>();
imgPower3 = imgPowerRoot.transform.Find("PowerGroup/imgPower1").GetComponent<Image>();
}
public Text DelayValue;
void OnEnable()
{
TickLoop.LoopAction_1s += RefreshAll;
RefreshAll();
}
void OnDisable()
@ -34,8 +28,22 @@ public class XMBTopGroup : MonoBehaviour
{
RefreshTime();
RefreshPower();
}
RefreshDelay();
}
private void RefreshDelay()
{
if (App.user == null)
{
DelayValue.text = $"-";
return;
}
if (App.user.IsLoggedIn)
DelayValue.text = $"{App.tickLoop.AveNetDelay * 1000:0}ms";
else
DelayValue.text = "-";
}
void RefreshTime()
{
txtDateTime.text = DateTime.Now.ToString("MM/dd HH:mm");

View File

@ -1832,11 +1832,11 @@ namespace VirtualNes.Core
state.ctrBLOCK.BlockVersion = 0x0100;
state.ctrBLOCK.BlockSize = state.ctr.GetSize();
state.ctr.pad1bit = pad.pad1bit;
state.ctr.pad2bit = pad.pad2bit;
state.ctr.pad3bit = pad.pad3bit;
state.ctr.pad4bit = pad.pad4bit;
state.ctr.strobe = (byte)(pad.GetStrobe() ? 0xFF : 0);
state.ctr.pad1bit = 0;
state.ctr.pad2bit = 0;
state.ctr.pad3bit = 0;
state.ctr.pad4bit = 0;
state.ctr.strobe = 0;
}
//SND STATE

View File

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Runtime.Serialization.Formatters.Binary;
using System.Collections.Generic;
namespace VirtualNes.Core
{
@ -138,16 +134,25 @@ namespace VirtualNes.Core
ram.LoadState(buffer);
if (WRAM_Length > 0)
WRAM = buffer.Read_bytes(WRAM_Length);
else
WRAM = new byte[0];
break;
case "MMU DATA":
mmuBLOCK = block;
mmu.LoadState(buffer);
if (CPU_MEM_BANK_Length > 0)
CPU_MEM_BANK = new List<byte>(buffer.Read_bytes(CPU_MEM_BANK_Length));
else
CPU_MEM_BANK = new List<byte>();
if (VRAM_Length > 0)
VRAM = buffer.Read_bytes(VRAM_Length);
else
VRAM = new byte[0];
if (CRAM_Length > 0)
CRAM = new List<byte>(buffer.Read_bytes(CRAM_Length));
else
CRAM = new List<byte>();
break;
case "MMC DATA":
mmcBLOCK = block;
@ -166,6 +171,8 @@ namespace VirtualNes.Core
dsk.LoadState(buffer);
if (dskdata_Length > 0)
dskdata = new List<uint>(buffer.Read_uints(dskdata_Length));
else
dskdata = new List<uint>();
break;
case "EXCTRDAT":
exctrBLOCK = block;