Compare commits
No commits in common. "3927b897a297e09bf9d37c7ae9172f64d05601d8" and "d567cd9e7123de5343fa1174468f15f59fe35ee3" have entirely different histories.
3927b897a2
...
d567cd9e71
@ -1,50 +0,0 @@
|
|||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!1 &1963501579241001457
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1963501579241001456}
|
|
||||||
- component: {fileID: 6933127467485204299}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: InGameUI
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &1963501579241001456
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1963501579241001457}
|
|
||||||
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: 0}
|
|
||||||
m_RootOrder: 0
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!114 &6933127467485204299
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1963501579241001457}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 6c4cbb81b8f22ed499382b6eb9e6299e, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 334eee9f85f308347844f8f5e99167c3
|
|
||||||
PrefabImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -85,9 +85,9 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: fb4f275956ba18440b061e92278f13cd, type: 3}
|
m_Script: {fileID: 11500000, guid: fb4f275956ba18440b061e92278f13cd, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
m_menuItemRoot: {fileID: 7102897325704768026}
|
||||||
PulseInvoke_Delay: 0.4
|
PulseInvoke_Delay: 0.4
|
||||||
PulseInvoke_Interval: 0.05
|
PulseInvoke_Interval: 0.05
|
||||||
m_menuItemRoot: {fileID: 7102897325704768026}
|
|
||||||
GroupRoot: {fileID: 5247317738185020566}
|
GroupRoot: {fileID: 5247317738185020566}
|
||||||
Template: {fileID: 2502609279043838113, guid: ece591129eb9bcc48bd83ec153c98018, type: 3}
|
Template: {fileID: 2502609279043838113, guid: ece591129eb9bcc48bd83ec153c98018, type: 3}
|
||||||
MenuSetting:
|
MenuSetting:
|
||||||
@ -227,7 +227,7 @@ RectTransform:
|
|||||||
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: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 0.00012207031, y: 0}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &1639091783724093861
|
--- !u!222 &1639091783724093861
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
@ -319,7 +319,6 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
MainMenuRoot: {fileID: 1924338507}
|
MainMenuRoot: {fileID: 1924338507}
|
||||||
MainMenu: {fileID: 4533431376032812611}
|
MainMenu: {fileID: 4533431376032812611}
|
||||||
BG: {fileID: 1639091783724093860}
|
|
||||||
m_detailLayoutPosition: {x: 55, y: -140}
|
m_detailLayoutPosition: {x: 55, y: -140}
|
||||||
m_LayoutChangeSpeed: 1000
|
m_LayoutChangeSpeed: 1000
|
||||||
--- !u!1 &3732356966700017678
|
--- !u!1 &3732356966700017678
|
||||||
|
@ -377,7 +377,7 @@ MonoBehaviour:
|
|||||||
m_Right: 20
|
m_Right: 20
|
||||||
m_Top: 20
|
m_Top: 20
|
||||||
m_Bottom: 20
|
m_Bottom: 20
|
||||||
m_ChildAlignment: 3
|
m_ChildAlignment: 4
|
||||||
m_Spacing: 12
|
m_Spacing: 12
|
||||||
m_ChildForceExpandWidth: 0
|
m_ChildForceExpandWidth: 0
|
||||||
m_ChildForceExpandHeight: 0
|
m_ChildForceExpandHeight: 0
|
||||||
@ -494,7 +494,7 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_IgnoreLayout: 0
|
m_IgnoreLayout: 0
|
||||||
m_MinWidth: 300
|
m_MinWidth: 400
|
||||||
m_MinHeight: -1
|
m_MinHeight: -1
|
||||||
m_PreferredWidth: -1
|
m_PreferredWidth: -1
|
||||||
m_PreferredHeight: -1
|
m_PreferredHeight: -1
|
||||||
|
@ -1107,11 +1107,6 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
|
||||||
--- !u!224 &1318590597 stripped
|
|
||||||
RectTransform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 1963501580473600373}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!1 &1335662458
|
--- !u!1 &1335662458
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -1310,7 +1305,7 @@ Canvas:
|
|||||||
m_SortingBucketNormalizedSize: 0
|
m_SortingBucketNormalizedSize: 0
|
||||||
m_AdditionalShaderChannelsFlag: 1
|
m_AdditionalShaderChannelsFlag: 1
|
||||||
m_SortingLayerID: 0
|
m_SortingLayerID: 0
|
||||||
m_SortingOrder: 1
|
m_SortingOrder: 0
|
||||||
m_TargetDisplay: 0
|
m_TargetDisplay: 0
|
||||||
--- !u!224 &1599240741
|
--- !u!224 &1599240741
|
||||||
RectTransform:
|
RectTransform:
|
||||||
@ -1325,7 +1320,6 @@ RectTransform:
|
|||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 1983793178}
|
- {fileID: 1983793178}
|
||||||
- {fileID: 246947326}
|
- {fileID: 246947326}
|
||||||
- {fileID: 1318590597}
|
|
||||||
m_Father: {fileID: 1335662459}
|
m_Father: {fileID: 1335662459}
|
||||||
m_RootOrder: 3
|
m_RootOrder: 3
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
@ -1422,103 +1416,6 @@ RectTransform:
|
|||||||
m_CorrespondingSourceObject: {fileID: 1639091784002085428, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
|
m_CorrespondingSourceObject: {fileID: 1639091784002085428, guid: 450328d5a907c8249a60bc3980ba66f6, type: 3}
|
||||||
m_PrefabInstance: {fileID: 730698711}
|
m_PrefabInstance: {fileID: 730698711}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!1001 &1963501580473600373
|
|
||||||
PrefabInstance:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Modification:
|
|
||||||
m_TransformParent: {fileID: 1599240741}
|
|
||||||
m_Modifications:
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_Pivot.x
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_Pivot.y
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_RootOrder
|
|
||||||
value: 2
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.x
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.y
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_SizeDelta.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_SizeDelta.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.w
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001456, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1963501579241001457, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
propertyPath: m_Name
|
|
||||||
value: InGameUI
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
m_RemovedComponents: []
|
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 334eee9f85f308347844f8f5e99167c3, type: 3}
|
|
||||||
--- !u!1001 &4478785627007410708
|
--- !u!1001 &4478785627007410708
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -1690,17 +1587,5 @@ PrefabInstance:
|
|||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 7896211045508186424, guid: d3c2508a55398a24db5d68f68d2702ea, type: 3}
|
|
||||||
propertyPath: m_Color.b
|
|
||||||
value: 0.3773585
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 7896211045508186424, guid: d3c2508a55398a24db5d68f68d2702ea, type: 3}
|
|
||||||
propertyPath: m_Color.g
|
|
||||||
value: 0.16444026
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 7896211045508186424, guid: d3c2508a55398a24db5d68f68d2702ea, type: 3}
|
|
||||||
propertyPath: m_Color.r
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: d3c2508a55398a24db5d68f68d2702ea, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: d3c2508a55398a24db5d68f68d2702ea, type: 3}
|
||||||
|
@ -136,5 +136,34 @@ namespace AxibugEmuOnline.Client.ClientCore
|
|||||||
Debug.Log("[AxibugEmuOnline]:" + msg);
|
Debug.Log("[AxibugEmuOnline]:" + msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static RomFile m_currentGame;
|
||||||
|
public static void BeginGame(RomFile romFile)
|
||||||
|
{
|
||||||
|
if (m_currentGame != null) return;
|
||||||
|
|
||||||
|
m_currentGame = romFile;
|
||||||
|
|
||||||
|
switch (romFile.Platform)
|
||||||
|
{
|
||||||
|
case EnumPlatform.NES:
|
||||||
|
SceneLoader.BeginLoad("Scene/Emu_NES", () =>
|
||||||
|
{
|
||||||
|
LaunchUI.Instance.HideMainMenu();
|
||||||
|
var nesEmu = GameObject.FindObjectOfType<NesEmulator>();
|
||||||
|
nesEmu.StartGame(romFile);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void StopGame()
|
||||||
|
{
|
||||||
|
if (m_currentGame == null) return;
|
||||||
|
|
||||||
|
SceneLoader.BeginLoad("Scene/AxibugEmuOnline.Client", () =>
|
||||||
|
{
|
||||||
|
LaunchUI.Instance.ShowMainMenu();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,38 +1,7 @@
|
|||||||
using AxibugEmuOnline.Client.ClientCore;
|
namespace AxibugEmuOnline.Client.Manager
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client.Manager
|
|
||||||
{
|
{
|
||||||
public class AppEmu
|
public class AppEmu
|
||||||
{
|
{
|
||||||
public void BeginGame(RomFile romFile)
|
|
||||||
{
|
|
||||||
if (InGameUI.Instance.Enable) return;
|
|
||||||
|
|
||||||
switch (romFile.Platform)
|
|
||||||
{
|
|
||||||
case EnumPlatform.NES:
|
|
||||||
App.SceneLoader.BeginLoad("Scene/Emu_NES", () =>
|
|
||||||
{
|
|
||||||
var nesEmu = GameObject.FindObjectOfType<NesEmulator>();
|
|
||||||
nesEmu.StartGame(romFile);
|
|
||||||
|
|
||||||
LaunchUI.Instance.HideMainMenu();
|
|
||||||
InGameUI.Instance.Show(romFile, nesEmu);
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void StopGame()
|
|
||||||
{
|
|
||||||
if (!InGameUI.Instance.enabled) return;
|
|
||||||
|
|
||||||
App.SceneLoader.BeginLoad("Scene/AxibugEmuOnline.Client", () =>
|
|
||||||
{
|
|
||||||
InGameUI.Instance.Hide();
|
|
||||||
LaunchUI.Instance.ShowMainMenu();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,14 +28,6 @@ namespace AxibugEmuOnline.Client
|
|||||||
|
|
||||||
NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdPing, OnCmdPing);
|
NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdPing, OnCmdPing);
|
||||||
NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdPong, OnCmdPong);
|
NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdPong, OnCmdPong);
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
|
||||||
UnityEditor.EditorApplication.playModeStateChanged += (state) =>
|
|
||||||
{
|
|
||||||
if (state == UnityEditor.PlayModeStateChange.ExitingPlayMode)
|
|
||||||
OnApplicationQuit();
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
float LastPingTime;
|
float LastPingTime;
|
||||||
private void Update()
|
private void Update()
|
||||||
@ -54,11 +46,11 @@ namespace AxibugEmuOnline.Client
|
|||||||
{
|
{
|
||||||
App.log.Debug("OnApplicationQuit");
|
App.log.Debug("OnApplicationQuit");
|
||||||
App.network.bAutoReConnect = false;
|
App.network.bAutoReConnect = false;
|
||||||
|
|
||||||
if (App.network.isConnected)
|
if (App.network.isConnected)
|
||||||
{
|
{
|
||||||
App.network.CloseConntect();
|
App.network.CloseConntect();
|
||||||
}
|
}
|
||||||
|
App.network.CancelReConnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
using AxibugEmuOnline.Client.ClientCore;
|
using UnityEngine;
|
||||||
using VirtualNes.Core.Debug;
|
using VirtualNes.Core.Debug;
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
namespace AxibugEmuOnline.Client
|
||||||
{
|
{
|
||||||
public class CoreDebuger : IDebugerImpl
|
public class CoreDebuger : IDebugerImpl
|
||||||
{
|
{
|
||||||
|
|
||||||
public void Log(string message)
|
public void Log(string message)
|
||||||
{
|
{
|
||||||
App.log.Info(message);
|
Debug.Log(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LogError(string message)
|
public void LogError(string message)
|
||||||
{
|
{
|
||||||
App.log.Error(message);
|
Debug.LogError(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,6 @@ namespace AxibugEmuOnline.Client
|
|||||||
public VideoProvider VideoProvider;
|
public VideoProvider VideoProvider;
|
||||||
public AudioProvider AudioProvider;
|
public AudioProvider AudioProvider;
|
||||||
|
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
Application.targetFrameRate = 60;
|
Application.targetFrameRate = 60;
|
||||||
@ -86,6 +85,13 @@ namespace AxibugEmuOnline.Client
|
|||||||
UnityEditor.EditorUtility.SetDirty(db);
|
UnityEditor.EditorUtility.SetDirty(db);
|
||||||
UnityEditor.AssetDatabase.SaveAssets();
|
UnityEditor.AssetDatabase.SaveAssets();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ContextMenu("GetState")]
|
||||||
|
public void GetState()
|
||||||
|
{
|
||||||
|
var state = NesCore.GetState();
|
||||||
|
var bytes = state.ToBytes();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: a6a09b6a4cf4c2d4f994a13fd7e89d6f, type: 3}
|
m_Script: {fileID: 11500000, guid: a6a09b6a4cf4c2d4f994a13fd7e89d6f, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
NesEmu: {fileID: 4232056521131536012}
|
||||||
m_as: {fileID: 8726979175317618791}
|
m_as: {fileID: 8726979175317618791}
|
||||||
--- !u!82 &8726979175317618791
|
--- !u!82 &8726979175317618791
|
||||||
AudioSource:
|
AudioSource:
|
||||||
@ -257,7 +258,6 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
NesEmu: {fileID: 4232056521131536012}
|
NesEmu: {fileID: 4232056521131536012}
|
||||||
DrawCanvas: {fileID: 4232056520494431724}
|
|
||||||
Image: {fileID: 4232056521759880274}
|
Image: {fileID: 4232056521759880274}
|
||||||
--- !u!1 &4232056520494431712
|
--- !u!1 &4232056520494431712
|
||||||
GameObject:
|
GameObject:
|
||||||
@ -308,7 +308,7 @@ Canvas:
|
|||||||
m_GameObject: {fileID: 4232056520494431712}
|
m_GameObject: {fileID: 4232056520494431712}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_RenderMode: 1
|
m_RenderMode: 0
|
||||||
m_Camera: {fileID: 0}
|
m_Camera: {fileID: 0}
|
||||||
m_PlaneDistance: 100
|
m_PlaneDistance: 100
|
||||||
m_PixelPerfect: 0
|
m_PixelPerfect: 0
|
||||||
@ -409,6 +409,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
VideoProvider: {fileID: 4232056520112715744}
|
VideoProvider: {fileID: 4232056520112715744}
|
||||||
AudioProvider: {fileID: 9003897287163669553}
|
AudioProvider: {fileID: 9003897287163669553}
|
||||||
|
RomName:
|
||||||
--- !u!1 &4232056521759880276
|
--- !u!1 &4232056521759880276
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -8,7 +8,6 @@ namespace AxibugEmuOnline.Client
|
|||||||
public class VideoProvider : MonoBehaviour
|
public class VideoProvider : MonoBehaviour
|
||||||
{
|
{
|
||||||
public NesEmulator NesEmu;
|
public NesEmulator NesEmu;
|
||||||
public Canvas DrawCanvas;
|
|
||||||
|
|
||||||
public RawImage Image;
|
public RawImage Image;
|
||||||
|
|
||||||
@ -19,11 +18,6 @@ namespace AxibugEmuOnline.Client
|
|||||||
|
|
||||||
private Texture2D pPal;
|
private Texture2D pPal;
|
||||||
|
|
||||||
private void Awake()
|
|
||||||
{
|
|
||||||
DrawCanvas.worldCamera = Camera.main;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetDrawData(uint[] screenData, byte[] lineColorMode, int screenWidth, int screenHeight)
|
public void SetDrawData(uint[] screenData, byte[] lineColorMode, int screenWidth, int screenHeight)
|
||||||
{
|
{
|
||||||
if (wrapTex == null)
|
if (wrapTex == null)
|
||||||
|
@ -109,7 +109,15 @@ namespace AxibugEmuOnline.Client.Network
|
|||||||
ReConnect();
|
ReConnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
Thread ReConnectTask = null;
|
CancellationTokenSource cts;
|
||||||
|
Task ReConnectTask;
|
||||||
|
public void CancelReConnect()
|
||||||
|
{
|
||||||
|
App.log.Debug("CancelReConnect");
|
||||||
|
cts?.Cancel();
|
||||||
|
cts = null;
|
||||||
|
ReConnectTask = null;
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 自动重连
|
/// 自动重连
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -117,7 +125,8 @@ namespace AxibugEmuOnline.Client.Network
|
|||||||
{
|
{
|
||||||
if (ReConnectTask != null)
|
if (ReConnectTask != null)
|
||||||
return;
|
return;
|
||||||
ReConnectTask = new Thread(() =>
|
cts = new CancellationTokenSource();
|
||||||
|
ReConnectTask = new Task(() =>
|
||||||
{
|
{
|
||||||
bool bflagDone = false;
|
bool bflagDone = false;
|
||||||
do
|
do
|
||||||
@ -133,17 +142,10 @@ namespace AxibugEmuOnline.Client.Network
|
|||||||
App.log.Info($"触发重连后的自动逻辑!");
|
App.log.Info($"触发重连后的自动逻辑!");
|
||||||
OnReConnected?.Invoke();
|
OnReConnected?.Invoke();
|
||||||
}
|
}
|
||||||
} while (!bflagDone && App.network.bAutoReConnect);
|
} while (!bflagDone);
|
||||||
|
|
||||||
if (!App.network.bAutoReConnect)
|
|
||||||
{
|
|
||||||
if (App.network.isConnected)
|
|
||||||
{
|
|
||||||
App.network.CloseConntect();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ReConnectTask = null;
|
ReConnectTask = null;
|
||||||
});
|
cts = null;
|
||||||
|
}, cts.Token);
|
||||||
ReConnectTask.Start();
|
ReConnectTask.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ MonoImporter:
|
|||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
defaultReferences: []
|
defaultReferences: []
|
||||||
executionOrder: -50
|
executionOrder: 0
|
||||||
icon: {instanceID: 0}
|
icon: {instanceID: 0}
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 6f12f7770db8ede41906b080df9cbec0
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,56 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
|
||||||
{
|
|
||||||
public class InGameUI : CommandExecuter
|
|
||||||
{
|
|
||||||
|
|
||||||
public static InGameUI Instance { get; private set; }
|
|
||||||
|
|
||||||
public RomFile RomFile => m_rom;
|
|
||||||
public override bool Enable => gameObject.activeInHierarchy;
|
|
||||||
private RomFile m_rom;
|
|
||||||
private object m_core;
|
|
||||||
|
|
||||||
private InGameUI_SaveState m_saveMenu;
|
|
||||||
|
|
||||||
protected override void Awake()
|
|
||||||
{
|
|
||||||
Instance = this;
|
|
||||||
gameObject.SetActiveEx(false);
|
|
||||||
base.Awake();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnDestroy()
|
|
||||||
{
|
|
||||||
Instance = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public T GetCore<T>() => (T)m_core;
|
|
||||||
|
|
||||||
public void Show(RomFile currentRom, object core)
|
|
||||||
{
|
|
||||||
m_saveMenu = new InGameUI_SaveState(this);
|
|
||||||
CommandDispatcher.Instance.RegistController(this);
|
|
||||||
|
|
||||||
m_rom = currentRom;
|
|
||||||
m_core = core;
|
|
||||||
gameObject.SetActiveEx(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Hide()
|
|
||||||
{
|
|
||||||
CommandDispatcher.Instance.UnRegistController(this);
|
|
||||||
|
|
||||||
m_rom = null;
|
|
||||||
m_core = null;
|
|
||||||
gameObject.SetActiveEx(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnCmdOptionMenu()
|
|
||||||
{
|
|
||||||
OptionUI.Instance.Pop(new List<OptionMenu> { m_saveMenu });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 6c4cbb81b8f22ed499382b6eb9e6299e
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,29 +0,0 @@
|
|||||||
using AxibugEmuOnline.Client.ClientCore;
|
|
||||||
using System.Diagnostics;
|
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
|
||||||
{
|
|
||||||
public class InGameUI_SaveState : ExecuteMenu
|
|
||||||
{
|
|
||||||
private InGameUI m_gameUI;
|
|
||||||
|
|
||||||
public InGameUI_SaveState(InGameUI gameUI) : base("괏닸우亮", null)
|
|
||||||
{
|
|
||||||
m_gameUI = gameUI;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnExcute()
|
|
||||||
{
|
|
||||||
Stopwatch sw = Stopwatch.StartNew();
|
|
||||||
switch (m_gameUI.RomFile.Platform)
|
|
||||||
{
|
|
||||||
case EnumPlatform.NES:
|
|
||||||
var state = m_gameUI.GetCore<NesEmulator>().NesCore.GetState();
|
|
||||||
App.log.Info($"{m_gameUI.RomFile.Platform}===>우亮댕鬼{state.ToBytes().Length}");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
sw.Stop();
|
|
||||||
App.log.Info($"{m_gameUI.RomFile.Platform}====>삿혤우亮봬珂:{sw.Elapsed.TotalMilliseconds}ms");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 8a9b3cce3fed9054d9bcf411a142f9d7
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -3,7 +3,6 @@ using DG.Tweening;
|
|||||||
using DG.Tweening.Core;
|
using DG.Tweening.Core;
|
||||||
using DG.Tweening.Plugins.Options;
|
using DG.Tweening.Plugins.Options;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
namespace AxibugEmuOnline.Client
|
||||||
{
|
{
|
||||||
@ -13,8 +12,6 @@ namespace AxibugEmuOnline.Client
|
|||||||
RectTransform MainMenuRoot;
|
RectTransform MainMenuRoot;
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
MainMenuController MainMenu;
|
MainMenuController MainMenu;
|
||||||
[SerializeField]
|
|
||||||
Image BG;
|
|
||||||
|
|
||||||
Vector2 m_mainLayoutPosition;
|
Vector2 m_mainLayoutPosition;
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
@ -29,19 +26,19 @@ namespace AxibugEmuOnline.Client
|
|||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
Instance = this;
|
Instance = this;
|
||||||
|
DontDestroyOnLoad(this);
|
||||||
|
DontDestroyOnLoad(Camera.main.gameObject);
|
||||||
m_mainLayoutPosition = MainMenuRoot.anchoredPosition;
|
m_mainLayoutPosition = MainMenuRoot.anchoredPosition;
|
||||||
MainMenu.ListenControlAction = true;
|
MainMenu.ListenControlAction = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HideMainMenu()
|
public void HideMainMenu()
|
||||||
{
|
{
|
||||||
BG.gameObject.SetActiveEx(false);
|
|
||||||
MainMenuRoot.gameObject.SetActiveEx(false);
|
MainMenuRoot.gameObject.SetActiveEx(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShowMainMenu()
|
public void ShowMainMenu()
|
||||||
{
|
{
|
||||||
BG.gameObject.SetActiveEx(true);
|
|
||||||
MainMenuRoot.gameObject.SetActiveEx(true);
|
MainMenuRoot.gameObject.SetActiveEx(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using DG.Tweening;
|
using DG.Tweening;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
namespace AxibugEmuOnline.Client
|
||||||
@ -22,7 +23,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
public override bool Enable => m_bPoped;
|
public override bool Enable => m_bPoped;
|
||||||
|
|
||||||
private bool m_bPoped = false;
|
private bool m_bPoped = false;
|
||||||
private List<OptionUI_MenuItem> m_runtimeMenuItems = new List<OptionUI_MenuItem>();
|
private List<MonoBehaviour> m_runtimeMenuItems = new List<MonoBehaviour>();
|
||||||
|
|
||||||
private int m_selectIndex = -1;
|
private int m_selectIndex = -1;
|
||||||
public int SelectIndex
|
public int SelectIndex
|
||||||
@ -35,9 +36,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
|
|
||||||
m_selectIndex = value;
|
m_selectIndex = value;
|
||||||
|
|
||||||
OptionUI_MenuItem optionUI_MenuItem = m_runtimeMenuItems[m_selectIndex];
|
var itemUIRect = m_runtimeMenuItems[m_selectIndex].transform as RectTransform;
|
||||||
optionUI_MenuItem.OnFocus();
|
|
||||||
var itemUIRect = optionUI_MenuItem.transform as RectTransform;
|
|
||||||
SelectBorder.pivot = itemUIRect.pivot;
|
SelectBorder.pivot = itemUIRect.pivot;
|
||||||
SelectBorder.sizeDelta = itemUIRect.rect.size;
|
SelectBorder.sizeDelta = itemUIRect.rect.size;
|
||||||
DOTween.To(() => SelectBorder.position, (value) => SelectBorder.position = value, itemUIRect.position, 0.125f);
|
DOTween.To(() => SelectBorder.position, (value) => SelectBorder.position = value, itemUIRect.position, 0.125f);
|
||||||
@ -62,7 +61,21 @@ namespace AxibugEmuOnline.Client
|
|||||||
MenuRoot.anchoredPosition = temp;
|
MenuRoot.anchoredPosition = temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Pop(List<OptionMenu> menus, int defaultIndex = 0)
|
protected override void Update()
|
||||||
|
{
|
||||||
|
if (Input.GetKeyDown(KeyCode.T))
|
||||||
|
{
|
||||||
|
if (m_bPoped) Hide();
|
||||||
|
else Pop(new List<OptionMenu>
|
||||||
|
{
|
||||||
|
new ExecuteMenu("²âÊԲ˵¥1"),
|
||||||
|
new ExecuteMenu("Copilot"),
|
||||||
|
new ExecuteMenu("ChatGPT 4o"),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Pop(IEnumerable<OptionMenu> menus)
|
||||||
{
|
{
|
||||||
ReleaseRuntimeMenus();
|
ReleaseRuntimeMenus();
|
||||||
foreach (var menu in menus) CreateRuntimeMenuItem(menu);
|
foreach (var menu in menus) CreateRuntimeMenuItem(menu);
|
||||||
@ -72,9 +85,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
Canvas.ForceUpdateCanvases();
|
Canvas.ForceUpdateCanvases();
|
||||||
|
|
||||||
m_selectIndex = 0;
|
m_selectIndex = 0;
|
||||||
OptionUI_MenuItem optionUI_MenuItem = m_runtimeMenuItems[defaultIndex];
|
var itemUIRect = m_runtimeMenuItems[m_selectIndex].transform as RectTransform;
|
||||||
optionUI_MenuItem.OnFocus();
|
|
||||||
var itemUIRect = optionUI_MenuItem.transform as RectTransform;
|
|
||||||
SelectBorder.pivot = itemUIRect.pivot;
|
SelectBorder.pivot = itemUIRect.pivot;
|
||||||
SelectBorder.position = itemUIRect.position;
|
SelectBorder.position = itemUIRect.position;
|
||||||
SelectBorder.sizeDelta = itemUIRect.rect.size;
|
SelectBorder.sizeDelta = itemUIRect.rect.size;
|
||||||
@ -150,18 +161,6 @@ namespace AxibugEmuOnline.Client
|
|||||||
{
|
{
|
||||||
SelectIndex--;
|
SelectIndex--;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnCmdBack()
|
|
||||||
{
|
|
||||||
Hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool OnCmdEnter()
|
|
||||||
{
|
|
||||||
m_runtimeMenuItems[SelectIndex].OnExecute();
|
|
||||||
Hide();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class OptionMenu
|
public abstract class OptionMenu
|
||||||
|
@ -1,14 +1,22 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
namespace AxibugEmuOnline.Client
|
||||||
{
|
{
|
||||||
public class OptionUI_ExecuteItem : OptionUI_MenuItem<ExecuteMenu>
|
public class OptionUI_ExecuteItem : MonoBehaviour
|
||||||
{
|
{
|
||||||
public override void OnExecute()
|
[SerializeField] Text m_MenuNameTxt;
|
||||||
{
|
[SerializeField] Image m_Icon;
|
||||||
MenuData.OnExcute();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnFocus()
|
public void SetData(ExecuteMenu executeMenu)
|
||||||
{
|
{
|
||||||
|
m_MenuNameTxt.text = executeMenu.Name;
|
||||||
|
if (executeMenu.Icon == null) m_Icon.gameObject.SetActiveEx(false);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_Icon.gameObject.SetActiveEx(true);
|
||||||
|
m_Icon.sprite = executeMenu.Icon;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEditor;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
|
||||||
{
|
|
||||||
public abstract class OptionUI_MenuItem : MonoBehaviour
|
|
||||||
{
|
|
||||||
[SerializeField] Text m_MenuNameTxt;
|
|
||||||
[SerializeField] Image m_Icon;
|
|
||||||
|
|
||||||
protected OptionMenu m_Menu;
|
|
||||||
|
|
||||||
public void SetData(OptionMenu menuData)
|
|
||||||
{
|
|
||||||
m_Menu = menuData;
|
|
||||||
m_MenuNameTxt.text = menuData.Name;
|
|
||||||
if (menuData.Icon == null) m_Icon.gameObject.SetActiveEx(false);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_Icon.gameObject.SetActiveEx(true);
|
|
||||||
m_Icon.sprite = menuData.Icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
OnSetData(menuData);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected virtual void OnSetData(OptionMenu menuData) { }
|
|
||||||
|
|
||||||
public abstract void OnExecute();
|
|
||||||
public abstract void OnFocus();
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract class OptionUI_MenuItem<T> : OptionUI_MenuItem
|
|
||||||
where T : OptionMenu
|
|
||||||
{
|
|
||||||
protected T MenuData => m_Menu as T;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 8bba0d5ebcd10fb459209fb11e4d274d
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -82,7 +82,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
App.emu.BeginGame(m_romfile);
|
App.BeginGame(m_romfile);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2,22 +2,18 @@
|
|||||||
{
|
{
|
||||||
public struct BLOCKHDR : IStateBufferObject
|
public struct BLOCKHDR : IStateBufferObject
|
||||||
{
|
{
|
||||||
public readonly bool Valid => !string.IsNullOrEmpty(ID);
|
|
||||||
public string ID;
|
public string ID;
|
||||||
public ushort Reserved;
|
public ushort Reserved;
|
||||||
public ushort BlockVersion;
|
public ushort BlockVersion;
|
||||||
public uint BlockSize;
|
public uint BlockSize;
|
||||||
|
|
||||||
public readonly void SaveState(StateBuffer buffer)
|
public readonly void SaveState(StateBuffer buffer)
|
||||||
{
|
|
||||||
if (Valid)
|
|
||||||
{
|
{
|
||||||
buffer.Write(ID);
|
buffer.Write(ID);
|
||||||
buffer.Write(Reserved);
|
buffer.Write(Reserved);
|
||||||
buffer.Write(BlockVersion);
|
buffer.Write(BlockVersion);
|
||||||
buffer.Write(BlockSize);
|
buffer.Write(BlockSize);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public readonly uint GetSize()
|
public readonly uint GetSize()
|
||||||
{
|
{
|
||||||
|
@ -42,59 +42,35 @@ namespace VirtualNes.Core
|
|||||||
|
|
||||||
HEADER.SaveState(buffer);
|
HEADER.SaveState(buffer);
|
||||||
|
|
||||||
if (regBLOCK.Valid)
|
|
||||||
{
|
|
||||||
regBLOCK.SaveState(buffer);
|
regBLOCK.SaveState(buffer);
|
||||||
reg.SaveState(buffer);
|
reg.SaveState(buffer);
|
||||||
}
|
|
||||||
|
|
||||||
if (regBLOCK.Valid)
|
|
||||||
{
|
|
||||||
ramBLOCK.SaveState(buffer);
|
ramBLOCK.SaveState(buffer);
|
||||||
ram.SaveState(buffer);
|
ram.SaveState(buffer);
|
||||||
}
|
|
||||||
|
|
||||||
if(WRAM!=null) buffer.Write(WRAM);
|
if(WRAM!=null) buffer.Write(WRAM);
|
||||||
|
|
||||||
if (mmuBLOCK.Valid)
|
|
||||||
{
|
|
||||||
mmuBLOCK.SaveState(buffer);
|
mmuBLOCK.SaveState(buffer);
|
||||||
mmu.SaveState(buffer);
|
mmu.SaveState(buffer);
|
||||||
buffer.Write(CPU_MEM_BANK.ToArray());
|
buffer.Write(CPU_MEM_BANK.ToArray());
|
||||||
buffer.Write(VRAM);
|
buffer.Write(VRAM);
|
||||||
buffer.Write(CRAM.ToArray());
|
buffer.Write(CRAM.ToArray());
|
||||||
}
|
|
||||||
|
|
||||||
if (mmcBLOCK.Valid)
|
|
||||||
{
|
|
||||||
mmcBLOCK.SaveState(buffer);
|
mmcBLOCK.SaveState(buffer);
|
||||||
mmc.SaveState(buffer);
|
mmc.SaveState(buffer);
|
||||||
}
|
|
||||||
|
|
||||||
if (ctrBLOCK.Valid)
|
|
||||||
{
|
|
||||||
ctrBLOCK.SaveState(buffer);
|
ctrBLOCK.SaveState(buffer);
|
||||||
ctr.SaveState(buffer);
|
ctr.SaveState(buffer);
|
||||||
}
|
|
||||||
|
|
||||||
if (sndBLOCK.Valid)
|
|
||||||
{
|
|
||||||
sndBLOCK.SaveState(buffer);
|
sndBLOCK.SaveState(buffer);
|
||||||
snd.SaveState(buffer);
|
snd.SaveState(buffer);
|
||||||
}
|
|
||||||
|
|
||||||
if (dskBLOCK.Valid)
|
|
||||||
{
|
|
||||||
dskBLOCK.SaveState(buffer);
|
dskBLOCK.SaveState(buffer);
|
||||||
dsk.SaveState(buffer);
|
dsk.SaveState(buffer);
|
||||||
buffer.Write(dskdata);
|
buffer.Write(dskdata);
|
||||||
}
|
|
||||||
|
|
||||||
if (exctrBLOCK.Valid)
|
|
||||||
{
|
|
||||||
exctrBLOCK.SaveState(buffer);
|
exctrBLOCK.SaveState(buffer);
|
||||||
exctr.SaveState(buffer);
|
exctr.SaveState(buffer);
|
||||||
}
|
|
||||||
|
|
||||||
return buffer.Data.ToArray();
|
return buffer.Data.ToArray();
|
||||||
}
|
}
|
||||||
|
@ -56,8 +56,6 @@ namespace VirtualNes.Core
|
|||||||
}
|
}
|
||||||
public void Write(string value)
|
public void Write(string value)
|
||||||
{
|
{
|
||||||
if (value == null) return;
|
|
||||||
|
|
||||||
Write(Encoding.ASCII.GetBytes(value));
|
Write(Encoding.ASCII.GetBytes(value));
|
||||||
}
|
}
|
||||||
public void Write(double value)
|
public void Write(double value)
|
||||||
|
Loading…
Reference in New Issue
Block a user