Compare commits
No commits in common. "2510b2b7e33b223f0540537775b82ec64e563c8d" and "6a5393d9bcc1cde58d4ee42703b818a2e3b6d0ee" have entirely different histories.
2510b2b7e3
...
6a5393d9bc
@ -137,10 +137,6 @@ Material:
|
|||||||
m_Texture: {fileID: 0}
|
m_Texture: {fileID: 0}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- _ParamTex:
|
|
||||||
m_Texture: {fileID: 0}
|
|
||||||
m_Scale: {x: 1, y: 1}
|
|
||||||
m_Offset: {x: 0, y: 0}
|
|
||||||
m_Floats:
|
m_Floats:
|
||||||
- _ColorMask: 15
|
- _ColorMask: 15
|
||||||
- _Stencil: 0
|
- _Stencil: 0
|
||||||
@ -289,10 +285,6 @@ Material:
|
|||||||
m_Texture: {fileID: 0}
|
m_Texture: {fileID: 0}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- _ParamTex:
|
|
||||||
m_Texture: {fileID: 0}
|
|
||||||
m_Scale: {x: 1, y: 1}
|
|
||||||
m_Offset: {x: 0, y: 0}
|
|
||||||
m_Floats:
|
m_Floats:
|
||||||
- _ColorMask: 15
|
- _ColorMask: 15
|
||||||
- _Stencil: 0
|
- _Stencil: 0
|
||||||
@ -327,10 +319,6 @@ Material:
|
|||||||
m_Texture: {fileID: 0}
|
m_Texture: {fileID: 0}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- _ParamTex:
|
|
||||||
m_Texture: {fileID: 0}
|
|
||||||
m_Scale: {x: 1, y: 1}
|
|
||||||
m_Offset: {x: 0, y: 0}
|
|
||||||
m_Floats:
|
m_Floats:
|
||||||
- _ColorMask: 15
|
- _ColorMask: 15
|
||||||
- _Stencil: 0
|
- _Stencil: 0
|
||||||
@ -365,10 +353,6 @@ Material:
|
|||||||
m_Texture: {fileID: 0}
|
m_Texture: {fileID: 0}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- _ParamTex:
|
|
||||||
m_Texture: {fileID: 0}
|
|
||||||
m_Scale: {x: 1, y: 1}
|
|
||||||
m_Offset: {x: 0, y: 0}
|
|
||||||
m_Floats:
|
m_Floats:
|
||||||
- _ColorMask: 15
|
- _ColorMask: 15
|
||||||
- _Stencil: 0
|
- _Stencil: 0
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,925 +0,0 @@
|
|||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!1 &29419265480821815
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 8126322204359135913}
|
|
||||||
- component: {fileID: 2718916271043989317}
|
|
||||||
- component: {fileID: 3380485461544738227}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Descript
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &8126322204359135913
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 29419265480821815}
|
|
||||||
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: 8789823129857705082}
|
|
||||||
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: 33}
|
|
||||||
m_Pivot: {x: 0, y: 1}
|
|
||||||
--- !u!222 &2718916271043989317
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 29419265480821815}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &3380485461544738227
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 29419265480821815}
|
|
||||||
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: 20
|
|
||||||
m_FontStyle: 0
|
|
||||||
m_BestFit: 0
|
|
||||||
m_MinSize: 2
|
|
||||||
m_MaxSize: 300
|
|
||||||
m_Alignment: 4
|
|
||||||
m_AlignByGeometry: 0
|
|
||||||
m_RichText: 1
|
|
||||||
m_HorizontalOverflow: 1
|
|
||||||
m_VerticalOverflow: 1
|
|
||||||
m_LineSpacing: 1
|
|
||||||
m_Text: DESCRIPTION
|
|
||||||
--- !u!1 &734025543935719296
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1323634865265500141}
|
|
||||||
- component: {fileID: 5792146190930927166}
|
|
||||||
- component: {fileID: 2619187604372594158}
|
|
||||||
- component: {fileID: 1779247868001543556}
|
|
||||||
- component: {fileID: 4496630961732192070}
|
|
||||||
- component: {fileID: 2059277597780235898}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: shadowIcon
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &1323634865265500141
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 734025543935719296}
|
|
||||||
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: 6087025893861054323}
|
|
||||||
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!222 &5792146190930927166
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 734025543935719296}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &2619187604372594158
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 734025543935719296}
|
|
||||||
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: 230e155ce0d5a8d4283675d040631efc, 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 &1779247868001543556
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 734025543935719296}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Version: 300
|
|
||||||
m_EffectMaterial: {fileID: 21305736874167728, guid: aee96bc531e6eba468ec405e536f515f, type: 2}
|
|
||||||
m_EffectFactor: 0
|
|
||||||
m_ColorFactor: 0
|
|
||||||
m_BlurFactor: 0
|
|
||||||
m_EffectMode: 0
|
|
||||||
m_ColorMode: 1
|
|
||||||
m_BlurMode: 3
|
|
||||||
m_AdvancedBlur: 1
|
|
||||||
m_ShadowBlur: 1
|
|
||||||
m_ShadowStyle: 0
|
|
||||||
m_ShadowColor: {r: 0, g: 0, b: 0, a: 1}
|
|
||||||
m_EffectDistance: {x: 1, y: -1}
|
|
||||||
m_UseGraphicAlpha: 1
|
|
||||||
m_EffectColor: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_AdditionalShadows: []
|
|
||||||
--- !u!114 &4496630961732192070
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 734025543935719296}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 0848bff101191904ead4bb831f7084db, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_BlurFactor: 1
|
|
||||||
m_Style: 3
|
|
||||||
m_AdditionalShadows: []
|
|
||||||
m_EffectColor: {r: 1, g: 1, b: 1, a: 0}
|
|
||||||
m_EffectDistance: {x: 8, y: 8}
|
|
||||||
m_UseGraphicAlpha: 0
|
|
||||||
--- !u!95 &2059277597780235898
|
|
||||||
Animator:
|
|
||||||
serializedVersion: 3
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 734025543935719296}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_Avatar: {fileID: 0}
|
|
||||||
m_Controller: {fileID: 9100000, guid: 0b3ccf7414d2ead43be0cd33b6e1b53c, type: 2}
|
|
||||||
m_CullingMode: 0
|
|
||||||
m_UpdateMode: 0
|
|
||||||
m_ApplyRootMotion: 0
|
|
||||||
m_LinearVelocityBlending: 0
|
|
||||||
m_WarningMessage:
|
|
||||||
m_HasTransformHierarchy: 1
|
|
||||||
m_AllowConstantClipSamplingOptimization: 1
|
|
||||||
m_KeepAnimatorControllerStateOnDisable: 0
|
|
||||||
--- !u!1 &1776357407830023228
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 6087025893861054323}
|
|
||||||
- component: {fileID: 7036072602178187444}
|
|
||||||
- component: {fileID: 6771349210554360888}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Icon
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &6087025893861054323
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1776357407830023228}
|
|
||||||
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: 1323634865265500141}
|
|
||||||
m_Father: {fileID: 8754483333502849411}
|
|
||||||
m_RootOrder: 0
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 0.5, y: 1}
|
|
||||||
m_AnchorMax: {x: 0.5, y: 1}
|
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
|
||||||
m_SizeDelta: {x: 100, y: 100}
|
|
||||||
m_Pivot: {x: 0.5, y: 1}
|
|
||||||
--- !u!222 &7036072602178187444
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1776357407830023228}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &6771349210554360888
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1776357407830023228}
|
|
||||||
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: 230e155ce0d5a8d4283675d040631efc, 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!1 &1813396448589485488
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 4467178468921796307}
|
|
||||||
- component: {fileID: 8568189430970172828}
|
|
||||||
- component: {fileID: 6941538197753025297}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: SelectArrow
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &4467178468921796307
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1813396448589485488}
|
|
||||||
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: 331028397738758164}
|
|
||||||
m_RootOrder: 1
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 0, y: 0.5}
|
|
||||||
m_AnchorMax: {x: 0, y: 0.5}
|
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
|
||||||
m_SizeDelta: {x: 63, y: 70}
|
|
||||||
m_Pivot: {x: 0, y: 0.5}
|
|
||||||
--- !u!222 &8568189430970172828
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1813396448589485488}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &6941538197753025297
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1813396448589485488}
|
|
||||||
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: 0
|
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
m_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_Sprite: {fileID: -1023481969782777897, guid: d518d00d4940e854bbe45d9ef891401a, 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!1 &3189920797946144379
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1998281097548910301}
|
|
||||||
- component: {fileID: -3959751710151339114}
|
|
||||||
- component: {fileID: 5700455559359757662}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Game_NES_Template
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &1998281097548910301
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3189920797946144379}
|
|
||||||
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: 8754483333502849411}
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 0
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
|
||||||
m_SizeDelta: {x: 100, y: 102}
|
|
||||||
m_Pivot: {x: 0, y: 0.5}
|
|
||||||
--- !u!114 &-3959751710151339114
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3189920797946144379}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: e2f2e38adaa854144b67512333b1b363, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
Icon: {fileID: 6771349210554360888}
|
|
||||||
Txt: {fileID: 991446423622995247}
|
|
||||||
Descript: {fileID: 3380485461544738227}
|
|
||||||
Root: {fileID: 8754483333502849411}
|
|
||||||
ShadowIcon: {fileID: 2619187604372594158}
|
|
||||||
InfoNode: {fileID: 5331629140490413834}
|
|
||||||
SubMenuItemGroup: {fileID: 4672405243908051711}
|
|
||||||
SelectScale: 1
|
|
||||||
UnSelectScale: 1
|
|
||||||
RomGroupRoot: {fileID: 3086674949377227884}
|
|
||||||
--- !u!114 &5700455559359757662
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3189920797946144379}
|
|
||||||
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: 200
|
|
||||||
m_PreferredHeight: 230
|
|
||||||
m_FlexibleWidth: -1
|
|
||||||
m_FlexibleHeight: -1
|
|
||||||
m_LayoutPriority: 1
|
|
||||||
--- !u!1 &3462611600707696275
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 2303118795734916657}
|
|
||||||
- component: {fileID: 6792036789108903940}
|
|
||||||
- component: {fileID: 4997733671603798451}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: viewport
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &2303118795734916657
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3462611600707696275}
|
|
||||||
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: 8865437771338118001}
|
|
||||||
m_Father: {fileID: 331028397738758164}
|
|
||||||
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!222 &6792036789108903940
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3462611600707696275}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &4997733671603798451
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3462611600707696275}
|
|
||||||
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: 0}
|
|
||||||
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: 0}
|
|
||||||
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!1 &3811189825355447390
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 331028397738758164}
|
|
||||||
- component: {fileID: 3428297980621487917}
|
|
||||||
- component: {fileID: 4672405243908051711}
|
|
||||||
- component: {fileID: 3086674949377227884}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: RomGroupScroll
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &331028397738758164
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3811189825355447390}
|
|
||||||
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: 2303118795734916657}
|
|
||||||
- {fileID: 4467178468921796307}
|
|
||||||
m_Father: {fileID: 8754483333502849411}
|
|
||||||
m_RootOrder: 2
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 1, y: 0.5}
|
|
||||||
m_AnchorMax: {x: 1, y: 0.5}
|
|
||||||
m_AnchoredPosition: {x: 50, y: -165.08997}
|
|
||||||
m_SizeDelta: {x: 2338.0796, y: 1768.3333}
|
|
||||||
m_Pivot: {x: 0, y: 0.5}
|
|
||||||
--- !u!114 &3428297980621487917
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3811189825355447390}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Content: {fileID: 8865437771338118001}
|
|
||||||
m_Horizontal: 0
|
|
||||||
m_Vertical: 1
|
|
||||||
m_MovementType: 0
|
|
||||||
m_Elasticity: 0.1
|
|
||||||
m_Inertia: 1
|
|
||||||
m_DecelerationRate: 0.135
|
|
||||||
m_ScrollSensitivity: 1
|
|
||||||
m_Viewport: {fileID: 2303118795734916657}
|
|
||||||
m_HorizontalScrollbar: {fileID: 0}
|
|
||||||
m_VerticalScrollbar: {fileID: 0}
|
|
||||||
m_HorizontalScrollbarVisibility: 0
|
|
||||||
m_VerticalScrollbarVisibility: 0
|
|
||||||
m_HorizontalScrollbarSpacing: 0
|
|
||||||
m_VerticalScrollbarSpacing: 0
|
|
||||||
m_OnValueChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
--- !u!114 &4672405243908051711
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3811189825355447390}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 1d1e3e91ac34bc8468f357ee247ffb6a, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_menuItemRoot: {fileID: 0}
|
|
||||||
PulseInvoke_Delay: 0.4
|
|
||||||
PulseInvoke_Interval: 0.05
|
|
||||||
SubMenuItemTemplate: {fileID: 0}
|
|
||||||
alphaGroup: {fileID: 0}
|
|
||||||
m_selectItemPosition: {x: 50, y: -51}
|
|
||||||
step: 50
|
|
||||||
splitStep: 200
|
|
||||||
m_selectArrow: {fileID: 4467178468921796307}
|
|
||||||
ArrowOffset: 115
|
|
||||||
WidthFix: 225
|
|
||||||
itemGroup: {fileID: 6055880809428073973}
|
|
||||||
srollRect: {fileID: 3428297980621487917}
|
|
||||||
--- !u!225 &3086674949377227884
|
|
||||||
CanvasGroup:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3811189825355447390}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_Alpha: 1
|
|
||||||
m_Interactable: 1
|
|
||||||
m_BlocksRaycasts: 1
|
|
||||||
m_IgnoreParentGroups: 0
|
|
||||||
--- !u!1 &3993825260653792697
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 8789823129857705082}
|
|
||||||
- component: {fileID: 3252398029444565139}
|
|
||||||
- component: {fileID: 4972426757569440742}
|
|
||||||
- component: {fileID: 5331629140490413834}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: InfoNode
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &8789823129857705082
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3993825260653792697}
|
|
||||||
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: 6095356919362338847}
|
|
||||||
- {fileID: 8126322204359135913}
|
|
||||||
m_Father: {fileID: 8754483333502849411}
|
|
||||||
m_RootOrder: 1
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 1, y: 0}
|
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
|
||||||
m_Pivot: {x: 0, y: 0.5}
|
|
||||||
--- !u!114 &3252398029444565139
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3993825260653792697}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Padding:
|
|
||||||
m_Left: 20
|
|
||||||
m_Right: 0
|
|
||||||
m_Top: 0
|
|
||||||
m_Bottom: 0
|
|
||||||
m_ChildAlignment: 3
|
|
||||||
m_Spacing: 0
|
|
||||||
m_ChildForceExpandWidth: 0
|
|
||||||
m_ChildForceExpandHeight: 1
|
|
||||||
m_ChildControlWidth: 1
|
|
||||||
m_ChildControlHeight: 0
|
|
||||||
m_ChildScaleWidth: 0
|
|
||||||
m_ChildScaleHeight: 0
|
|
||||||
m_ReverseArrangement: 0
|
|
||||||
--- !u!114 &4972426757569440742
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3993825260653792697}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_HorizontalFit: 2
|
|
||||||
m_VerticalFit: 2
|
|
||||||
--- !u!225 &5331629140490413834
|
|
||||||
CanvasGroup:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3993825260653792697}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_Alpha: 1
|
|
||||||
m_Interactable: 1
|
|
||||||
m_BlocksRaycasts: 1
|
|
||||||
m_IgnoreParentGroups: 0
|
|
||||||
--- !u!1 &5340761592919397836
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 6095356919362338847}
|
|
||||||
- component: {fileID: 7651669947470814669}
|
|
||||||
- component: {fileID: 991446423622995247}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Name
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &6095356919362338847
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 5340761592919397836}
|
|
||||||
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: 8789823129857705082}
|
|
||||||
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: 33}
|
|
||||||
m_Pivot: {x: 0, y: 1}
|
|
||||||
--- !u!222 &7651669947470814669
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 5340761592919397836}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &991446423622995247
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 5340761592919397836}
|
|
||||||
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: 20
|
|
||||||
m_FontStyle: 0
|
|
||||||
m_BestFit: 0
|
|
||||||
m_MinSize: 2
|
|
||||||
m_MaxSize: 300
|
|
||||||
m_Alignment: 4
|
|
||||||
m_AlignByGeometry: 0
|
|
||||||
m_RichText: 1
|
|
||||||
m_HorizontalOverflow: 1
|
|
||||||
m_VerticalOverflow: 1
|
|
||||||
m_LineSpacing: 1
|
|
||||||
m_Text: NAME
|
|
||||||
--- !u!1 &6164337287601107676
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 8865437771338118001}
|
|
||||||
- component: {fileID: 6055880809428073973}
|
|
||||||
- component: {fileID: 1286529697012677180}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: RomGroup
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &8865437771338118001
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 6164337287601107676}
|
|
||||||
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: 2303118795734916657}
|
|
||||||
m_RootOrder: 0
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
|
||||||
m_Pivot: {x: 0, y: 1}
|
|
||||||
--- !u!114 &6055880809428073973
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 6164337287601107676}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: fdacbe30e88f6a844a435595a4affdbb, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Padding:
|
|
||||||
m_Left: 0
|
|
||||||
m_Right: 0
|
|
||||||
m_Top: 0
|
|
||||||
m_Bottom: 0
|
|
||||||
m_ChildAlignment: 0
|
|
||||||
m_StartCorner: 0
|
|
||||||
m_StartAxis: 0
|
|
||||||
m_CellSize: {x: 500, y: 200}
|
|
||||||
m_Spacing: {x: 0, y: 20}
|
|
||||||
m_Constraint: 1
|
|
||||||
m_ConstraintCount: 1
|
|
||||||
ItemTemplate: {fileID: 1998281097548910301, guid: e6df0d7c236795247971f0d1e691b068, type: 3}
|
|
||||||
ViewRect: {fileID: 2303118795734916657}
|
|
||||||
PauseUpdateView: 0
|
|
||||||
--- !u!114 &1286529697012677180
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 6164337287601107676}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_HorizontalFit: 0
|
|
||||||
m_VerticalFit: 2
|
|
||||||
--- !u!1 &8290338740711049006
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 8754483333502849411}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Root
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &8754483333502849411
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 8290338740711049006}
|
|
||||||
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: 6087025893861054323}
|
|
||||||
- {fileID: 8789823129857705082}
|
|
||||||
- {fileID: 331028397738758164}
|
|
||||||
m_Father: {fileID: 1998281097548910301}
|
|
||||||
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}
|
|
@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: b170104e466853c49b29f9b5b103364e
|
|
||||||
PrefabImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
File diff suppressed because it is too large
Load Diff
@ -131,10 +131,10 @@ MonoBehaviour:
|
|||||||
Descript: {fileID: 0}
|
Descript: {fileID: 0}
|
||||||
Root: {fileID: 8754483333502849411}
|
Root: {fileID: 8754483333502849411}
|
||||||
ShadowIcon: {fileID: 0}
|
ShadowIcon: {fileID: 0}
|
||||||
InfoNode: {fileID: 632697230221148209}
|
|
||||||
SubMenuItemGroup: {fileID: 2060695589654091386}
|
SubMenuItemGroup: {fileID: 2060695589654091386}
|
||||||
SelectScale: 1
|
SelectScale: 1
|
||||||
UnSelectScale: 0.85
|
UnSelectScale: 0.85
|
||||||
|
m_progress: 0
|
||||||
--- !u!114 &5700455559359757662
|
--- !u!114 &5700455559359757662
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -166,7 +166,6 @@ GameObject:
|
|||||||
- component: {fileID: 6095356919362338847}
|
- component: {fileID: 6095356919362338847}
|
||||||
- component: {fileID: 7651669947470814669}
|
- component: {fileID: 7651669947470814669}
|
||||||
- component: {fileID: 991446423622995247}
|
- component: {fileID: 991446423622995247}
|
||||||
- component: {fileID: 632697230221148209}
|
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: Text
|
m_Name: Text
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -235,18 +234,6 @@ MonoBehaviour:
|
|||||||
m_VerticalOverflow: 1
|
m_VerticalOverflow: 1
|
||||||
m_LineSpacing: 1
|
m_LineSpacing: 1
|
||||||
m_Text: NAME
|
m_Text: NAME
|
||||||
--- !u!225 &632697230221148209
|
|
||||||
CanvasGroup:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 5340761592919397836}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_Alpha: 1
|
|
||||||
m_Interactable: 1
|
|
||||||
m_BlocksRaycasts: 1
|
|
||||||
m_IgnoreParentGroups: 0
|
|
||||||
--- !u!1 &8218630550162509793
|
--- !u!1 &8218630550162509793
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -298,6 +285,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
PulseInvoke_Delay: 0.4
|
PulseInvoke_Delay: 0.4
|
||||||
PulseInvoke_Interval: 0.05
|
PulseInvoke_Interval: 0.05
|
||||||
|
m_listenControlAction: 0
|
||||||
m_menuItemRoot: {fileID: 3226730524206505336}
|
m_menuItemRoot: {fileID: 3226730524206505336}
|
||||||
SubMenuItemTemplate: {fileID: 2502609279043838113, guid: 01f3c5497992f944eae9b9efa15a19c2, type: 3}
|
SubMenuItemTemplate: {fileID: 2502609279043838113, guid: 01f3c5497992f944eae9b9efa15a19c2, type: 3}
|
||||||
alphaGroup: {fileID: 6355204462360987243}
|
alphaGroup: {fileID: 6355204462360987243}
|
||||||
|
@ -1,689 +0,0 @@
|
|||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!1 &29419265480821815
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 8126322204359135913}
|
|
||||||
- component: {fileID: 2718916271043989317}
|
|
||||||
- component: {fileID: 3380485461544738227}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Descript
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &8126322204359135913
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 29419265480821815}
|
|
||||||
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: 8789823129857705082}
|
|
||||||
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: 33}
|
|
||||||
m_Pivot: {x: 0, y: 1}
|
|
||||||
--- !u!222 &2718916271043989317
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 29419265480821815}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &3380485461544738227
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 29419265480821815}
|
|
||||||
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: 20
|
|
||||||
m_FontStyle: 0
|
|
||||||
m_BestFit: 0
|
|
||||||
m_MinSize: 2
|
|
||||||
m_MaxSize: 300
|
|
||||||
m_Alignment: 3
|
|
||||||
m_AlignByGeometry: 0
|
|
||||||
m_RichText: 1
|
|
||||||
m_HorizontalOverflow: 1
|
|
||||||
m_VerticalOverflow: 1
|
|
||||||
m_LineSpacing: 1
|
|
||||||
m_Text: 111111111111111111111111111111111111111111
|
|
||||||
--- !u!1 &734025543935719296
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1323634865265500141}
|
|
||||||
- component: {fileID: 5792146190930927166}
|
|
||||||
- component: {fileID: 2619187604372594158}
|
|
||||||
- component: {fileID: 1779247868001543556}
|
|
||||||
- component: {fileID: 4496630961732192070}
|
|
||||||
- component: {fileID: 2059277597780235898}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: shadowIcon
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &1323634865265500141
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 734025543935719296}
|
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 2}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 8754483333502849411}
|
|
||||||
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: -150, y: 0}
|
|
||||||
m_SizeDelta: {x: -296, y: 4}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!222 &5792146190930927166
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 734025543935719296}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &2619187604372594158
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 734025543935719296}
|
|
||||||
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: 0.4577373, b: 0, 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: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
|
||||||
m_Type: 1
|
|
||||||
m_PreserveAspect: 0
|
|
||||||
m_FillCenter: 0
|
|
||||||
m_FillMethod: 4
|
|
||||||
m_FillAmount: 1
|
|
||||||
m_FillClockwise: 1
|
|
||||||
m_FillOrigin: 0
|
|
||||||
m_UseSpriteMesh: 0
|
|
||||||
m_PixelsPerUnitMultiplier: 1
|
|
||||||
--- !u!114 &1779247868001543556
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 734025543935719296}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Version: 300
|
|
||||||
m_EffectMaterial: {fileID: 21305736874167728, guid: aee96bc531e6eba468ec405e536f515f, type: 2}
|
|
||||||
m_EffectFactor: 0
|
|
||||||
m_ColorFactor: 0
|
|
||||||
m_BlurFactor: 0
|
|
||||||
m_EffectMode: 0
|
|
||||||
m_ColorMode: 1
|
|
||||||
m_BlurMode: 3
|
|
||||||
m_AdvancedBlur: 1
|
|
||||||
m_ShadowBlur: 1
|
|
||||||
m_ShadowStyle: 0
|
|
||||||
m_ShadowColor: {r: 0, g: 0, b: 0, a: 1}
|
|
||||||
m_EffectDistance: {x: 1, y: -1}
|
|
||||||
m_UseGraphicAlpha: 1
|
|
||||||
m_EffectColor: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_AdditionalShadows: []
|
|
||||||
--- !u!114 &4496630961732192070
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 734025543935719296}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 0848bff101191904ead4bb831f7084db, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_BlurFactor: 1
|
|
||||||
m_Style: 3
|
|
||||||
m_AdditionalShadows: []
|
|
||||||
m_EffectColor: {r: 1, g: 1, b: 1, a: 0}
|
|
||||||
m_EffectDistance: {x: 8, y: 8}
|
|
||||||
m_UseGraphicAlpha: 0
|
|
||||||
--- !u!95 &2059277597780235898
|
|
||||||
Animator:
|
|
||||||
serializedVersion: 3
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 734025543935719296}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_Avatar: {fileID: 0}
|
|
||||||
m_Controller: {fileID: 9100000, guid: 0b3ccf7414d2ead43be0cd33b6e1b53c, type: 2}
|
|
||||||
m_CullingMode: 0
|
|
||||||
m_UpdateMode: 0
|
|
||||||
m_ApplyRootMotion: 0
|
|
||||||
m_LinearVelocityBlending: 0
|
|
||||||
m_WarningMessage:
|
|
||||||
m_HasTransformHierarchy: 1
|
|
||||||
m_AllowConstantClipSamplingOptimization: 1
|
|
||||||
m_KeepAnimatorControllerStateOnDisable: 0
|
|
||||||
--- !u!1 &1776357407830023228
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 6087025893861054323}
|
|
||||||
- component: {fileID: 7036072602178187444}
|
|
||||||
- component: {fileID: 6771349210554360888}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Icon
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &6087025893861054323
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1776357407830023228}
|
|
||||||
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: 8105925540140519754}
|
|
||||||
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: 4, y: 4}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!222 &7036072602178187444
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1776357407830023228}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &6771349210554360888
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1776357407830023228}
|
|
||||||
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: 0.45882356, b: 0, 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: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
|
||||||
m_Type: 1
|
|
||||||
m_PreserveAspect: 0
|
|
||||||
m_FillCenter: 0
|
|
||||||
m_FillMethod: 4
|
|
||||||
m_FillAmount: 1
|
|
||||||
m_FillClockwise: 1
|
|
||||||
m_FillOrigin: 0
|
|
||||||
m_UseSpriteMesh: 0
|
|
||||||
m_PixelsPerUnitMultiplier: 1
|
|
||||||
--- !u!1 &3189920797946144379
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1998281097548910301}
|
|
||||||
- component: {fileID: 8404333486862214380}
|
|
||||||
- component: {fileID: 5700455559359757662}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: RomItemTemplate
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &1998281097548910301
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3189920797946144379}
|
|
||||||
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: 8754483333502849411}
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 0
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
|
||||||
m_SizeDelta: {x: 500, y: 200}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!114 &8404333486862214380
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3189920797946144379}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: f236de3ffaafd4149a3b7395e05b8d07, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
Icon: {fileID: 6771349210554360888}
|
|
||||||
Txt: {fileID: 991446423622995247}
|
|
||||||
Descript: {fileID: 3380485461544738227}
|
|
||||||
Root: {fileID: 8754483333502849411}
|
|
||||||
ShadowIcon: {fileID: 2619187604372594158}
|
|
||||||
InfoNode: {fileID: 0}
|
|
||||||
SubMenuItemGroup: {fileID: 0}
|
|
||||||
SelectScale: 1
|
|
||||||
UnSelectScale: 0.8
|
|
||||||
m_romImage: {fileID: 67125096702760250}
|
|
||||||
--- !u!114 &5700455559359757662
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3189920797946144379}
|
|
||||||
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: 200
|
|
||||||
m_PreferredHeight: 230
|
|
||||||
m_FlexibleWidth: -1
|
|
||||||
m_FlexibleHeight: -1
|
|
||||||
m_LayoutPriority: 1
|
|
||||||
--- !u!1 &3993825260653792697
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 8789823129857705082}
|
|
||||||
- component: {fileID: 3252398029444565139}
|
|
||||||
- component: {fileID: 6788248266412682264}
|
|
||||||
- component: {fileID: 8081109478688381999}
|
|
||||||
- component: {fileID: 6660646139021869069}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: InfoNode
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &8789823129857705082
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3993825260653792697}
|
|
||||||
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: 6095356919362338847}
|
|
||||||
- {fileID: 8126322204359135913}
|
|
||||||
m_Father: {fileID: 8754483333502849411}
|
|
||||||
m_RootOrder: 2
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
|
||||||
m_AnchoredPosition: {x: 494.04688, y: 0}
|
|
||||||
m_SizeDelta: {x: 588.0938, y: 0}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!114 &3252398029444565139
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3993825260653792697}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Padding:
|
|
||||||
m_Left: 20
|
|
||||||
m_Right: 0
|
|
||||||
m_Top: 0
|
|
||||||
m_Bottom: 0
|
|
||||||
m_ChildAlignment: 3
|
|
||||||
m_Spacing: 0
|
|
||||||
m_ChildForceExpandWidth: 0
|
|
||||||
m_ChildForceExpandHeight: 1
|
|
||||||
m_ChildControlWidth: 1
|
|
||||||
m_ChildControlHeight: 0
|
|
||||||
m_ChildScaleWidth: 0
|
|
||||||
m_ChildScaleHeight: 0
|
|
||||||
m_ReverseArrangement: 0
|
|
||||||
--- !u!225 &6788248266412682264
|
|
||||||
CanvasGroup:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3993825260653792697}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_Alpha: 1
|
|
||||||
m_Interactable: 1
|
|
||||||
m_BlocksRaycasts: 1
|
|
||||||
m_IgnoreParentGroups: 0
|
|
||||||
--- !u!222 &8081109478688381999
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3993825260653792697}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &6660646139021869069
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3993825260653792697}
|
|
||||||
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: 0}
|
|
||||||
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: 0}
|
|
||||||
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!1 &4643603390456494410
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 8105925540140519754}
|
|
||||||
- component: {fileID: 1377401926964550360}
|
|
||||||
- component: {fileID: 67125096702760250}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: RomImage
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &8105925540140519754
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 4643603390456494410}
|
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 2}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_Children:
|
|
||||||
- {fileID: 6087025893861054323}
|
|
||||||
m_Father: {fileID: 8754483333502849411}
|
|
||||||
m_RootOrder: 1
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 0, y: 0.5}
|
|
||||||
m_AnchorMax: {x: 0, y: 0.5}
|
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
|
||||||
m_SizeDelta: {x: 200, y: 200}
|
|
||||||
m_Pivot: {x: 0, y: 0.5}
|
|
||||||
--- !u!222 &1377401926964550360
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 4643603390456494410}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &67125096702760250
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 4643603390456494410}
|
|
||||||
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: 0}
|
|
||||||
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!1 &5340761592919397836
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 6095356919362338847}
|
|
||||||
- component: {fileID: 7651669947470814669}
|
|
||||||
- component: {fileID: 991446423622995247}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Name
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &6095356919362338847
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 5340761592919397836}
|
|
||||||
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: 8789823129857705082}
|
|
||||||
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: 33}
|
|
||||||
m_Pivot: {x: 0, y: 1}
|
|
||||||
--- !u!222 &7651669947470814669
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 5340761592919397836}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &991446423622995247
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 5340761592919397836}
|
|
||||||
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: 20
|
|
||||||
m_FontStyle: 0
|
|
||||||
m_BestFit: 0
|
|
||||||
m_MinSize: 2
|
|
||||||
m_MaxSize: 300
|
|
||||||
m_Alignment: 4
|
|
||||||
m_AlignByGeometry: 0
|
|
||||||
m_RichText: 1
|
|
||||||
m_HorizontalOverflow: 1
|
|
||||||
m_VerticalOverflow: 1
|
|
||||||
m_LineSpacing: 1
|
|
||||||
m_Text: NAME
|
|
||||||
--- !u!1 &8290338740711049006
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 8754483333502849411}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Root
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &8754483333502849411
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 8290338740711049006}
|
|
||||||
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: 1323634865265500141}
|
|
||||||
- {fileID: 8105925540140519754}
|
|
||||||
- {fileID: 8789823129857705082}
|
|
||||||
m_Father: {fileID: 1998281097548910301}
|
|
||||||
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}
|
|
@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: e6df0d7c236795247971f0d1e691b068
|
|
||||||
PrefabImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -353,7 +353,6 @@ MonoBehaviour:
|
|||||||
Descript: {fileID: 3380485461544738227}
|
Descript: {fileID: 3380485461544738227}
|
||||||
Root: {fileID: 8754483333502849411}
|
Root: {fileID: 8754483333502849411}
|
||||||
ShadowIcon: {fileID: 2619187604372594158}
|
ShadowIcon: {fileID: 2619187604372594158}
|
||||||
InfoNode: {fileID: 2621205976727769389}
|
|
||||||
SubMenuItemGroup: {fileID: 0}
|
SubMenuItemGroup: {fileID: 0}
|
||||||
SelectScale: 1
|
SelectScale: 1
|
||||||
UnSelectScale: 1
|
UnSelectScale: 1
|
||||||
@ -388,7 +387,6 @@ GameObject:
|
|||||||
- component: {fileID: 8789823129857705082}
|
- component: {fileID: 8789823129857705082}
|
||||||
- component: {fileID: 3252398029444565139}
|
- component: {fileID: 3252398029444565139}
|
||||||
- component: {fileID: 4972426757569440742}
|
- component: {fileID: 4972426757569440742}
|
||||||
- component: {fileID: 2621205976727769389}
|
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: InfoNode
|
m_Name: InfoNode
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -457,18 +455,6 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_HorizontalFit: 2
|
m_HorizontalFit: 2
|
||||||
m_VerticalFit: 2
|
m_VerticalFit: 2
|
||||||
--- !u!225 &2621205976727769389
|
|
||||||
CanvasGroup:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3993825260653792697}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_Alpha: 1
|
|
||||||
m_Interactable: 1
|
|
||||||
m_BlocksRaycasts: 1
|
|
||||||
m_IgnoreParentGroups: 0
|
|
||||||
--- !u!1 &5340761592919397836
|
--- !u!1 &5340761592919397836
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -123,6 +123,155 @@ NavMeshSettings:
|
|||||||
debug:
|
debug:
|
||||||
m_Flags: 0
|
m_Flags: 0
|
||||||
m_NavMeshData: {fileID: 0}
|
m_NavMeshData: {fileID: 0}
|
||||||
|
--- !u!1 &1232273651
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1232273654}
|
||||||
|
- component: {fileID: 1232273653}
|
||||||
|
- component: {fileID: 1232273652}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Main Camera
|
||||||
|
m_TagString: MainCamera
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!81 &1232273652
|
||||||
|
AudioListener:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1232273651}
|
||||||
|
m_Enabled: 1
|
||||||
|
--- !u!20 &1232273653
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1232273651}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 1
|
||||||
|
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
m_projectionMatrixMode: 1
|
||||||
|
m_GateFitMode: 2
|
||||||
|
m_FOVAxisMode: 0
|
||||||
|
m_SensorSize: {x: 36, y: 24}
|
||||||
|
m_LensShift: {x: 0, y: 0}
|
||||||
|
m_FocalLength: 50
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: 0.3
|
||||||
|
far clip plane: 1000
|
||||||
|
field of view: 60
|
||||||
|
orthographic: 0
|
||||||
|
orthographic size: 5
|
||||||
|
m_Depth: -1
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 3
|
||||||
|
m_HDR: 1
|
||||||
|
m_AllowMSAA: 1
|
||||||
|
m_AllowDynamicResolution: 0
|
||||||
|
m_ForceIntoRT: 0
|
||||||
|
m_OcclusionCulling: 1
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!4 &1232273654
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1232273651}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &1359344831
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1359344834}
|
||||||
|
- component: {fileID: 1359344833}
|
||||||
|
- component: {fileID: 1359344832}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: EventSystem
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &1359344832
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1359344831}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_HorizontalAxis: Horizontal
|
||||||
|
m_VerticalAxis: Vertical
|
||||||
|
m_SubmitButton: Submit
|
||||||
|
m_CancelButton: Cancel
|
||||||
|
m_InputActionsPerSecond: 10
|
||||||
|
m_RepeatDelay: 0.5
|
||||||
|
m_ForceModuleActive: 0
|
||||||
|
--- !u!114 &1359344833
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1359344831}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_FirstSelected: {fileID: 0}
|
||||||
|
m_sendNavigationEvents: 1
|
||||||
|
m_DragThreshold: 10
|
||||||
|
--- !u!4 &1359344834
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1359344831}
|
||||||
|
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}
|
||||||
--- !u!1001 &4232056520998800727
|
--- !u!1001 &4232056520998800727
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -132,7 +281,7 @@ PrefabInstance:
|
|||||||
m_Modifications:
|
m_Modifications:
|
||||||
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||||
propertyPath: m_RootOrder
|
propertyPath: m_RootOrder
|
||||||
value: 0
|
value: 2
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
using AxibugEmuOnline.Client.Manager;
|
using AxibugEmuOnline.Client.Manager;
|
||||||
using AxibugEmuOnline.Client.Network;
|
using AxibugEmuOnline.Client.Network;
|
||||||
using System;
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client.ClientCore
|
namespace AxibugEmuOnline.Client.ClientCore
|
||||||
{
|
{
|
||||||
public static class AppAxibugEmuOnline
|
public class AppAxibugEmuOnline
|
||||||
{
|
{
|
||||||
public static string TokenStr;
|
public static string TokenStr;
|
||||||
public static long RID = -1;
|
public static long RID = -1;
|
||||||
@ -19,15 +18,11 @@ namespace AxibugEmuOnline.Client.ClientCore
|
|||||||
public static UserDataManager user;
|
public static UserDataManager user;
|
||||||
public static AppNetGame netgame;
|
public static AppNetGame netgame;
|
||||||
public static AppEmu emu;
|
public static AppEmu emu;
|
||||||
public static RomLib nesRomLib;
|
public static RomLib romLib;
|
||||||
public static HttpAPI httpAPI;
|
public static HttpAPI httpAPI;
|
||||||
public static CacheManager CacheMgr;
|
|
||||||
public static AppSceneLoader SceneLoader;
|
|
||||||
|
|
||||||
private static CoroutineRunner coRunner;
|
private static CoroutineRunner coRunner;
|
||||||
|
|
||||||
public static string PersistentDataPath => Application.persistentDataPath;
|
|
||||||
|
|
||||||
[RuntimeInitializeOnLoadMethod]
|
[RuntimeInitializeOnLoadMethod]
|
||||||
static void Init()
|
static void Init()
|
||||||
{
|
{
|
||||||
@ -39,30 +34,12 @@ namespace AxibugEmuOnline.Client.ClientCore
|
|||||||
user = new UserDataManager();
|
user = new UserDataManager();
|
||||||
emu = new AppEmu();
|
emu = new AppEmu();
|
||||||
netgame = new AppNetGame();
|
netgame = new AppNetGame();
|
||||||
|
romLib = new RomLib();
|
||||||
httpAPI = new HttpAPI();
|
httpAPI = new HttpAPI();
|
||||||
nesRomLib = new RomLib(EnumPlatform.NES);
|
|
||||||
CacheMgr = new CacheManager();
|
|
||||||
SceneLoader = new AppSceneLoader();
|
|
||||||
|
|
||||||
var go = new GameObject("[AppAxibugEmuOnline]");
|
var go = new GameObject("[AppAxibugEmuOnline]");
|
||||||
GameObject.DontDestroyOnLoad(go);
|
GameObject.DontDestroyOnLoad(go);
|
||||||
coRunner = go.AddComponent<CoroutineRunner>();
|
coRunner = go.AddComponent<CoroutineRunner>();
|
||||||
|
|
||||||
StartCoroutine(AppTickFlow());
|
|
||||||
}
|
|
||||||
|
|
||||||
private static IEnumerator AppTickFlow()
|
|
||||||
{
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
Tick();
|
|
||||||
yield return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void Tick()
|
|
||||||
{
|
|
||||||
nesRomLib.ExecuteFetchRomInfo();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Coroutine StartCoroutine(IEnumerator itor)
|
public static Coroutine StartCoroutine(IEnumerator itor)
|
||||||
|
@ -1,90 +0,0 @@
|
|||||||
using AxibugEmuOnline.Client.ClientCore;
|
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.SceneManagement;
|
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
|
||||||
{
|
|
||||||
public class AppSceneLoader
|
|
||||||
{
|
|
||||||
|
|
||||||
public LoadTask CurrentTask { get; private set; }
|
|
||||||
|
|
||||||
Queue<LoadTask> m_tasks = new Queue<LoadTask>();
|
|
||||||
Coroutine m_coroutine;
|
|
||||||
public void BeginLoad(string scenePath, Action callback)
|
|
||||||
{
|
|
||||||
m_tasks.Enqueue(new LoadTask(scenePath, callback));
|
|
||||||
if (m_coroutine == null)
|
|
||||||
m_coroutine = AppAxibugEmuOnline.StartCoroutine(TaskFlow());
|
|
||||||
}
|
|
||||||
|
|
||||||
private IEnumerator TaskFlow()
|
|
||||||
{
|
|
||||||
while (m_tasks.Count > 0)
|
|
||||||
{
|
|
||||||
CurrentTask = m_tasks.Dequeue();
|
|
||||||
|
|
||||||
while (CurrentTask.MoveNext()) yield return null;
|
|
||||||
|
|
||||||
CurrentTask.Callback();
|
|
||||||
}
|
|
||||||
|
|
||||||
CurrentTask = null;
|
|
||||||
m_coroutine = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class LoadTask
|
|
||||||
{
|
|
||||||
public EnumTaskState State { get; private set; } = EnumTaskState.Idle;
|
|
||||||
public float Progress => m_loadingOp != null ? m_loadingOp.progress : 0;
|
|
||||||
|
|
||||||
private AsyncOperation m_loadingOp;
|
|
||||||
private string m_scenePath;
|
|
||||||
private Action m_callback;
|
|
||||||
public LoadTask(string scenePath, Action callback)
|
|
||||||
{
|
|
||||||
m_scenePath = scenePath;
|
|
||||||
m_callback = callback;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool MoveNext()
|
|
||||||
{
|
|
||||||
if (State == EnumTaskState.Idle)
|
|
||||||
{
|
|
||||||
State = EnumTaskState.Running;
|
|
||||||
m_loadingOp = SceneManager.LoadSceneAsync(m_scenePath, LoadSceneMode.Single);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (State == EnumTaskState.Running)
|
|
||||||
{
|
|
||||||
m_loadingOp.allowSceneActivation = true;
|
|
||||||
if (m_loadingOp.isDone)
|
|
||||||
{
|
|
||||||
State = EnumTaskState.Complete;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Callback()
|
|
||||||
{
|
|
||||||
m_callback?.Invoke();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum EnumTaskState
|
|
||||||
{
|
|
||||||
Idle,
|
|
||||||
Running,
|
|
||||||
Complete
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,95 +0,0 @@
|
|||||||
using AxibugEmuOnline.Client.ClientCore;
|
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.Networking;
|
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
|
||||||
{
|
|
||||||
public class CacheManager
|
|
||||||
{
|
|
||||||
static readonly string CacheDirPath = $"{AppAxibugEmuOnline.PersistentDataPath}/Caches";
|
|
||||||
static readonly string TextureCacheDirPath = $"{CacheDirPath}/Texture";
|
|
||||||
|
|
||||||
public void GetSpriteCache(string url, Action<Sprite, string> callback)
|
|
||||||
{
|
|
||||||
GetCacheData(url, TextureCacheDirPath, callback);
|
|
||||||
}
|
|
||||||
|
|
||||||
IEnumerator DownloadFromURL(string url, string path, Action<byte[]> callback)
|
|
||||||
{
|
|
||||||
var request = UnityWebRequest.Get($"{AppAxibugEmuOnline.httpAPI.DownSite}/{url}");
|
|
||||||
yield return request.SendWebRequest();
|
|
||||||
|
|
||||||
if (request.result == UnityWebRequest.Result.Success)
|
|
||||||
{
|
|
||||||
Directory.CreateDirectory(path);
|
|
||||||
File.WriteAllBytes($"{path}/{url.GetHashCode()}", request.downloadHandler.data);
|
|
||||||
callback.Invoke(request.downloadHandler.data);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
callback.Invoke(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
private Dictionary<string, object> cachesInMemory = new Dictionary<string, object>();
|
|
||||||
void GetCacheData<T>(string url, string path, Action<T, string> callback) where T : class
|
|
||||||
{
|
|
||||||
if (cachesInMemory.TryGetValue(url, out var cacheObj) && cacheObj is T obj)
|
|
||||||
{
|
|
||||||
callback.Invoke(obj, url);
|
|
||||||
}
|
|
||||||
|
|
||||||
var fileName = $"{url.GetHashCode()}";
|
|
||||||
byte[] rawData = null;
|
|
||||||
|
|
||||||
var filePath = $"{path}/{fileName}";
|
|
||||||
if (File.Exists(filePath))
|
|
||||||
{
|
|
||||||
rawData = File.ReadAllBytes(filePath);
|
|
||||||
var @out = RawDataConvert<T>(rawData);
|
|
||||||
cachesInMemory[url] = @out;
|
|
||||||
callback.Invoke(@out, url);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
AppAxibugEmuOnline.StartCoroutine(DownloadFromURL(url, path, (data) =>
|
|
||||||
{
|
|
||||||
var @out = RawDataConvert<T>(data);
|
|
||||||
cachesInMemory[url] = @out;
|
|
||||||
callback.Invoke(@out, url);
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Type t_texture2d = typeof(Texture2D);
|
|
||||||
Type t_sprite = typeof(Sprite);
|
|
||||||
Type t_byteArray = typeof(byte[]);
|
|
||||||
Type t_object = typeof(object);
|
|
||||||
|
|
||||||
T RawDataConvert<T>(byte[] data) where T : class
|
|
||||||
{
|
|
||||||
var vt = typeof(T);
|
|
||||||
|
|
||||||
if (vt == t_texture2d || vt == t_sprite)
|
|
||||||
{
|
|
||||||
Texture2D texture = new Texture2D(2, 2);
|
|
||||||
texture.LoadImage(data);
|
|
||||||
|
|
||||||
if (vt == t_texture2d) return texture as T;
|
|
||||||
else return Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f)) as T;
|
|
||||||
}
|
|
||||||
else if (vt == t_byteArray)
|
|
||||||
{
|
|
||||||
return data as T;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return data as T;
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new NotImplementedException($"{vt.Name}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 03fa430ca22517548b510b71d54ab2d6
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -12,8 +12,6 @@ namespace AxibugEmuOnline.Client
|
|||||||
public string WebSite = "http://emu.axibug.com/api";
|
public string WebSite = "http://emu.axibug.com/api";
|
||||||
public string DownSite = "http://emu.axibug.com";
|
public string DownSite = "http://emu.axibug.com";
|
||||||
|
|
||||||
public delegate void GetRomListAPI(Action<Resp_GameList> callback, int page, int pageSize = 10);
|
|
||||||
|
|
||||||
public void GetNesRomList(Action<Resp_GameList> callback, int page, int pageSize = 10)
|
public void GetNesRomList(Action<Resp_GameList> callback, int page, int pageSize = 10)
|
||||||
{
|
{
|
||||||
AppAxibugEmuOnline.StartCoroutine(GetNesRomListFlow(page, pageSize, callback));
|
AppAxibugEmuOnline.StartCoroutine(GetNesRomListFlow(page, pageSize, callback));
|
||||||
@ -68,7 +66,6 @@ namespace AxibugEmuOnline.Client
|
|||||||
[Serializable]
|
[Serializable]
|
||||||
public class Resp_RomInfo
|
public class Resp_RomInfo
|
||||||
{
|
{
|
||||||
public int orderid;
|
|
||||||
public int id;
|
public int id;
|
||||||
public string romName;
|
public string romName;
|
||||||
public string gType;
|
public string gType;
|
||||||
|
@ -15,44 +15,23 @@ namespace AxibugEmuOnline.Client
|
|||||||
private string fileName;
|
private string fileName;
|
||||||
private EnumPlatform platform;
|
private EnumPlatform platform;
|
||||||
|
|
||||||
/// <summary> 指示该Rom文件的存放路径 </summary>
|
public string LocalFilePath => $"{CoreSupporter.PersistentDataPath}/RemoteRoms/{platform}/{fileName}";
|
||||||
public string LocalFilePath => $"{AppAxibugEmuOnline.PersistentDataPath}/RemoteRoms/{platform}/{fileName}";
|
public bool FileReady => hasLocalFile;
|
||||||
/// <summary> 指示该Rom文件是否已下载完毕 </summary>
|
|
||||||
public bool RomReady => hasLocalFile;
|
|
||||||
/// <summary> 指示是否正在下载Rom文件 </summary>
|
|
||||||
public bool IsDownloading { get; private set; }
|
|
||||||
|
|
||||||
/// <summary> 指示该Rom信息是否已填充 </summary>
|
|
||||||
public bool InfoReady => webData != null;
|
|
||||||
/// <summary> 唯一标识 </summary>
|
|
||||||
public int ID => webData != null ? webData.id : -1;
|
public int ID => webData != null ? webData.id : -1;
|
||||||
/// <summary> 别名 </summary>
|
public bool IsDownloading { get; private set; }
|
||||||
public string Alias => webData.romName;
|
public string Alias => webData.romName;
|
||||||
/// <summary> 描述 </summary>
|
|
||||||
public string Descript => webData.desc;
|
|
||||||
/// <summary> 小图URL </summary>
|
|
||||||
public string ImageURL => webData.imgUrl;
|
|
||||||
|
|
||||||
/// <summary> 文件名 </summary>
|
|
||||||
public string FileName => fileName;
|
public string FileName => fileName;
|
||||||
/// <summary> 在查询结果中的索引 </summary>
|
|
||||||
public int Index { get; private set; }
|
|
||||||
/// <summary> 在查询结果中的所在页 </summary>
|
|
||||||
public int Page { get; private set; }
|
|
||||||
|
|
||||||
public event Action OnDownloadOver;
|
public event Action OnDownloadOver;
|
||||||
public event Action OnInfoFilled;
|
|
||||||
|
|
||||||
public RomFile(EnumPlatform platform, int index, int insidePage)
|
public RomFile(EnumPlatform platform)
|
||||||
{
|
{
|
||||||
this.platform = platform;
|
this.platform = platform;
|
||||||
Index = index;
|
|
||||||
Page = insidePage;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BeginDownload()
|
public void BeginDownload()
|
||||||
{
|
{
|
||||||
if (RomReady) return;
|
if (FileReady) return;
|
||||||
if (IsDownloading) return;
|
if (IsDownloading) return;
|
||||||
|
|
||||||
IsDownloading = true;
|
IsDownloading = true;
|
||||||
@ -75,7 +54,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
public byte[] GetRomFileData()
|
public byte[] GetRomFileData()
|
||||||
{
|
{
|
||||||
if (webData == null) throw new Exception("Not Valid Rom");
|
if (webData == null) throw new Exception("Not Valid Rom");
|
||||||
if (!RomReady) throw new Exception("Rom File Not Downloaded");
|
if (!FileReady) throw new Exception("Rom File Not Downloaded");
|
||||||
|
|
||||||
var bytes = File.ReadAllBytes(LocalFilePath);
|
var bytes = File.ReadAllBytes(LocalFilePath);
|
||||||
if (Path.GetExtension(LocalFilePath).ToLower() == ".zip")
|
if (Path.GetExtension(LocalFilePath).ToLower() == ".zip")
|
||||||
@ -139,8 +118,6 @@ namespace AxibugEmuOnline.Client
|
|||||||
{
|
{
|
||||||
hasLocalFile = false;
|
hasLocalFile = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
OnInfoFilled?.Invoke();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,93 +1,52 @@
|
|||||||
using AxibugEmuOnline.Client.ClientCore;
|
using AxibugEmuOnline.Client.ClientCore;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using static AxibugEmuOnline.Client.HttpAPI;
|
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
namespace AxibugEmuOnline.Client
|
||||||
{
|
{
|
||||||
public class RomLib
|
public class RomLib
|
||||||
{
|
{
|
||||||
/// <summary> Rom请求,一页的大小 </summary>
|
|
||||||
private const int PAGE_SIZE = 10;
|
|
||||||
|
|
||||||
/// <summary> 请求指令 </summary>
|
|
||||||
private HashSet<int> FetchPageCmd = new HashSet<int>();
|
|
||||||
private RomFile[] nesRomFetchList;
|
|
||||||
private Dictionary<int, RomFile> nesRomFileIdMapper = new Dictionary<int, RomFile>();
|
private Dictionary<int, RomFile> nesRomFileIdMapper = new Dictionary<int, RomFile>();
|
||||||
private Dictionary<string, RomFile> nesRomFileNameMapper = new Dictionary<string, RomFile>();
|
private Dictionary<string, RomFile> nesRomFileNameMapper = new Dictionary<string, RomFile>();
|
||||||
private HttpAPI.GetRomListAPI m_romGetFunc;
|
|
||||||
private EnumPlatform m_platform;
|
|
||||||
|
|
||||||
public RomLib(EnumPlatform platform)
|
public RomFile GetNesRomFile(string romFileName)
|
||||||
{
|
|
||||||
m_platform = platform;
|
|
||||||
switch (platform)
|
|
||||||
{
|
|
||||||
case EnumPlatform.NES:
|
|
||||||
m_romGetFunc = AppAxibugEmuOnline.httpAPI.GetNesRomList;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public RomFile GetRomFile(string romFileName)
|
|
||||||
{
|
{
|
||||||
RomFile romFile;
|
RomFile romFile;
|
||||||
nesRomFileNameMapper.TryGetValue(romFileName, out romFile);
|
nesRomFileNameMapper.TryGetValue(romFileName, out romFile);
|
||||||
return romFile;
|
return romFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
public void GetNesRomFile(int page, int pageSize, Action<List<RomFile>> callback)
|
||||||
/// 获得所有Rom文件
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="callback"></param>
|
|
||||||
public void FetchRomCount(Action<RomFile[]> callback)
|
|
||||||
{
|
{
|
||||||
m_romGetFunc((romList) =>
|
AppAxibugEmuOnline.httpAPI.GetNesRomList((romList) =>
|
||||||
{
|
{
|
||||||
FetchPageCmd.Clear();
|
if (romList == null)
|
||||||
nesRomFileIdMapper.Clear();
|
|
||||||
nesRomFileNameMapper.Clear();
|
|
||||||
nesRomFetchList = new RomFile[romList.resultAllCount];
|
|
||||||
for (int i = 0; i < nesRomFetchList.Length; i++)
|
|
||||||
{
|
{
|
||||||
//以后考虑用对象池实例化RomFile
|
callback.Invoke(null);
|
||||||
nesRomFetchList[i] = new RomFile(m_platform, i, i / PAGE_SIZE);
|
|
||||||
}
|
}
|
||||||
SaveRomInfoFromWeb(romList);
|
else
|
||||||
|
|
||||||
callback.Invoke(nesRomFetchList);
|
|
||||||
}, 0, PAGE_SIZE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void BeginFetchRomInfo(RomFile romFile)
|
|
||||||
{
|
{
|
||||||
if (romFile.InfoReady) return;
|
List<RomFile> result = new List<RomFile>();
|
||||||
|
for (int i = 0; i < romList.gameList.Count; i++)
|
||||||
FetchPageCmd.Add(romFile.Page);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ExecuteFetchRomInfo()
|
|
||||||
{
|
{
|
||||||
if (FetchPageCmd.Count == 0) return;
|
var webData = romList.gameList[i];
|
||||||
|
RomFile targetRomFile;
|
||||||
foreach (var pageNo in FetchPageCmd)
|
nesRomFileIdMapper.TryGetValue(webData.id, out targetRomFile);
|
||||||
|
if (targetRomFile == null)
|
||||||
{
|
{
|
||||||
m_romGetFunc(SaveRomInfoFromWeb, pageNo, PAGE_SIZE);
|
targetRomFile = new RomFile(EnumPlatform.NES);
|
||||||
}
|
|
||||||
FetchPageCmd.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SaveRomInfoFromWeb(Resp_GameList resp)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < resp.gameList.Count; i++)
|
|
||||||
{
|
|
||||||
var webData = resp.gameList[i];
|
|
||||||
RomFile targetRomFile = nesRomFetchList[webData.orderid];
|
|
||||||
|
|
||||||
targetRomFile.SetWebData(webData);
|
targetRomFile.SetWebData(webData);
|
||||||
nesRomFileIdMapper[webData.id] = nesRomFetchList[webData.orderid];
|
nesRomFileIdMapper[webData.id] = targetRomFile;
|
||||||
|
|
||||||
nesRomFileNameMapper[targetRomFile.FileName] = targetRomFile;
|
nesRomFileNameMapper[targetRomFile.FileName] = targetRomFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
result.Add(targetRomFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
callback(result);
|
||||||
|
}
|
||||||
|
}, page, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string CalcHash(byte[] data)
|
public static string CalcHash(byte[] data)
|
||||||
|
@ -8,11 +8,19 @@ namespace AxibugEmuOnline.Client
|
|||||||
{
|
{
|
||||||
public class CoreSupporter : ISupporterImpl
|
public class CoreSupporter : ISupporterImpl
|
||||||
{
|
{
|
||||||
|
public static string PersistentDataPath
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Application.persistentDataPath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Stream OpenRom(string fname)
|
public Stream OpenRom(string fname)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var romFile = AppAxibugEmuOnline.nesRomLib.GetRomFile(fname);
|
var romFile = AppAxibugEmuOnline.romLib.GetNesRomFile(fname);
|
||||||
var bytes = romFile.GetRomFileData();
|
var bytes = romFile.GetRomFileData();
|
||||||
Debug.Log($"Open {romFile.Alias}");
|
Debug.Log($"Open {romFile.Alias}");
|
||||||
return new MemoryStream(bytes);
|
return new MemoryStream(bytes);
|
||||||
@ -26,7 +34,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
|
|
||||||
public void GetRomPathInfo(string fname, out string fullPath, out string directPath)
|
public void GetRomPathInfo(string fname, out string fullPath, out string directPath)
|
||||||
{
|
{
|
||||||
var romFile = AppAxibugEmuOnline.nesRomLib.GetRomFile(fname);
|
var romFile = AppAxibugEmuOnline.romLib.GetNesRomFile(fname);
|
||||||
UnityEngine.Debug.Assert(romFile != null);
|
UnityEngine.Debug.Assert(romFile != null);
|
||||||
|
|
||||||
fullPath = romFile.LocalFilePath;
|
fullPath = romFile.LocalFilePath;
|
||||||
@ -40,7 +48,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
|
|
||||||
public void SaveSRAMToFile(byte[] sramContent, string romName)
|
public void SaveSRAMToFile(byte[] sramContent, string romName)
|
||||||
{
|
{
|
||||||
string sramDirectoryPath = $"{AppAxibugEmuOnline.PersistentDataPath}/sav";
|
string sramDirectoryPath = $"{Application.persistentDataPath}/sav";
|
||||||
Directory.CreateDirectory(sramDirectoryPath);
|
Directory.CreateDirectory(sramDirectoryPath);
|
||||||
romName = Path.GetFileNameWithoutExtension(romName);
|
romName = Path.GetFileNameWithoutExtension(romName);
|
||||||
File.WriteAllBytes($"{sramDirectoryPath}/{romName}.sav", sramContent);
|
File.WriteAllBytes($"{sramDirectoryPath}/{romName}.sav", sramContent);
|
||||||
@ -48,7 +56,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
|
|
||||||
public void SaveDISKToFile(byte[] diskFileContent, string romName)
|
public void SaveDISKToFile(byte[] diskFileContent, string romName)
|
||||||
{
|
{
|
||||||
string diskFileDirectoryPath = $"{AppAxibugEmuOnline.PersistentDataPath}/dsv";
|
string diskFileDirectoryPath = $"{Application.persistentDataPath}/dsv";
|
||||||
Directory.CreateDirectory(diskFileDirectoryPath);
|
Directory.CreateDirectory(diskFileDirectoryPath);
|
||||||
romName = Path.GetFileNameWithoutExtension(romName);
|
romName = Path.GetFileNameWithoutExtension(romName);
|
||||||
File.WriteAllBytes($"{diskFileDirectoryPath}/{romName}.dsv", diskFileContent);
|
File.WriteAllBytes($"{diskFileDirectoryPath}/{romName}.dsv", diskFileContent);
|
||||||
@ -58,14 +66,14 @@ namespace AxibugEmuOnline.Client
|
|||||||
|
|
||||||
public void PrepareDirectory(string directPath)
|
public void PrepareDirectory(string directPath)
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory($"{AppAxibugEmuOnline.PersistentDataPath}/{directPath}");
|
Directory.CreateDirectory($"{Application.persistentDataPath}/{directPath}");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SaveFile(byte[] fileData, string directPath, string fileName)
|
public void SaveFile(byte[] fileData, string directPath, string fileName)
|
||||||
{
|
{
|
||||||
PrepareDirectory(directPath);
|
PrepareDirectory(directPath);
|
||||||
|
|
||||||
var fileFullpath = $"{AppAxibugEmuOnline.PersistentDataPath}/{directPath}/{fileName}";
|
var fileFullpath = $"{Application.persistentDataPath}/{directPath}/{fileName}";
|
||||||
File.WriteAllBytes(fileFullpath, fileData);
|
File.WriteAllBytes(fileFullpath, fileData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,7 +81,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var data = File.ReadAllBytes($"{AppAxibugEmuOnline.PersistentDataPath}/{directPath}/{fileName}");
|
var data = File.ReadAllBytes($"{Application.persistentDataPath}/{directPath}/{fileName}");
|
||||||
if (data == null) return null;
|
if (data == null) return null;
|
||||||
return new MemoryStream(data);
|
return new MemoryStream(data);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using AxibugEmuOnline.Client.ClientCore;
|
using System;
|
||||||
using System;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using VirtualNes.Core;
|
using VirtualNes.Core;
|
||||||
@ -8,7 +7,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
{
|
{
|
||||||
public class NesControllerMapper
|
public class NesControllerMapper
|
||||||
{
|
{
|
||||||
private static readonly string ConfigFilePath = $"{AppAxibugEmuOnline.PersistentDataPath}/NES/ControllerMapper.json";
|
private static readonly string ConfigFilePath = $"{Application.persistentDataPath}/NES/ControllerMapper.json";
|
||||||
|
|
||||||
public MapperSetter Player1 = new MapperSetter();
|
public MapperSetter Player1 = new MapperSetter();
|
||||||
public MapperSetter Player2 = new MapperSetter();
|
public MapperSetter Player2 = new MapperSetter();
|
||||||
@ -50,7 +49,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var json = File.ReadAllText($"{AppAxibugEmuOnline.PersistentDataPath}/Nes/ControllerMapper.json");
|
var json = File.ReadAllText($"{Application.persistentDataPath}/Nes/ControllerMapper.json");
|
||||||
s_setting = JsonUtility.FromJson<NesControllerMapper>(json);
|
s_setting = JsonUtility.FromJson<NesControllerMapper>(json);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
@ -8,7 +8,6 @@ using VirtualNes.Core.Debug;
|
|||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
namespace AxibugEmuOnline.Client
|
||||||
{
|
{
|
||||||
|
|
||||||
public class NesEmulator : MonoBehaviour
|
public class NesEmulator : MonoBehaviour
|
||||||
{
|
{
|
||||||
public NES NesCore { get; private set; }
|
public NES NesCore { get; private set; }
|
||||||
@ -62,8 +61,8 @@ namespace AxibugEmuOnline.Client
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
[ContextMenu("ImportNesDB")]
|
[ContextMenu("IMPORT")]
|
||||||
public void ImportNesDB()
|
public void TTTA()
|
||||||
{
|
{
|
||||||
var db = Resources.Load<RomDB>("NES/ROMDB");
|
var db = Resources.Load<RomDB>("NES/ROMDB");
|
||||||
db.Clear();
|
db.Clear();
|
||||||
@ -86,11 +85,36 @@ namespace AxibugEmuOnline.Client
|
|||||||
UnityEditor.AssetDatabase.SaveAssets();
|
UnityEditor.AssetDatabase.SaveAssets();
|
||||||
}
|
}
|
||||||
|
|
||||||
[ContextMenu("GetState")]
|
[ContextMenu("LoadRom")]
|
||||||
public void GetState()
|
public void LoadRom()
|
||||||
{
|
{
|
||||||
var state = NesCore.GetState();
|
AppAxibugEmuOnline.romLib.GetNesRomFile(0, 10, (romFiles) =>
|
||||||
var bytes = state.ToBytes();
|
{
|
||||||
|
if (romFiles == null) return;
|
||||||
|
|
||||||
|
var file = romFiles[2];
|
||||||
|
|
||||||
|
if (file.FileReady)
|
||||||
|
{
|
||||||
|
StartGame(file);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
file.BeginDownload();
|
||||||
|
Action action = null;
|
||||||
|
action = () =>
|
||||||
|
{
|
||||||
|
file.OnDownloadOver -= action;
|
||||||
|
if (!file.FileReady)
|
||||||
|
{
|
||||||
|
throw new Exception("Download Failed");
|
||||||
|
}
|
||||||
|
StartGame(file);
|
||||||
|
};
|
||||||
|
file.OnDownloadOver += action;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@ namespace AxibugEmuOnline.Client
|
|||||||
private int TexBufferSize;
|
private int TexBufferSize;
|
||||||
|
|
||||||
private Texture2D pPal;
|
private Texture2D pPal;
|
||||||
|
|
||||||
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)
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
|
||||||
{
|
|
||||||
[RequireComponent(typeof(CanvasGroup))]
|
|
||||||
public class AutoRaycastCanvasGroup : MonoBehaviour
|
|
||||||
{
|
|
||||||
private CanvasGroup canvasGroup;
|
|
||||||
private void Update()
|
|
||||||
{
|
|
||||||
if (canvasGroup == null) canvasGroup = gameObject.GetComponent<CanvasGroup>();
|
|
||||||
|
|
||||||
canvasGroup.blocksRaycasts = canvasGroup.alpha == 0 ? false : true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 4215c9d5a613e24428c8c705464719e3
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,82 +0,0 @@
|
|||||||
using AxibugEmuOnline.Client.UI;
|
|
||||||
using DG.Tweening;
|
|
||||||
using DG.Tweening.Core;
|
|
||||||
using DG.Tweening.Plugins.Options;
|
|
||||||
using UnityEngine;
|
|
||||||
using static Codice.Client.BaseCommands.Import.Commit;
|
|
||||||
using App = AxibugEmuOnline.Client.ClientCore.AppAxibugEmuOnline;
|
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
|
||||||
{
|
|
||||||
public class Game_NES : MenuItem
|
|
||||||
{
|
|
||||||
[SerializeField]
|
|
||||||
CanvasGroup RomGroupRoot;
|
|
||||||
private TweenerCore<float, float, FloatOptions> m_showTween;
|
|
||||||
|
|
||||||
private void Awake()
|
|
||||||
{
|
|
||||||
RomGroupRoot.gameObject.SetActive(false);
|
|
||||||
RomGroupRoot.alpha = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SetSelectState(bool selected)
|
|
||||||
{
|
|
||||||
if (m_select == selected) return;
|
|
||||||
|
|
||||||
m_select = selected;
|
|
||||||
|
|
||||||
if (ShadowIcon != null) ShadowIcon.gameObject.SetActiveEx(selected);
|
|
||||||
|
|
||||||
if (progressTween != null) { progressTween.Kill(); progressTween = null; }
|
|
||||||
|
|
||||||
progressTween = DOTween.To(() => m_progress, (x) => m_progress = x, m_select ? 1 : 0, 5)
|
|
||||||
.SetSpeedBased().OnUpdate(() =>
|
|
||||||
{
|
|
||||||
if (InfoNode != null) InfoNode.alpha = m_progress;
|
|
||||||
|
|
||||||
Root.localScale = Vector3.one * Mathf.Lerp(UnSelectScale, SelectScale, m_progress);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnEnterItem()
|
|
||||||
{
|
|
||||||
RomGroupRoot.gameObject.SetActive(true);
|
|
||||||
RomGroupRoot.alpha = 0;
|
|
||||||
|
|
||||||
if (m_showTween != null)
|
|
||||||
{
|
|
||||||
m_showTween.Kill();
|
|
||||||
m_showTween = null;
|
|
||||||
}
|
|
||||||
m_showTween = DOTween.To(() => RomGroupRoot.alpha, (x) => RomGroupRoot.alpha = x, 1, 0.2f);
|
|
||||||
|
|
||||||
App.nesRomLib.FetchRomCount((roms) =>
|
|
||||||
{
|
|
||||||
var thirdMenuGroup = SubMenuItemGroup as ThirdMenuRoot;
|
|
||||||
thirdMenuGroup.itemGroup.UpdateDependencyProperty(thirdMenuGroup);
|
|
||||||
thirdMenuGroup.itemGroup.SetData(roms);
|
|
||||||
thirdMenuGroup.itemGroup.UpdateProxyVisualState();
|
|
||||||
thirdMenuGroup.SelectIndex = 0;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (SubMenuItemGroup != null) SubMenuItemGroup.SetSelect(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnExitItem()
|
|
||||||
{
|
|
||||||
if (m_showTween != null)
|
|
||||||
{
|
|
||||||
m_showTween.Kill();
|
|
||||||
m_showTween = null;
|
|
||||||
}
|
|
||||||
m_showTween = DOTween.To(() => RomGroupRoot.alpha, (x) => RomGroupRoot.alpha = x, 0, 0.2f)
|
|
||||||
.OnComplete(() =>
|
|
||||||
{
|
|
||||||
RomGroupRoot.gameObject.SetActive(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
if (SubMenuItemGroup != null) SubMenuItemGroup.SetSelect(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: e2f2e38adaa854144b67512333b1b363
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: fb61074022db71f4a881a1c7fd10517e
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,58 +0,0 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
public static class GameObjectPool
|
|
||||||
{
|
|
||||||
private static GameObject PoolAttach;
|
|
||||||
private static Dictionary<GameObject, Queue<GameObject>> s_poolMap = new Dictionary<GameObject, Queue<GameObject>>();
|
|
||||||
private static Dictionary<GameObject, GameObject> s_instanceToSrc = new Dictionary<GameObject, GameObject>();
|
|
||||||
public static GameObject GetInstance(GameObject prefabSrc, Transform parent)
|
|
||||||
{
|
|
||||||
if (PoolAttach == null)
|
|
||||||
{
|
|
||||||
PoolAttach = new GameObject("[GameObjectPool]");
|
|
||||||
PoolAttach.transform.localScale = Vector3.zero;
|
|
||||||
GameObject.DontDestroyOnLoad(PoolAttach);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!s_poolMap.ContainsKey(prefabSrc)) s_poolMap[prefabSrc] = new Queue<GameObject>();
|
|
||||||
|
|
||||||
GameObject instance = null;
|
|
||||||
var pool = s_poolMap[prefabSrc];
|
|
||||||
if (pool.Count > 0)
|
|
||||||
{
|
|
||||||
instance = pool.Dequeue();
|
|
||||||
instance.transform.SetParent(parent, true);
|
|
||||||
instance.transform.localScale = prefabSrc.transform.localScale;
|
|
||||||
instance.transform.localRotation = prefabSrc.transform.localRotation;
|
|
||||||
instance.transform.localPosition = prefabSrc.transform.localPosition;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
instance = GameObject.Instantiate(prefabSrc, parent);
|
|
||||||
s_instanceToSrc[instance] = prefabSrc;
|
|
||||||
}
|
|
||||||
|
|
||||||
//instance.SetActive(true);
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Release(GameObject instance)
|
|
||||||
{
|
|
||||||
s_instanceToSrc.TryGetValue(instance, out var src);
|
|
||||||
if (src != null && s_poolMap.TryGetValue(src, out var pool))
|
|
||||||
{
|
|
||||||
pool.Enqueue(instance);
|
|
||||||
//instance.SetActive(false);
|
|
||||||
if (instance == null) return;
|
|
||||||
if (PoolAttach == null) return;
|
|
||||||
|
|
||||||
instance.transform.SetParent(PoolAttach.transform, true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
GameObject.Destroy(instance);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: b7775611896d42b429b31897cff4c6f7
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,542 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
public class ItemPresent : GridLayoutGroup, IVirtualLayout
|
|
||||||
{
|
|
||||||
public RectTransform ItemTemplate;
|
|
||||||
public RectTransform ViewRect;
|
|
||||||
|
|
||||||
private Dictionary<GameObject, ScripteInterface> _cacheItemScripts = new Dictionary<GameObject, ScripteInterface>();
|
|
||||||
private List<object> _dataList;
|
|
||||||
private object _dependencyProperty;
|
|
||||||
private Vector2 _layoutCellsize;
|
|
||||||
|
|
||||||
public Action OnItemDelayShowPorcessComplete;
|
|
||||||
|
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
|
||||||
public int EditorOnlyItemCount
|
|
||||||
{
|
|
||||||
get => ItemCount;
|
|
||||||
set => ItemCount = value;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
private int ItemCount
|
|
||||||
{
|
|
||||||
get => children.Count;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value == ItemCount) return;
|
|
||||||
|
|
||||||
if (value <= 0)
|
|
||||||
{
|
|
||||||
foreach (var child in children)
|
|
||||||
{
|
|
||||||
child.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
children.Clear();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var gap = value - children.Count;
|
|
||||||
|
|
||||||
if (gap > 0)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < gap; i++)
|
|
||||||
{
|
|
||||||
ItemProxy item = new ItemProxy(ItemTemplate, this);
|
|
||||||
children.Add(item);
|
|
||||||
item.Width = cellSize.x;
|
|
||||||
item.Height = cellSize.y;
|
|
||||||
item.Index = children.Count - 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (gap < 0)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < -gap; i++)
|
|
||||||
{
|
|
||||||
int removeIndex = children.Count - 1;
|
|
||||||
children[removeIndex].Dispose();
|
|
||||||
children.RemoveAt(removeIndex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SetDirty();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private List<ItemProxy> children = new List<ItemProxy>();
|
|
||||||
|
|
||||||
private List<ItemProxy> handleChildren = new List<ItemProxy>();
|
|
||||||
private bool m_dataDirty;
|
|
||||||
|
|
||||||
public override void CalculateLayoutInputHorizontal()
|
|
||||||
{
|
|
||||||
handleChildren.Clear();
|
|
||||||
for (int i = 0; i < children.Count; i++)
|
|
||||||
{
|
|
||||||
var child = children[i];
|
|
||||||
if (child.IsDestroyed || !child.Visible)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
handleChildren.Add(child);
|
|
||||||
}
|
|
||||||
m_Tracker.Clear();
|
|
||||||
updateFixHeightAndWidth();
|
|
||||||
|
|
||||||
int minColumns = 0;
|
|
||||||
int preferredColumns = 0;
|
|
||||||
if (m_Constraint == Constraint.FixedColumnCount)
|
|
||||||
{
|
|
||||||
minColumns = preferredColumns = m_ConstraintCount;
|
|
||||||
}
|
|
||||||
else if (m_Constraint == Constraint.FixedRowCount)
|
|
||||||
{
|
|
||||||
minColumns = preferredColumns = Mathf.CeilToInt(handleChildren.Count / (float)m_ConstraintCount - 0.001f);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
minColumns = 1;
|
|
||||||
preferredColumns = Mathf.CeilToInt(Mathf.Sqrt(handleChildren.Count));
|
|
||||||
}
|
|
||||||
|
|
||||||
SetLayoutInputForAxis(
|
|
||||||
padding.horizontal + (_layoutCellsize.x + spacing.x) * minColumns - spacing.x,
|
|
||||||
padding.horizontal + (_layoutCellsize.x + spacing.x) * preferredColumns - spacing.x,
|
|
||||||
-1, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void MoveToScrollViewCenter(ScrollRect scrollRect, int dataIndex)
|
|
||||||
{
|
|
||||||
if (m_dataDirty)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < children.Count; i++)
|
|
||||||
{
|
|
||||||
var child = children[i];
|
|
||||||
child.UpdateLayout();
|
|
||||||
}
|
|
||||||
Canvas.ForceUpdateCanvases();
|
|
||||||
}
|
|
||||||
|
|
||||||
var targetProxy = children[dataIndex];
|
|
||||||
var width = rectTransform.rect.width;
|
|
||||||
var height = rectTransform.rect.height;
|
|
||||||
|
|
||||||
// Item is here
|
|
||||||
var itemCenterPositionInScroll = GetWorldPointInWidget(scrollRect.transform as RectTransform, GetWidgetWorldPoint(targetProxy));
|
|
||||||
//Debug.Log("Item Anchor Pos In Scroll: " + itemCenterPositionInScroll);
|
|
||||||
// But must be here
|
|
||||||
var targetPositionInScroll = GetWorldPointInWidget(scrollRect.transform as RectTransform, GetWidgetWorldPoint(scrollRect.viewport));
|
|
||||||
//Debug.Log("Target Anchor Pos In Scroll: " + targetPositionInScroll);
|
|
||||||
// So it has to move this distance
|
|
||||||
var difference = targetPositionInScroll - itemCenterPositionInScroll;
|
|
||||||
difference.z = 0f;
|
|
||||||
|
|
||||||
var newNormalizedPosition = new Vector2(difference.x / (rectTransform.rect.width - scrollRect.viewport.rect.width),
|
|
||||||
difference.y / (rectTransform.rect.height - scrollRect.viewport.rect.height));
|
|
||||||
|
|
||||||
newNormalizedPosition = scrollRect.normalizedPosition - newNormalizedPosition;
|
|
||||||
|
|
||||||
newNormalizedPosition.x = Mathf.Clamp01(newNormalizedPosition.x);
|
|
||||||
newNormalizedPosition.y = Mathf.Clamp01(newNormalizedPosition.y);
|
|
||||||
|
|
||||||
scrollRect.normalizedPosition = newNormalizedPosition;
|
|
||||||
//DOTween.To(() => scrollRect.normalizedPosition, x => scrollRect.normalizedPosition = x, newNormalizedPosition, 0.2f);
|
|
||||||
}
|
|
||||||
|
|
||||||
Vector3 GetWidgetWorldPoint(RectTransform target)
|
|
||||||
{
|
|
||||||
//pivot position + item size has to be included
|
|
||||||
var pivotOffset = new Vector3(
|
|
||||||
(0.5f - target.pivot.x) * target.rect.size.x,
|
|
||||||
(0.5f - target.pivot.y) * target.rect.size.y,
|
|
||||||
0f);
|
|
||||||
var localPosition = target.localPosition + pivotOffset;
|
|
||||||
return target.parent.TransformPoint(localPosition);
|
|
||||||
}
|
|
||||||
|
|
||||||
Vector3 GetWidgetWorldPoint(ItemProxy proxy)
|
|
||||||
{
|
|
||||||
Vector3[] temp = new Vector3[4];
|
|
||||||
rectTransform.GetLocalCorners(temp);
|
|
||||||
var pos = (Vector2)temp[1] + proxy.AnchoredPosition;
|
|
||||||
pos = rectTransform.TransformPoint(pos);
|
|
||||||
|
|
||||||
return pos;
|
|
||||||
}
|
|
||||||
|
|
||||||
Vector3 GetWorldPointInWidget(RectTransform target, Vector3 worldPoint)
|
|
||||||
{
|
|
||||||
return target.InverseTransformPoint(worldPoint);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void CalculateLayoutInputVertical()
|
|
||||||
{
|
|
||||||
int minRows = 0;
|
|
||||||
if (m_Constraint == Constraint.FixedColumnCount)
|
|
||||||
{
|
|
||||||
minRows = Mathf.CeilToInt(handleChildren.Count / (float)m_ConstraintCount - 0.001f);
|
|
||||||
}
|
|
||||||
else if (m_Constraint == Constraint.FixedRowCount)
|
|
||||||
{
|
|
||||||
minRows = m_ConstraintCount;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
float width = rectTransform.rect.width;
|
|
||||||
int cellCountX = Mathf.Max(1, Mathf.FloorToInt((width - padding.horizontal + spacing.x + 0.001f) / (_layoutCellsize.x + spacing.x)));
|
|
||||||
minRows = Mathf.CeilToInt(handleChildren.Count / (float)cellCountX);
|
|
||||||
}
|
|
||||||
|
|
||||||
float minSpace = padding.vertical + (_layoutCellsize.y + spacing.y) * minRows - spacing.y;
|
|
||||||
SetLayoutInputForAxis(minSpace, minSpace, -1, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SetLayoutHorizontal()
|
|
||||||
{
|
|
||||||
SetProxyCellsAlongAxis(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SetLayoutVertical()
|
|
||||||
{
|
|
||||||
SetProxyCellsAlongAxis(1);
|
|
||||||
|
|
||||||
foreach (var item in handleChildren)
|
|
||||||
{
|
|
||||||
item.UpdateLayout();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void SetProxyCellsAlongAxis(int axis)
|
|
||||||
{
|
|
||||||
// Normally a Layout Controller should only set horizontal values when invoked for the horizontal axis
|
|
||||||
// and only vertical values when invoked for the vertical axis.
|
|
||||||
// However, in this case we set both the horizontal and vertical position when invoked for the vertical axis.
|
|
||||||
// Since we only set the horizontal position and not the size, it shouldn't affect children's layout,
|
|
||||||
// and thus shouldn't break the rule that all horizontal layout must be calculated before all vertical layout.
|
|
||||||
var proxyChildCount = handleChildren.Count;
|
|
||||||
if (axis == 0)
|
|
||||||
{
|
|
||||||
// Only set the sizes when invoked for horizontal axis, not the positions.
|
|
||||||
|
|
||||||
for (int i = 0; i < proxyChildCount; i++)
|
|
||||||
{
|
|
||||||
ItemProxy proxy = handleChildren[i];
|
|
||||||
|
|
||||||
proxy.Width = _layoutCellsize.x;
|
|
||||||
proxy.Height = _layoutCellsize.y;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
float width = rectTransform.rect.size.x;
|
|
||||||
float height = rectTransform.rect.size.y;
|
|
||||||
|
|
||||||
int cellCountX = 1;
|
|
||||||
int cellCountY = 1;
|
|
||||||
if (m_Constraint == Constraint.FixedColumnCount)
|
|
||||||
{
|
|
||||||
cellCountX = m_ConstraintCount;
|
|
||||||
|
|
||||||
if (proxyChildCount > cellCountX)
|
|
||||||
cellCountY = proxyChildCount / cellCountX + (proxyChildCount % cellCountX > 0 ? 1 : 0);
|
|
||||||
}
|
|
||||||
else if (m_Constraint == Constraint.FixedRowCount)
|
|
||||||
{
|
|
||||||
cellCountY = m_ConstraintCount;
|
|
||||||
|
|
||||||
if (proxyChildCount > cellCountY)
|
|
||||||
cellCountX = proxyChildCount / cellCountY + (proxyChildCount % cellCountY > 0 ? 1 : 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (_layoutCellsize.x + spacing.x <= 0)
|
|
||||||
cellCountX = int.MaxValue;
|
|
||||||
else
|
|
||||||
cellCountX = Mathf.Max(1, Mathf.FloorToInt((width - padding.horizontal + spacing.x + 0.001f) / (cellSize.x + spacing.x)));
|
|
||||||
|
|
||||||
if (_layoutCellsize.y + spacing.y <= 0)
|
|
||||||
cellCountY = int.MaxValue;
|
|
||||||
else
|
|
||||||
cellCountY = Mathf.Max(1, Mathf.FloorToInt((height - padding.vertical + spacing.y + 0.001f) / (cellSize.y + spacing.y)));
|
|
||||||
}
|
|
||||||
|
|
||||||
int cornerX = (int)startCorner % 2;
|
|
||||||
int cornerY = (int)startCorner / 2;
|
|
||||||
|
|
||||||
int cellsPerMainAxis, actualCellCountX, actualCellCountY;
|
|
||||||
if (startAxis == Axis.Horizontal)
|
|
||||||
{
|
|
||||||
cellsPerMainAxis = cellCountX;
|
|
||||||
actualCellCountX = Mathf.Clamp(cellCountX, 1, proxyChildCount);
|
|
||||||
actualCellCountY = Mathf.Clamp(cellCountY, 1, Mathf.CeilToInt(proxyChildCount / (float)cellsPerMainAxis));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cellsPerMainAxis = cellCountY;
|
|
||||||
actualCellCountY = Mathf.Clamp(cellCountY, 1, proxyChildCount);
|
|
||||||
actualCellCountX = Mathf.Clamp(cellCountX, 1, Mathf.CeilToInt(proxyChildCount / (float)cellsPerMainAxis));
|
|
||||||
}
|
|
||||||
|
|
||||||
Vector2 requiredSpace = new Vector2(
|
|
||||||
actualCellCountX * _layoutCellsize.x + (actualCellCountX - 1) * spacing.x,
|
|
||||||
actualCellCountY * _layoutCellsize.y + (actualCellCountY - 1) * spacing.y
|
|
||||||
);
|
|
||||||
Vector2 startOffset = new Vector2(
|
|
||||||
GetStartOffset(0, requiredSpace.x),
|
|
||||||
GetStartOffset(1, requiredSpace.y)
|
|
||||||
);
|
|
||||||
|
|
||||||
for (int i = 0; i < proxyChildCount; i++)
|
|
||||||
{
|
|
||||||
int positionX;
|
|
||||||
int positionY;
|
|
||||||
if (startAxis == Axis.Horizontal)
|
|
||||||
{
|
|
||||||
positionX = i % cellsPerMainAxis;
|
|
||||||
positionY = i / cellsPerMainAxis;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
positionX = i / cellsPerMainAxis;
|
|
||||||
positionY = i % cellsPerMainAxis;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cornerX == 1)
|
|
||||||
positionX = actualCellCountX - 1 - positionX;
|
|
||||||
if (cornerY == 1)
|
|
||||||
positionY = actualCellCountY - 1 - positionY;
|
|
||||||
|
|
||||||
SetProxyChildAlongAxis(handleChildren[i], 0, startOffset.x + (_layoutCellsize[0] + spacing[0]) * positionX, _layoutCellsize[0]);
|
|
||||||
SetProxyChildAlongAxis(handleChildren[i], 1, startOffset.y + (_layoutCellsize[1] + spacing[1]) * positionY, _layoutCellsize[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetProxyChildAlongAxis(ItemProxy proxy, int axis, float pos, float size)
|
|
||||||
{
|
|
||||||
var scaleFactor = 1.0f;
|
|
||||||
|
|
||||||
if (proxy == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Vector2 sizeDelta = new Vector2(proxy.Width, proxy.Height);
|
|
||||||
sizeDelta[axis] = size;
|
|
||||||
proxy.Width = sizeDelta.x;
|
|
||||||
proxy.Height = sizeDelta.y;
|
|
||||||
|
|
||||||
Vector2 anchoredPosition = proxy.AnchoredPosition;
|
|
||||||
anchoredPosition[axis] = (axis == 0) ? (pos + size * proxy.Pivot[axis] * scaleFactor) : (-pos - size * (1f - proxy.Pivot[axis]) * scaleFactor);
|
|
||||||
proxy.AnchoredPosition = anchoredPosition;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void UpdateProxyVisualState()
|
|
||||||
{
|
|
||||||
if (m_dataDirty)
|
|
||||||
{
|
|
||||||
foreach (var proxy in children)
|
|
||||||
{
|
|
||||||
proxy.UpdateView(true);
|
|
||||||
}
|
|
||||||
Canvas.ForceUpdateCanvases();
|
|
||||||
|
|
||||||
m_dataDirty = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ViewRect == null)
|
|
||||||
{
|
|
||||||
foreach (var proxy in children)
|
|
||||||
{
|
|
||||||
proxy.IsInViewRect = true;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Vector3[] corners = new Vector3[4];
|
|
||||||
ViewRect.GetLocalCorners(corners);
|
|
||||||
Rect parentRect = ViewRect.rect;
|
|
||||||
parentRect.position = corners[0];
|
|
||||||
|
|
||||||
rectTransform.GetLocalCorners(corners);
|
|
||||||
Vector2 leftUpCorner = corners[1];
|
|
||||||
|
|
||||||
foreach (var proxy in children)
|
|
||||||
{
|
|
||||||
var localPos = leftUpCorner + proxy.AnchoredPosition;
|
|
||||||
localPos.x -= proxy.Width * 0.5f;
|
|
||||||
localPos.y -= proxy.Height * 0.5f;
|
|
||||||
localPos = transform.localToWorldMatrix.MultiplyPoint(localPos);
|
|
||||||
localPos = ViewRect.worldToLocalMatrix.MultiplyPoint(localPos);
|
|
||||||
|
|
||||||
Rect proxyRect = new Rect(localPos, new Vector2(proxy.Width, proxy.Height));
|
|
||||||
|
|
||||||
if (parentRect.Overlaps(proxyRect)) proxy.IsInViewRect = true;
|
|
||||||
else proxy.IsInViewRect = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool PauseUpdateView;
|
|
||||||
private void LateUpdate()
|
|
||||||
{
|
|
||||||
if (!PauseUpdateView)
|
|
||||||
{
|
|
||||||
updateFixHeightAndWidth();
|
|
||||||
|
|
||||||
UpdateProxyVisualState();
|
|
||||||
HandleProxyShow();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateFixHeightAndWidth()
|
|
||||||
{
|
|
||||||
_layoutCellsize = cellSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
private List<ItemProxy> NeedDelayShowItems = new List<ItemProxy>();
|
|
||||||
private bool hasNeedShowInLastFrame = false;
|
|
||||||
private float stepDuration = 0f;
|
|
||||||
private void HandleProxyShow(bool allLoad = true, float delayStep = 0.02f)
|
|
||||||
{
|
|
||||||
if (allLoad)
|
|
||||||
{
|
|
||||||
foreach (var proxy in children)
|
|
||||||
{
|
|
||||||
if (proxy.NeedHide)
|
|
||||||
proxy.UpdateView();
|
|
||||||
else if (proxy.NeedShow)
|
|
||||||
proxy.UpdateView();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
NeedDelayShowItems.Clear();
|
|
||||||
foreach (var proxy in children)
|
|
||||||
{
|
|
||||||
if (proxy.NeedHide)
|
|
||||||
proxy.UpdateView();
|
|
||||||
else if (proxy.NeedShow && !proxy.firstShow)
|
|
||||||
proxy.UpdateView();
|
|
||||||
else if (proxy.NeedShow && proxy.firstShow)
|
|
||||||
{
|
|
||||||
NeedDelayShowItems.Add(proxy);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (NeedDelayShowItems.Count == 0 && hasNeedShowInLastFrame)
|
|
||||||
{
|
|
||||||
// Debug.Log("Show Complete!", gameObject);
|
|
||||||
OnItemDelayShowPorcessComplete?.Invoke();
|
|
||||||
}
|
|
||||||
hasNeedShowInLastFrame = NeedDelayShowItems.Count > 0;
|
|
||||||
|
|
||||||
stepDuration += Time.deltaTime;
|
|
||||||
while (stepDuration >= delayStep)
|
|
||||||
{
|
|
||||||
foreach (var proxy in NeedDelayShowItems)
|
|
||||||
{
|
|
||||||
if (proxy.NeedShow)
|
|
||||||
{
|
|
||||||
proxy.UpdateView();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stepDuration -= delayStep;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnDestroy()
|
|
||||||
{
|
|
||||||
Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Clear()
|
|
||||||
{
|
|
||||||
foreach (var proxy in children)
|
|
||||||
proxy.Dispose();
|
|
||||||
|
|
||||||
children.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void SetData(object dataList)
|
|
||||||
{
|
|
||||||
Clear();
|
|
||||||
|
|
||||||
if (dataList == null)
|
|
||||||
{
|
|
||||||
ItemCount = 0;
|
|
||||||
if (_dataList != null)
|
|
||||||
_dataList.Clear();
|
|
||||||
}
|
|
||||||
else if (dataList is IEnumerable ienumrable)
|
|
||||||
{
|
|
||||||
List<object> temp = new List<object>();
|
|
||||||
foreach (var item in ienumrable)
|
|
||||||
{
|
|
||||||
temp.Add(item);
|
|
||||||
}
|
|
||||||
ItemCount = temp.Count;
|
|
||||||
_dataList = temp;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.LogException(new Exception("ItemPresent SetData 传递的参数类型不受支持"), gameObject);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_dataDirty = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void UpdateDependencyProperty(object dp)
|
|
||||||
{
|
|
||||||
_dependencyProperty = dp;
|
|
||||||
foreach (var proxy in children)
|
|
||||||
{
|
|
||||||
proxy.UpdateDP();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_dataDirty = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Dictionary<GameObject, ScripteInterface> CacheItemScripts => _cacheItemScripts;
|
|
||||||
|
|
||||||
public object DependencyProperty => _dependencyProperty;
|
|
||||||
|
|
||||||
public RectTransform RectTransform => rectTransform;
|
|
||||||
public Vector2 GetItemAnchorePos(int index)
|
|
||||||
{
|
|
||||||
var proxy = children[index];
|
|
||||||
return proxy.AnchoredPosition;
|
|
||||||
}
|
|
||||||
public RectTransform GetItemUIIfExist(int index)
|
|
||||||
{
|
|
||||||
if (children.Count <= index) return null;
|
|
||||||
|
|
||||||
var proxy = children[index];
|
|
||||||
return proxy.RuntimeItemUI;
|
|
||||||
}
|
|
||||||
public List<object> DataList
|
|
||||||
{
|
|
||||||
get => _dataList;
|
|
||||||
set => SetData(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
private ScrollRect _scrollRect;
|
|
||||||
public RectTransform GetItemUIByDataIndex(int dataIndex)
|
|
||||||
{
|
|
||||||
if (_scrollRect == null)
|
|
||||||
{
|
|
||||||
_scrollRect = GetComponentInParent<ScrollRect>();
|
|
||||||
}
|
|
||||||
if (_scrollRect != null) MoveToScrollViewCenter(_scrollRect, dataIndex);
|
|
||||||
|
|
||||||
return this.GetItemUIIfExist(dataIndex);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: fdacbe30e88f6a844a435595a4affdbb
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: b2100bdc4db5eda45a986b3489ad79a5
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "ItemPresentEditor",
|
|
||||||
"rootNamespace": "",
|
|
||||||
"references": [
|
|
||||||
"GUID:3fe77f1eed9fc0847a86648f644fe815"
|
|
||||||
],
|
|
||||||
"includePlatforms": [
|
|
||||||
"Editor"
|
|
||||||
],
|
|
||||||
"excludePlatforms": [],
|
|
||||||
"allowUnsafeCode": false,
|
|
||||||
"overrideReferences": false,
|
|
||||||
"precompiledReferences": [],
|
|
||||||
"autoReferenced": true,
|
|
||||||
"defineConstraints": [],
|
|
||||||
"versionDefines": [],
|
|
||||||
"noEngineReferences": false
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 67e09745e7c253a4a86dab1e9001e7f1
|
|
||||||
AssemblyDefinitionImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,32 +0,0 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEditor;
|
|
||||||
using UnityEditor.UI;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
[CustomEditor(typeof(ItemPresent))]
|
|
||||||
public class ItemPresentEditor : GridLayoutGroupEditor
|
|
||||||
{
|
|
||||||
public override void OnInspectorGUI()
|
|
||||||
{
|
|
||||||
ItemPresent behaviour = target as ItemPresent;
|
|
||||||
var itemTemplate = serializedObject.FindProperty("ItemTemplate");
|
|
||||||
var viewRect = serializedObject.FindProperty("ViewRect");
|
|
||||||
GUILayout.BeginHorizontal();
|
|
||||||
EditorGUILayout.PropertyField(itemTemplate, new GUIContent("元素"), true);
|
|
||||||
if (GUILayout.Button("同步大小", GUILayout.Width(80)))
|
|
||||||
{
|
|
||||||
behaviour.cellSize = behaviour.ItemTemplate.rect.size;
|
|
||||||
GUIUtility.keyboardControl = 0;
|
|
||||||
}
|
|
||||||
GUILayout.EndHorizontal();
|
|
||||||
|
|
||||||
EditorGUILayout.PropertyField(viewRect, true);
|
|
||||||
|
|
||||||
EditorGUILayout.Space();
|
|
||||||
|
|
||||||
serializedObject.ApplyModifiedProperties();
|
|
||||||
|
|
||||||
base.OnInspectorGUI();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: ba5192681f4360d43ac870aac15ade3e
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,254 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface IVirtualLayout
|
|
||||||
{
|
|
||||||
Dictionary<GameObject, ScripteInterface> CacheItemScripts { get; }
|
|
||||||
public List<object> DataList { get; }
|
|
||||||
public object DependencyProperty { get; }
|
|
||||||
public RectTransform RectTransform { get; }
|
|
||||||
|
|
||||||
public Vector2 GetItemAnchorePos(int index);
|
|
||||||
public RectTransform GetItemUIIfExist(int index);
|
|
||||||
|
|
||||||
public void UpdateProxyVisualState();
|
|
||||||
public void UpdateDependencyProperty(object dp);
|
|
||||||
public void SetData(object dataList);
|
|
||||||
public void MoveToScrollViewCenter(ScrollRect scrollRect, int dataIndex);
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ItemProxy
|
|
||||||
{
|
|
||||||
public bool IsDestroyed;
|
|
||||||
public bool Visible = true;
|
|
||||||
public int Index;
|
|
||||||
public bool IsInViewRect;
|
|
||||||
|
|
||||||
public Vector2 Pivot => _template.pivot;
|
|
||||||
public Vector2 AnchoredPosition;
|
|
||||||
|
|
||||||
public float Width;
|
|
||||||
public float Height;
|
|
||||||
|
|
||||||
private IVirtualLayout _parent;
|
|
||||||
|
|
||||||
private RectTransform _template;
|
|
||||||
private RectTransform _runtimeInstance;
|
|
||||||
private LayoutGroup _layoutElement;
|
|
||||||
|
|
||||||
public RectTransform RuntimeItemUI => _runtimeInstance;
|
|
||||||
public bool firstShow { get; private set; } = true;
|
|
||||||
|
|
||||||
public float PreferredWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (_layoutElement == null) return 0;
|
|
||||||
|
|
||||||
return _layoutElement.preferredWidth;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public float PreferredHeight
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (_layoutElement == null) return 0;
|
|
||||||
|
|
||||||
return _layoutElement.preferredHeight;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ScripteInterface GetLuaObj()
|
|
||||||
{
|
|
||||||
if (_runtimeInstance == null) return null;
|
|
||||||
|
|
||||||
_parent.CacheItemScripts.TryGetValue(_runtimeInstance.gameObject, out ScripteInterface lfi);
|
|
||||||
|
|
||||||
return lfi;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Vector2? _forcePivot;
|
|
||||||
public ItemProxy(RectTransform Template, IVirtualLayout parent, Vector2? forcePivot = null)
|
|
||||||
{
|
|
||||||
_template = Template;
|
|
||||||
_parent = parent;
|
|
||||||
_forcePivot = forcePivot;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void Dispose()
|
|
||||||
{
|
|
||||||
if (_runtimeInstance != null)
|
|
||||||
{
|
|
||||||
if (Application.isPlaying)
|
|
||||||
{
|
|
||||||
GameObjectPool.Release(_runtimeInstance.gameObject);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
GameObject.DestroyImmediate(_runtimeInstance.gameObject);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool NeedShow
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (IsInViewRect && _runtimeInstance == null) return true;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (_runtimeInstance != null && IsInViewRect && _runtimeInstance.anchoredPosition != AnchoredPosition)
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
public bool NeedHide => !IsInViewRect && _runtimeInstance != null;
|
|
||||||
|
|
||||||
public void UpdateView(bool force = false)
|
|
||||||
{
|
|
||||||
if (IsInViewRect)
|
|
||||||
{
|
|
||||||
if (_runtimeInstance == null)
|
|
||||||
{
|
|
||||||
_runtimeInstance = GetInstance();
|
|
||||||
_layoutElement = _runtimeInstance.GetComponent<LayoutGroup>();
|
|
||||||
UpdateViewData();
|
|
||||||
}
|
|
||||||
else if (force)
|
|
||||||
{
|
|
||||||
UpdateViewData();
|
|
||||||
}
|
|
||||||
|
|
||||||
UpdateLayout();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ReleaseInstance();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void UpdateLayout()
|
|
||||||
{
|
|
||||||
if (_runtimeInstance != null)
|
|
||||||
{
|
|
||||||
_runtimeInstance.gameObject.SetActive(true);
|
|
||||||
_runtimeInstance.anchorMax = Vector2.up;
|
|
||||||
_runtimeInstance.anchorMin = Vector2.up;
|
|
||||||
if (_forcePivot != null)
|
|
||||||
{
|
|
||||||
_runtimeInstance.pivot = _forcePivot.Value;
|
|
||||||
}
|
|
||||||
_runtimeInstance.anchoredPosition = AnchoredPosition;
|
|
||||||
_runtimeInstance.sizeDelta = new Vector2(Width, Height);
|
|
||||||
}
|
|
||||||
if (_layoutElement != null)
|
|
||||||
{
|
|
||||||
_layoutElement.CalculateLayoutInputHorizontal();
|
|
||||||
_layoutElement.CalculateLayoutInputVertical();
|
|
||||||
_layoutElement.SetLayoutHorizontal();
|
|
||||||
_layoutElement.SetLayoutVertical();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateViewData()
|
|
||||||
{
|
|
||||||
if (Application.isPlaying)
|
|
||||||
{
|
|
||||||
if (!_parent.CacheItemScripts.ContainsKey(_runtimeInstance.gameObject))
|
|
||||||
{
|
|
||||||
var vItem = _runtimeInstance.gameObject.GetComponent<IVirtualItem>();
|
|
||||||
ScripteInterface newSI = new ScripteInterface(vItem);
|
|
||||||
_parent.CacheItemScripts[_runtimeInstance.gameObject] = newSI;
|
|
||||||
}
|
|
||||||
|
|
||||||
_parent.CacheItemScripts.TryGetValue(_runtimeInstance.gameObject, out ScripteInterface si);
|
|
||||||
si.SetDataList(_parent.DataList[Index], Index);
|
|
||||||
if (_parent.DependencyProperty != null)
|
|
||||||
si.SetDependencyProperty(_parent.DependencyProperty);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void UpdateDP()
|
|
||||||
{
|
|
||||||
if (_runtimeInstance == null) return;
|
|
||||||
|
|
||||||
_parent.CacheItemScripts.TryGetValue(_runtimeInstance.gameObject, out ScripteInterface luaInterface);
|
|
||||||
if (luaInterface == null) return;
|
|
||||||
|
|
||||||
if (_parent.DependencyProperty != null)
|
|
||||||
luaInterface.SetDependencyProperty(_parent.DependencyProperty);
|
|
||||||
}
|
|
||||||
|
|
||||||
private RectTransform GetInstance()
|
|
||||||
{
|
|
||||||
var res = GameObjectPool.GetInstance(_template.gameObject, _parent.RectTransform).GetComponent<RectTransform>();
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ReleaseInstance()
|
|
||||||
{
|
|
||||||
if (_runtimeInstance == null) return;
|
|
||||||
|
|
||||||
_layoutElement = null;
|
|
||||||
|
|
||||||
if (Application.isPlaying)
|
|
||||||
{
|
|
||||||
_parent.CacheItemScripts.TryGetValue(_runtimeInstance.gameObject, out ScripteInterface si);
|
|
||||||
if (si != null) si.Release();
|
|
||||||
GameObjectPool.Release(_runtimeInstance.gameObject);
|
|
||||||
_runtimeInstance = null;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
GameObject.DestroyImmediate(_runtimeInstance.gameObject);
|
|
||||||
_runtimeInstance = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ScripteInterface
|
|
||||||
{
|
|
||||||
private IVirtualItem _itemInstance;
|
|
||||||
public IVirtualItem ItemInstance => _itemInstance;
|
|
||||||
|
|
||||||
public ScripteInterface(IVirtualItem lc)
|
|
||||||
{
|
|
||||||
_itemInstance = lc;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetDataList(object dataItem, int index)
|
|
||||||
{
|
|
||||||
if (_itemInstance == null) return;
|
|
||||||
_itemInstance.Index = index;
|
|
||||||
_itemInstance.SetData(dataItem);
|
|
||||||
}
|
|
||||||
public void Release()
|
|
||||||
{
|
|
||||||
if (_itemInstance == null) return;
|
|
||||||
_itemInstance.Release();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetDependencyProperty(object dependencyProperty)
|
|
||||||
{
|
|
||||||
if (_itemInstance == null) return;
|
|
||||||
|
|
||||||
_itemInstance.SetDependencyProperty(dependencyProperty);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IVirtualItem
|
|
||||||
{
|
|
||||||
GameObject gameObject { get; }
|
|
||||||
int Index { get; set; }
|
|
||||||
void SetData(object data);
|
|
||||||
void SetDependencyProperty(object data);
|
|
||||||
void Release();
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: f336cc2f1b183c748bf1db553448a734
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -28,8 +28,6 @@ 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;
|
||||||
}
|
}
|
||||||
|
@ -4,13 +4,13 @@ using DG.Tweening.Plugins.Options;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UnityEditor;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
using static GluonGui.WorkspaceWindow.Views.Checkin.Operations.CheckinViewDeleteOperation;
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client.UI
|
namespace AxibugEmuOnline.Client.UI
|
||||||
{
|
{
|
||||||
public class MainMenuController : MenuItemController<MenuData>
|
public class MainMenuController : MenuItemController
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
HorizontalLayoutGroup GroupRoot;
|
HorizontalLayoutGroup GroupRoot;
|
||||||
@ -32,12 +32,9 @@ namespace AxibugEmuOnline.Client.UI
|
|||||||
base.Start();
|
base.Start();
|
||||||
|
|
||||||
m_runtimeMenuUICanvas = m_runtimeMenuUI.Select(menu => menu.gameObject.AddComponent<CanvasGroup>()).ToList();
|
m_runtimeMenuUICanvas = m_runtimeMenuUI.Select(menu => menu.gameObject.AddComponent<CanvasGroup>()).ToList();
|
||||||
m_runtimeMenuUICanvas.ForEach(canv => canv.gameObject.AddComponent<AutoRaycastCanvasGroup>());
|
|
||||||
}
|
|
||||||
public override void Init(List<MenuData> menuDataList)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void EnterDetailState()
|
public void EnterDetailState()
|
||||||
{
|
{
|
||||||
if (seq != null)
|
if (seq != null)
|
||||||
@ -129,17 +126,14 @@ namespace AxibugEmuOnline.Client.UI
|
|||||||
|
|
||||||
for (int i = 0; i < MenuSetting.Count; i++)
|
for (int i = 0; i < MenuSetting.Count; i++)
|
||||||
{
|
{
|
||||||
var settingData = MenuSetting[i];
|
|
||||||
|
|
||||||
var templatePrefab = settingData.OverrideTemplate != null ? settingData.OverrideTemplate.gameObject : Template.gameObject;
|
|
||||||
MenuItem itemScript = null;
|
MenuItem itemScript = null;
|
||||||
var prefabClone = UnityEditor.PrefabUtility.InstantiatePrefab(templatePrefab) as GameObject;
|
var prefabClone = UnityEditor.PrefabUtility.InstantiatePrefab(Template.gameObject) as GameObject;
|
||||||
itemScript = prefabClone.GetComponent<MenuItem>();
|
itemScript = prefabClone.GetComponent<MenuItem>();
|
||||||
itemScript.gameObject.SetActive(true);
|
itemScript.gameObject.SetActive(true);
|
||||||
itemScript.transform.SetParent(GroupRoot.transform);
|
itemScript.transform.SetParent(GroupRoot.transform);
|
||||||
itemScript.transform.localScale = Vector3.one;
|
itemScript.transform.localScale = Vector3.one;
|
||||||
|
|
||||||
itemScript.SetData(settingData);
|
itemScript.SetData(MenuSetting[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
UnityEditor.EditorUtility.SetDirty(this);
|
UnityEditor.EditorUtility.SetDirty(this);
|
||||||
@ -153,7 +147,7 @@ namespace AxibugEmuOnline.Client.UI
|
|||||||
public Sprite Icon;
|
public Sprite Icon;
|
||||||
public string Name;
|
public string Name;
|
||||||
public string Description;
|
public string Description;
|
||||||
public MenuItem OverrideTemplate;
|
|
||||||
public List<MenuData> SubMenus;
|
public List<MenuData> SubMenus;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,28 +10,27 @@ namespace AxibugEmuOnline.Client.UI
|
|||||||
public class MenuItem : MonoBehaviour
|
public class MenuItem : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
protected Image Icon;
|
Image Icon;
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
protected Text Txt;
|
Text Txt;
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
protected Text Descript;
|
Text Descript;
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
protected Transform Root;
|
Transform Root;
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
protected Image ShadowIcon;
|
Image ShadowIcon;
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
protected CanvasGroup InfoNode;
|
SubMenuItemGroup SubMenuItemGroup;
|
||||||
[SerializeField]
|
|
||||||
protected SubMenuItemGroup SubMenuItemGroup;
|
|
||||||
|
|
||||||
public float SelectScale = 1f;
|
public float SelectScale = 1f;
|
||||||
public float UnSelectScale = 0.85f;
|
public float UnSelectScale = 0.85f;
|
||||||
|
|
||||||
public RectTransform Rect => transform as RectTransform;
|
public RectTransform Rect => transform as RectTransform;
|
||||||
|
|
||||||
protected bool m_select;
|
[SerializeField]
|
||||||
protected TweenerCore<float, float, FloatOptions> progressTween;
|
private bool m_select;
|
||||||
protected float m_progress;
|
private TweenerCore<float, float, FloatOptions> progressTween;
|
||||||
|
public float m_progress;
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
m_select = false;
|
m_select = false;
|
||||||
@ -39,33 +38,34 @@ namespace AxibugEmuOnline.Client.UI
|
|||||||
|
|
||||||
if (ShadowIcon != null) ShadowIcon.gameObject.SetActive(false);
|
if (ShadowIcon != null) ShadowIcon.gameObject.SetActive(false);
|
||||||
|
|
||||||
if (InfoNode != null) InfoNode.alpha = 0;
|
var temp = Txt.color;
|
||||||
|
temp.a = 0;
|
||||||
|
Txt.color = temp;
|
||||||
|
if (Descript != null)
|
||||||
|
{
|
||||||
|
temp = Descript.color;
|
||||||
|
temp.a = 0;
|
||||||
|
Descript.color = temp;
|
||||||
|
}
|
||||||
if (ShadowIcon != null) ShadowIcon.gameObject.SetActiveEx(false);
|
if (ShadowIcon != null) ShadowIcon.gameObject.SetActiveEx(false);
|
||||||
if (SubMenuItemGroup != null) SubMenuItemGroup.SetSelect(false);
|
if (SubMenuItemGroup != null) SubMenuItemGroup.SetSelect(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetData(MenuData data)
|
public void SetData(MenuData data)
|
||||||
{
|
{
|
||||||
SetBaseInfo(data.Name, data.Description);
|
name = data.Name;
|
||||||
SetIcon(data.Icon);
|
Icon.sprite = data.Icon;
|
||||||
if (SubMenuItemGroup != null) SubMenuItemGroup.Init(data.SubMenus);
|
|
||||||
|
if (ShadowIcon != null) ShadowIcon.sprite = data.Icon;
|
||||||
|
|
||||||
|
Txt.text = data.Name;
|
||||||
|
if (Descript != null) Descript.text = data.Description;
|
||||||
|
|
||||||
|
if (SubMenuItemGroup != null)
|
||||||
|
SubMenuItemGroup.Init(data.SubMenus);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void SetBaseInfo(string name, string descript)
|
public void SetSelectState(bool selected)
|
||||||
{
|
|
||||||
this.name = name;
|
|
||||||
|
|
||||||
if (Txt != null) Txt.text = name;
|
|
||||||
if (Descript != null) Descript.text = descript;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void SetIcon(Sprite icon)
|
|
||||||
{
|
|
||||||
if (Icon != null) Icon.sprite = icon;
|
|
||||||
if (ShadowIcon != null) ShadowIcon.sprite = icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual void SetSelectState(bool selected)
|
|
||||||
{
|
{
|
||||||
if (m_select == selected) return;
|
if (m_select == selected) return;
|
||||||
|
|
||||||
@ -79,14 +79,27 @@ namespace AxibugEmuOnline.Client.UI
|
|||||||
progressTween = DOTween.To(() => m_progress, (x) => m_progress = x, m_select ? 1 : 0, 5)
|
progressTween = DOTween.To(() => m_progress, (x) => m_progress = x, m_select ? 1 : 0, 5)
|
||||||
.SetSpeedBased().OnUpdate(() =>
|
.SetSpeedBased().OnUpdate(() =>
|
||||||
{
|
{
|
||||||
if (InfoNode != null) InfoNode.alpha = m_progress;
|
var temp = Txt.color;
|
||||||
|
temp.a = m_progress;
|
||||||
|
Txt.color = temp;
|
||||||
|
if (Descript != null)
|
||||||
|
{
|
||||||
|
temp = Descript.color;
|
||||||
|
temp.a = m_progress;
|
||||||
|
Descript.color = temp;
|
||||||
|
}
|
||||||
|
|
||||||
Root.localScale = Vector3.one * Mathf.Lerp(UnSelectScale, SelectScale, m_progress);
|
Root.localScale = Vector3.one * Mathf.Lerp(UnSelectScale, SelectScale, m_progress);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void OnEnterItem() { }
|
public void OnEnterItem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnExitItem()
|
||||||
|
{
|
||||||
|
|
||||||
public virtual void OnExitItem() { }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using AxibugEmuOnline.Client.UI;
|
using AxibugEmuOnline.Client.UI;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@ -6,36 +7,35 @@ namespace AxibugEmuOnline.Client
|
|||||||
{
|
{
|
||||||
public abstract class MenuItemController : MonoBehaviour
|
public abstract class MenuItemController : MonoBehaviour
|
||||||
{
|
{
|
||||||
public enum EnumCommand
|
|
||||||
{
|
|
||||||
SelectItemLeft,
|
|
||||||
SelectItemRight,
|
|
||||||
SelectItemUp,
|
|
||||||
SelectItemDown,
|
|
||||||
Enter,
|
|
||||||
Back,
|
|
||||||
OptionMenu
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
protected Transform m_menuItemRoot;
|
|
||||||
protected List<MenuItem> m_runtimeMenuUI = new List<MenuItem>();
|
|
||||||
|
|
||||||
private PulseInvoker m_pulsInvoker_Left;
|
|
||||||
private PulseInvoker m_pulsInvoker_Right;
|
|
||||||
private PulseInvoker m_pulsInvoker_Up;
|
|
||||||
private PulseInvoker m_pulsInvoker_Down;
|
|
||||||
MenuItem m_enteredItem = null;
|
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
float PulseInvoke_Delay = 0.4f;
|
float PulseInvoke_Delay = 0.4f;
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
float PulseInvoke_Interval = 0.05f;
|
float PulseInvoke_Interval = 0.05f;
|
||||||
|
|
||||||
protected int m_selectIndex = -1;
|
private bool m_listenControlAction;
|
||||||
|
public bool ListenControlAction
|
||||||
|
{
|
||||||
|
get => m_listenControlAction;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
m_listenControlAction = value;
|
||||||
|
|
||||||
public virtual int SelectIndex
|
if (value)
|
||||||
|
CommandDispatcher.Instance.RegistController(this);
|
||||||
|
else
|
||||||
|
CommandDispatcher.Instance.UnRegistController(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private PulseInvoker m_pulsInvoker_Left;
|
||||||
|
private PulseInvoker m_pulsInvoker_Right;
|
||||||
|
private PulseInvoker m_pulsInvoker_Up;
|
||||||
|
private PulseInvoker m_pulsInvoker_Down;
|
||||||
|
|
||||||
|
private int m_selectIndex = -1;
|
||||||
|
protected List<MenuItem> m_runtimeMenuUI = new List<MenuItem>();
|
||||||
|
|
||||||
|
public int SelectIndex
|
||||||
{
|
{
|
||||||
get => m_selectIndex;
|
get => m_selectIndex;
|
||||||
set
|
set
|
||||||
@ -48,16 +48,16 @@ namespace AxibugEmuOnline.Client
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
protected Transform m_menuItemRoot;
|
||||||
|
|
||||||
protected virtual void Start()
|
protected virtual void Start()
|
||||||
{
|
|
||||||
if (m_menuItemRoot != null)
|
|
||||||
{
|
{
|
||||||
for (int i = 0; i < m_menuItemRoot.childCount; i++)
|
for (int i = 0; i < m_menuItemRoot.childCount; i++)
|
||||||
{
|
{
|
||||||
Transform child = m_menuItemRoot.GetChild(i);
|
Transform child = m_menuItemRoot.GetChild(i);
|
||||||
m_runtimeMenuUI.Add(child.GetComponent<MenuItem>());
|
m_runtimeMenuUI.Add(child.GetComponent<MenuItem>());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Canvas.ForceUpdateCanvases();
|
Canvas.ForceUpdateCanvases();
|
||||||
SelectIndex = 0;
|
SelectIndex = 0;
|
||||||
@ -68,6 +68,11 @@ namespace AxibugEmuOnline.Client
|
|||||||
m_pulsInvoker_Down = new PulseInvoker(OnCmdSelectItemDown, PulseInvoke_Delay, PulseInvoke_Interval);
|
m_pulsInvoker_Down = new PulseInvoker(OnCmdSelectItemDown, PulseInvoke_Delay, PulseInvoke_Interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnDestroy()
|
||||||
|
{
|
||||||
|
if (CommandDispatcher.Instance != null)
|
||||||
|
CommandDispatcher.Instance.UnRegistController(this);
|
||||||
|
}
|
||||||
|
|
||||||
protected virtual void Update()
|
protected virtual void Update()
|
||||||
{
|
{
|
||||||
@ -77,6 +82,9 @@ namespace AxibugEmuOnline.Client
|
|||||||
m_pulsInvoker_Down.Update(Time.deltaTime);
|
m_pulsInvoker_Down.Update(Time.deltaTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected abstract void OnSelectMenuChanged();
|
||||||
|
|
||||||
|
MenuItem m_enteredItem = null;
|
||||||
public void ExecuteCommand(EnumCommand cmd, bool cancel)
|
public void ExecuteCommand(EnumCommand cmd, bool cancel)
|
||||||
{
|
{
|
||||||
if (!cancel)
|
if (!cancel)
|
||||||
@ -162,39 +170,15 @@ namespace AxibugEmuOnline.Client
|
|||||||
protected virtual void OnCmdOptionMenu() { }
|
protected virtual void OnCmdOptionMenu() { }
|
||||||
protected virtual void OnCmdEnter(MenuItem item) { item.OnEnterItem(); }
|
protected virtual void OnCmdEnter(MenuItem item) { item.OnEnterItem(); }
|
||||||
protected virtual void OnCmdBack(MenuItem item) { item.OnExitItem(); }
|
protected virtual void OnCmdBack(MenuItem item) { item.OnExitItem(); }
|
||||||
protected abstract void OnSelectMenuChanged();
|
public enum EnumCommand
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract class MenuItemController<T> : MenuItemController
|
|
||||||
{
|
{
|
||||||
private bool m_listenControlAction;
|
SelectItemLeft,
|
||||||
public bool ListenControlAction
|
SelectItemRight,
|
||||||
{
|
SelectItemUp,
|
||||||
get => m_listenControlAction;
|
SelectItemDown,
|
||||||
set
|
Enter,
|
||||||
{
|
Back,
|
||||||
m_listenControlAction = value;
|
OptionMenu
|
||||||
|
|
||||||
if (value)
|
|
||||||
CommandDispatcher.Instance.RegistController(this);
|
|
||||||
else
|
|
||||||
CommandDispatcher.Instance.UnRegistController(this);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public abstract void Init(List<T> menuDataList);
|
|
||||||
|
|
||||||
|
|
||||||
private void OnDestroy()
|
|
||||||
{
|
|
||||||
if (CommandDispatcher.Instance != null)
|
|
||||||
CommandDispatcher.Instance.UnRegistController(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,84 +0,0 @@
|
|||||||
using AxibugEmuOnline.Client.ClientCore;
|
|
||||||
using AxibugEmuOnline.Client.UI;
|
|
||||||
using System;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.EventSystems;
|
|
||||||
using UnityEngine.SceneManagement;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
|
||||||
{
|
|
||||||
public class RomItem : MenuItem, IVirtualItem, IPointerClickHandler
|
|
||||||
{
|
|
||||||
[SerializeField]
|
|
||||||
Image m_romImage;
|
|
||||||
|
|
||||||
public int Index { get; set; }
|
|
||||||
|
|
||||||
private RomLib m_romlib => AppAxibugEmuOnline.nesRomLib;
|
|
||||||
private RomFile m_romfile;
|
|
||||||
|
|
||||||
public void SetData(object data)
|
|
||||||
{
|
|
||||||
m_romfile = (RomFile)data;
|
|
||||||
m_romfile.OnInfoFilled += OnRomInfoFilled;
|
|
||||||
m_romImage.sprite = null;
|
|
||||||
|
|
||||||
UpdateView();
|
|
||||||
|
|
||||||
if (!m_romfile.InfoReady)
|
|
||||||
{
|
|
||||||
m_romlib.BeginFetchRomInfo(m_romfile);
|
|
||||||
}
|
|
||||||
|
|
||||||
SetSelectState(data is ThirdMenuRoot tr && tr.SelectIndex == Index);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetDependencyProperty(object data)
|
|
||||||
{
|
|
||||||
SetSelectState(data is ThirdMenuRoot tr && tr.SelectIndex == Index);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Release()
|
|
||||||
{
|
|
||||||
m_romfile.OnInfoFilled -= OnRomInfoFilled;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnRomInfoFilled()
|
|
||||||
{
|
|
||||||
UpdateView();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateView()
|
|
||||||
{
|
|
||||||
if (!m_romfile.InfoReady)
|
|
||||||
{
|
|
||||||
SetBaseInfo(string.Empty, string.Empty);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetBaseInfo(m_romfile.Alias, m_romfile.Descript);
|
|
||||||
AppAxibugEmuOnline.CacheMgr.GetSpriteCache(m_romfile.ImageURL, (img, url) =>
|
|
||||||
{
|
|
||||||
if (url != m_romfile.ImageURL) return;
|
|
||||||
|
|
||||||
m_romImage.sprite = img;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnPointerClick(PointerEventData eventData)
|
|
||||||
{
|
|
||||||
if (!m_romfile.RomReady)
|
|
||||||
m_romfile.BeginDownload();
|
|
||||||
else
|
|
||||||
{
|
|
||||||
AppAxibugEmuOnline.SceneLoader.BeginLoad("Scene/EmuTest", () =>
|
|
||||||
{
|
|
||||||
var nesEmu = GameObject.FindObjectOfType<NesEmulator>();
|
|
||||||
nesEmu.StartGame(m_romfile);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: f236de3ffaafd4149a3b7395e05b8d07
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,5 +1,4 @@
|
|||||||
using AxibugEmuOnline.Client.UI;
|
using AxibugEmuOnline.Client.UI;
|
||||||
using Codice.Utils;
|
|
||||||
using DG.Tweening;
|
using DG.Tweening;
|
||||||
using DG.Tweening.Core;
|
using DG.Tweening.Core;
|
||||||
using DG.Tweening.Plugins.Options;
|
using DG.Tweening.Plugins.Options;
|
||||||
@ -9,7 +8,7 @@ using UnityEngine;
|
|||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
namespace AxibugEmuOnline.Client
|
||||||
{
|
{
|
||||||
public class SubMenuItemGroup : MenuItemController<MenuData>
|
public class SubMenuItemGroup : MenuItemController
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
MenuItem SubMenuItemTemplate;
|
MenuItem SubMenuItemTemplate;
|
||||||
@ -28,7 +27,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
alphaGroup.alpha = 0;
|
alphaGroup.alpha = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Init(List<MenuData> menuDataList)
|
public void Init(List<MenuData> menuDataList)
|
||||||
{
|
{
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
while (transform.childCount > 0)
|
while (transform.childCount > 0)
|
||||||
@ -45,9 +44,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
m_runtimeMenuUI.Clear();
|
m_runtimeMenuUI.Clear();
|
||||||
foreach (MenuData menuData in menuDataList)
|
foreach (MenuData menuData in menuDataList)
|
||||||
{
|
{
|
||||||
var template = menuData.OverrideTemplate != null ? menuData.OverrideTemplate : SubMenuItemTemplate;
|
var item = Clone(transform);
|
||||||
|
|
||||||
var item = Clone(template, transform);
|
|
||||||
item.SetData(menuData);
|
item.SetData(menuData);
|
||||||
m_runtimeMenuUI.Add(item);
|
m_runtimeMenuUI.Add(item);
|
||||||
}
|
}
|
||||||
@ -86,7 +83,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
SelectIndex++;
|
SelectIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void SetSelect(bool select)
|
public void SetSelect(bool select)
|
||||||
{
|
{
|
||||||
if (m_selected == select) return;
|
if (m_selected == select) return;
|
||||||
m_selected = select;
|
m_selected = select;
|
||||||
@ -167,16 +164,16 @@ namespace AxibugEmuOnline.Client
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private MenuItem Clone(MenuItem template, Transform parent)
|
private MenuItem Clone(Transform parent)
|
||||||
{
|
{
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
if (Application.isPlaying)
|
if (Application.isPlaying)
|
||||||
{
|
{
|
||||||
return GameObject.Instantiate(template.gameObject, parent).GetComponent<MenuItem>();
|
return GameObject.Instantiate(SubMenuItemTemplate.gameObject, parent).GetComponent<MenuItem>();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var clone = UnityEditor.PrefabUtility.InstantiatePrefab(template.gameObject, parent) as GameObject;
|
var clone = UnityEditor.PrefabUtility.InstantiatePrefab(SubMenuItemTemplate.gameObject, parent) as GameObject;
|
||||||
return clone.GetComponent<MenuItem>();
|
return clone.GetComponent<MenuItem>();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -1,120 +0,0 @@
|
|||||||
using AxibugEmuOnline.Client.UI;
|
|
||||||
using DG.Tweening;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
|
||||||
{
|
|
||||||
public class ThirdMenuRoot : SubMenuItemGroup
|
|
||||||
{
|
|
||||||
private RectTransform m_rect;
|
|
||||||
private RectTransform m_parent;
|
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private RectTransform m_selectArrow;
|
|
||||||
[SerializeField]
|
|
||||||
float ArrowOffset = 50;
|
|
||||||
[SerializeField]
|
|
||||||
float WidthFix = 50;
|
|
||||||
[SerializeField]
|
|
||||||
public ItemPresent itemGroup;
|
|
||||||
[SerializeField]
|
|
||||||
ScrollRect srollRect;
|
|
||||||
|
|
||||||
public override int SelectIndex
|
|
||||||
{
|
|
||||||
get => m_selectIndex;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (itemGroup.DataList == null) return;
|
|
||||||
|
|
||||||
value = Mathf.Clamp(value, 0, itemGroup.DataList.Count - 1);
|
|
||||||
if (m_selectIndex == value) return;
|
|
||||||
bool useAnim = m_selectIndex != -1;
|
|
||||||
m_selectIndex = value;
|
|
||||||
|
|
||||||
RollToIndex(m_selectIndex, useAnim);
|
|
||||||
OnSelectMenuChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Awake()
|
|
||||||
{
|
|
||||||
m_rect = transform as RectTransform;
|
|
||||||
m_parent = transform.parent as RectTransform;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void LateUpdate()
|
|
||||||
{
|
|
||||||
SyncRectToLaunchUI();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnSelectMenuChanged()
|
|
||||||
{
|
|
||||||
itemGroup.UpdateDependencyProperty(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
void RollToIndex(int index, bool useAnim = false)
|
|
||||||
{
|
|
||||||
Vector2 itemPos = itemGroup.GetItemAnchorePos(index);
|
|
||||||
|
|
||||||
Vector3[] corners = new Vector3[4];
|
|
||||||
Vector2 targetPos = itemGroup.transform.InverseTransformPoint(m_selectArrow.position);
|
|
||||||
itemGroup.RectTransform.GetLocalCorners(corners);
|
|
||||||
targetPos = targetPos - (Vector2)corners[1];
|
|
||||||
|
|
||||||
float gap = targetPos.y - itemPos.y;
|
|
||||||
|
|
||||||
srollRect.velocity = Vector2.zero;
|
|
||||||
if (!useAnim)
|
|
||||||
srollRect.content.anchoredPosition += new Vector2(0, gap);
|
|
||||||
else
|
|
||||||
srollRect.content.anchoredPosition += new Vector2(0, gap);
|
|
||||||
}
|
|
||||||
|
|
||||||
Vector3[] corner = new Vector3[4];
|
|
||||||
private void SyncRectToLaunchUI()
|
|
||||||
{
|
|
||||||
if (LaunchUI.Instance == null) return;
|
|
||||||
var launchUIRect = LaunchUI.Instance.transform as RectTransform;
|
|
||||||
|
|
||||||
m_rect.pivot = new Vector2(1, 0.5f);
|
|
||||||
m_rect.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, launchUIRect.rect.width);
|
|
||||||
m_rect.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, launchUIRect.rect.height);
|
|
||||||
m_rect.position = launchUIRect.position;
|
|
||||||
var temp = m_rect.localPosition;
|
|
||||||
var offsetX = (m_rect.pivot.x - 0.5f) * m_rect.rect.size.x;
|
|
||||||
temp.x += offsetX;
|
|
||||||
var offsetY = (m_rect.pivot.y - 0.5f) * m_rect.rect.size.y;
|
|
||||||
temp.y += offsetY;
|
|
||||||
m_rect.localPosition = temp;
|
|
||||||
m_rect.localScale = launchUIRect.localScale;
|
|
||||||
|
|
||||||
m_parent.GetWorldCorners(corner);
|
|
||||||
var parentPosition = corner[0];
|
|
||||||
parentPosition = launchUIRect.InverseTransformPoint(parentPosition);
|
|
||||||
launchUIRect.GetWorldCorners(corner);
|
|
||||||
var rootPosition = corner[0];
|
|
||||||
rootPosition = launchUIRect.InverseTransformPoint(rootPosition);
|
|
||||||
|
|
||||||
var widthGap = parentPosition.x - rootPosition.x;
|
|
||||||
m_rect.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, launchUIRect.rect.width - widthGap - WidthFix);
|
|
||||||
|
|
||||||
m_selectArrow.position = m_parent.transform.position;
|
|
||||||
temp = m_selectArrow.anchoredPosition;
|
|
||||||
temp.x += ArrowOffset;
|
|
||||||
m_selectArrow.anchoredPosition = temp;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnCmdSelectItemDown()
|
|
||||||
{
|
|
||||||
base.OnCmdSelectItemDown();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnCmdSelectItemUp()
|
|
||||||
{
|
|
||||||
base.OnCmdSelectItemUp();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 1d1e3e91ac34bc8468f357ee247ffb6a
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
|
||||||
using VirtualNes.Core.Debug;
|
using VirtualNes.Core.Debug;
|
||||||
|
|
||||||
namespace VirtualNes.Core
|
namespace VirtualNes.Core
|
||||||
@ -537,58 +536,6 @@ namespace VirtualNes.Core
|
|||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void GetFrameIRQ(ref int Cycle, ref byte Count, ref byte Type, ref byte IRQ, ref byte Occur)
|
|
||||||
{
|
|
||||||
@internal.GetFrameIRQ(ref Cycle, ref Count, ref Type, ref IRQ, ref Occur);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
// 時間軸を同期させる為Flushする
|
|
||||||
QueueFlush();
|
|
||||||
|
|
||||||
@internal.SaveState(buffer);
|
|
||||||
buffer.Position += (@internal.GetSize() + 15) & (~0x0F);
|
|
||||||
|
|
||||||
// VRC6
|
|
||||||
if ((exsound_select & 0x01) != 0)
|
|
||||||
{
|
|
||||||
vrc6.SaveState(buffer);
|
|
||||||
buffer.Position += (vrc6.GetSize() + 15) & (~0x0F); // Padding
|
|
||||||
}
|
|
||||||
// VRC7 (not support)
|
|
||||||
if ((exsound_select & 0x02) != 0)
|
|
||||||
{
|
|
||||||
vrc7.SaveState(buffer);
|
|
||||||
buffer.Position += (vrc7.GetSize() + 15) & (~0x0F); // Padding
|
|
||||||
}
|
|
||||||
// FDS
|
|
||||||
if ((exsound_select & 0x04) != 0)
|
|
||||||
{
|
|
||||||
fds.SaveState(buffer);
|
|
||||||
buffer.Position += (fds.GetSize() + 15) & (~0x0F); // Padding
|
|
||||||
|
|
||||||
}
|
|
||||||
// MMC5
|
|
||||||
if ((exsound_select & 0x08) != 0)
|
|
||||||
{
|
|
||||||
mmc5.SaveState(buffer);
|
|
||||||
buffer.Position += (mmc5.GetSize() + 15) & (~0x0F); // Padding
|
|
||||||
}
|
|
||||||
// N106
|
|
||||||
if ((exsound_select & 0x10) != 0)
|
|
||||||
{
|
|
||||||
n106.SaveState(buffer);
|
|
||||||
buffer.Position += (n106.GetSize() + 15) & (~0x0F); // Padding
|
|
||||||
}
|
|
||||||
// FME7
|
|
||||||
if ((exsound_select & 0x20) != 0)
|
|
||||||
{
|
|
||||||
fme7.SaveState(buffer);
|
|
||||||
buffer.Position += (fme7.GetSize() + 15) & (~0x0F); // Padding
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct QUEUEDATA
|
public struct QUEUEDATA
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
namespace VirtualNes.Core
|
namespace VirtualNes.Core
|
||||||
{
|
{
|
||||||
@ -404,18 +403,7 @@ namespace VirtualNes.Core
|
|||||||
return fds.now_freq;
|
return fds.now_freq;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override uint GetSize()
|
private class FDSSOUND
|
||||||
{
|
|
||||||
return fds.GetSize() + fds_sync.GetSize();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
fds.SaveState(buffer);
|
|
||||||
fds_sync.SaveState(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
private class FDSSOUND : IStateBufferObject
|
|
||||||
{
|
{
|
||||||
public byte[] reg = new byte[0x80];
|
public byte[] reg = new byte[0x80];
|
||||||
public byte volenv_mode; // Volume Envelope
|
public byte volenv_mode; // Volume Envelope
|
||||||
@ -479,41 +467,6 @@ namespace VirtualNes.Core
|
|||||||
now_freq = 0;
|
now_freq = 0;
|
||||||
output = 0;
|
output = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public uint GetSize()
|
|
||||||
{
|
|
||||||
return 512;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(reg);
|
|
||||||
buffer.Write(volenv_mode);
|
|
||||||
buffer.Write(volenv_gain);
|
|
||||||
buffer.Write(volenv_decay);
|
|
||||||
buffer.Write(volenv_phaseacc);
|
|
||||||
buffer.Write(swpenv_mode);
|
|
||||||
buffer.Write(swpenv_gain);
|
|
||||||
buffer.Write(swpenv_decay);
|
|
||||||
buffer.Write(swpenv_phaseacc);
|
|
||||||
buffer.Write(envelope_enable);
|
|
||||||
buffer.Write(envelope_speed);
|
|
||||||
buffer.Write(wave_setup);
|
|
||||||
buffer.Write(master_volume);
|
|
||||||
buffer.Write(main_wavetable);
|
|
||||||
buffer.Write(main_enable);
|
|
||||||
buffer.Write(main_frequency);
|
|
||||||
buffer.Write(main_addr);
|
|
||||||
buffer.Write(lfo_wavetable);
|
|
||||||
buffer.Write(lfo_enable);
|
|
||||||
buffer.Write(lfo_frequency);
|
|
||||||
buffer.Write(lfo_addr);
|
|
||||||
buffer.Write(lfo_phaseacc);
|
|
||||||
buffer.Write(sweep_bias);
|
|
||||||
buffer.Write(now_volume);
|
|
||||||
buffer.Write(now_freq);
|
|
||||||
buffer.Write(output);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using static VirtualNes.Core.APU_FME7;
|
|
||||||
|
|
||||||
namespace VirtualNes.Core
|
namespace VirtualNes.Core
|
||||||
{
|
{
|
||||||
@ -92,7 +91,7 @@ namespace VirtualNes.Core
|
|||||||
byte[][] envelope_table;
|
byte[][] envelope_table;
|
||||||
sbyte[][] envstep_table;
|
sbyte[][] envstep_table;
|
||||||
|
|
||||||
ENVELOPE envelope;
|
ENVELOPE envelope = new ENVELOPE();
|
||||||
NOISE noise = new NOISE();
|
NOISE noise = new NOISE();
|
||||||
CHANNEL[] op = new CHANNEL[3] { new CHANNEL(), new CHANNEL(), new CHANNEL() };
|
CHANNEL[] op = new CHANNEL[3] { new CHANNEL(), new CHANNEL(), new CHANNEL() };
|
||||||
byte address;
|
byte address;
|
||||||
@ -118,7 +117,6 @@ namespace VirtualNes.Core
|
|||||||
envstep_sawtooth, envstep_pulse, envstep_triangle, envstep_pulse,
|
envstep_sawtooth, envstep_pulse, envstep_triangle, envstep_pulse,
|
||||||
envstep_sawtooth, envstep_pulse, envstep_triangle, envstep_pulse
|
envstep_sawtooth, envstep_pulse, envstep_triangle, envstep_pulse
|
||||||
};
|
};
|
||||||
envelope = new ENVELOPE(envelope_table, envstep_table);
|
|
||||||
|
|
||||||
Reset(APU_CLOCK, 22050);
|
Reset(APU_CLOCK, 22050);
|
||||||
}
|
}
|
||||||
@ -135,8 +133,8 @@ namespace VirtualNes.Core
|
|||||||
item.ZeroMemory();
|
item.ZeroMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
envelope.envtbl_index = 0;
|
envelope.envtbl = envelope_table[0];
|
||||||
envelope.envstep_index = 0;
|
envelope.envstep = envstep_table[0];
|
||||||
|
|
||||||
noise.noiserange = 1;
|
noise.noiserange = 1;
|
||||||
noise.noiseout = 0xFF;
|
noise.noiseout = 0xFF;
|
||||||
@ -213,8 +211,8 @@ namespace VirtualNes.Core
|
|||||||
envelope.freq = INT2FIX(((envelope.reg[1] & 0x0F) << 8) + envelope.reg[0] + 1);
|
envelope.freq = INT2FIX(((envelope.reg[1] & 0x0F) << 8) + envelope.reg[0] + 1);
|
||||||
break;
|
break;
|
||||||
case 0x0D:
|
case 0x0D:
|
||||||
envelope.envtbl_index = (byte)(data & 0x0F);
|
envelope.envtbl = envelope_table[data & 0x0F];
|
||||||
envelope.envstep_index = (byte)(data & 0x0F);
|
envelope.envstep = envstep_table[data & 0x0F];
|
||||||
envelope.envadr = 0;
|
envelope.envadr = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -334,22 +332,7 @@ namespace VirtualNes.Core
|
|||||||
return ch.output_vol;
|
return ch.output_vol;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override uint GetSize()
|
public class ENVELOPE
|
||||||
{
|
|
||||||
return (uint)(1 + envelope.GetSize() + noise.GetSize() + op[0].GetSize() * op.Length);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(address);
|
|
||||||
|
|
||||||
envelope.SaveState(buffer);
|
|
||||||
noise.SaveState(buffer);
|
|
||||||
foreach (var oneOp in op)
|
|
||||||
oneOp.SaveState(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ENVELOPE : IStateBufferObject
|
|
||||||
{
|
{
|
||||||
public byte[] reg = new byte[3];
|
public byte[] reg = new byte[3];
|
||||||
public byte volume;
|
public byte volume;
|
||||||
@ -358,19 +341,8 @@ namespace VirtualNes.Core
|
|||||||
public int phaseacc;
|
public int phaseacc;
|
||||||
public int envadr;
|
public int envadr;
|
||||||
|
|
||||||
public byte envtbl_index;
|
public byte[] envtbl;
|
||||||
public byte envstep_index;
|
public sbyte[] envstep;
|
||||||
|
|
||||||
byte[][] ref_envtbl;
|
|
||||||
sbyte[][] ref_envstep;
|
|
||||||
public byte[] envtbl => ref_envtbl[envtbl_index];
|
|
||||||
public sbyte[] envstep => ref_envstep[envstep_index];
|
|
||||||
public ENVELOPE(byte[][] envtbl, sbyte[][] envstep)
|
|
||||||
{
|
|
||||||
ref_envtbl = envtbl;
|
|
||||||
ref_envstep = envstep;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void ZeroMemory()
|
public void ZeroMemory()
|
||||||
{
|
{
|
||||||
@ -379,28 +351,12 @@ namespace VirtualNes.Core
|
|||||||
freq = 0;
|
freq = 0;
|
||||||
phaseacc = 0;
|
phaseacc = 0;
|
||||||
envadr = 0;
|
envadr = 0;
|
||||||
envtbl_index = 0;
|
envtbl = null;
|
||||||
envstep_index = 0;
|
envstep = null;
|
||||||
}
|
|
||||||
|
|
||||||
public uint GetSize()
|
|
||||||
{
|
|
||||||
return 18;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(reg);
|
|
||||||
buffer.Write(volume);
|
|
||||||
buffer.Write(freq);
|
|
||||||
buffer.Write(phaseacc);
|
|
||||||
buffer.Write(envadr);
|
|
||||||
buffer.Write(envtbl_index);
|
|
||||||
buffer.Write(envstep_index);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class NOISE : IStateBufferObject
|
public class NOISE
|
||||||
{
|
{
|
||||||
public int freq;
|
public int freq;
|
||||||
public int phaseacc;
|
public int phaseacc;
|
||||||
@ -411,22 +367,9 @@ namespace VirtualNes.Core
|
|||||||
{
|
{
|
||||||
freq = 0; phaseacc = 0; noiserange = 0; noiseout = 0;
|
freq = 0; phaseacc = 0; noiserange = 0; noiseout = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public uint GetSize()
|
|
||||||
{
|
|
||||||
return 13;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SaveState(StateBuffer buffer)
|
public class CHANNEL
|
||||||
{
|
|
||||||
buffer.Write(freq);
|
|
||||||
buffer.Write(phaseacc);
|
|
||||||
buffer.Write(noiserange);
|
|
||||||
buffer.Write(noiseout);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class CHANNEL : IStateBufferObject
|
|
||||||
{
|
{
|
||||||
public byte[] reg = new byte[3];
|
public byte[] reg = new byte[3];
|
||||||
public byte enable;
|
public byte enable;
|
||||||
@ -451,24 +394,6 @@ namespace VirtualNes.Core
|
|||||||
phaseacc = 0;
|
phaseacc = 0;
|
||||||
output_vol = 0;
|
output_vol = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public uint GetSize()
|
|
||||||
{
|
|
||||||
return 20;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(reg);
|
|
||||||
buffer.Write(enable);
|
|
||||||
buffer.Write(env_on);
|
|
||||||
buffer.Write(noise_on);
|
|
||||||
buffer.Write(adder);
|
|
||||||
buffer.Write(volume);
|
|
||||||
buffer.Write(freq);
|
|
||||||
buffer.Write(phaseacc);
|
|
||||||
buffer.Write(output_vol);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
using System;
|
namespace VirtualNes.Core
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
namespace VirtualNes.Core
|
|
||||||
{
|
{
|
||||||
public abstract class APU_INTERFACE : IStateBufferObject
|
public abstract class APU_INTERFACE
|
||||||
{
|
{
|
||||||
public const float APU_CLOCK = 1789772.5f;
|
public const float APU_CLOCK = 1789772.5f;
|
||||||
|
|
||||||
@ -22,7 +19,8 @@ namespace VirtualNes.Core
|
|||||||
public virtual void VSync() { }
|
public virtual void VSync() { }
|
||||||
public virtual bool Sync(int cycles) { return false; }
|
public virtual bool Sync(int cycles) { return false; }
|
||||||
public virtual int GetFreq(int channel) { return 0; }
|
public virtual int GetFreq(int channel) { return 0; }
|
||||||
public virtual void SaveState(StateBuffer buffer) { }
|
public virtual int GetStateSize() { return 0; }
|
||||||
|
public virtual void SaveState(byte[] p) { }
|
||||||
public virtual void LoadState(byte[] p) { }
|
public virtual void LoadState(byte[] p) { }
|
||||||
|
|
||||||
public static int INT2FIX(int x)
|
public static int INT2FIX(int x)
|
||||||
@ -34,11 +32,5 @@ namespace VirtualNes.Core
|
|||||||
{
|
{
|
||||||
return x >> 16;
|
return x >> 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public virtual uint GetSize()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace VirtualNes.Core
|
namespace VirtualNes.Core
|
||||||
{
|
{
|
||||||
@ -1193,49 +1190,7 @@ namespace VirtualNes.Core
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public class RECTANGLE
|
||||||
internal void GetFrameIRQ(ref int cycle, ref byte count, ref byte type, ref byte IRQ, ref byte occur)
|
|
||||||
{
|
|
||||||
cycle = FrameCycle;
|
|
||||||
count = (byte)FrameCount;
|
|
||||||
type = (byte)FrameType;
|
|
||||||
IRQ = FrameIRQ;
|
|
||||||
occur = FrameIRQoccur;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override uint GetSize()
|
|
||||||
{
|
|
||||||
return sizeof(byte) +
|
|
||||||
sizeof(byte) +
|
|
||||||
sizeof(int) +
|
|
||||||
sizeof(int) +
|
|
||||||
sizeof(int) +
|
|
||||||
sizeof(byte) +
|
|
||||||
sizeof(byte) +
|
|
||||||
ch0.GetSize() +
|
|
||||||
ch1.GetSize() +
|
|
||||||
ch2.GetSize() +
|
|
||||||
ch3.GetSize() +
|
|
||||||
ch4.GetSize();
|
|
||||||
}
|
|
||||||
|
|
||||||
public unsafe override void SaveState(StateBuffer p)
|
|
||||||
{
|
|
||||||
p.Write(reg4015);
|
|
||||||
p.Write(sync_reg4015);
|
|
||||||
p.Write(FrameCycle);
|
|
||||||
p.Write(FrameCount);
|
|
||||||
p.Write(FrameType);
|
|
||||||
p.Write(FrameIRQ);
|
|
||||||
p.Write(FrameIRQoccur);
|
|
||||||
ch0.SaveState(p);
|
|
||||||
ch1.SaveState(p);
|
|
||||||
ch2.SaveState(p);
|
|
||||||
ch3.SaveState(p);
|
|
||||||
ch4.SaveState(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
public class RECTANGLE : IStateBufferObject
|
|
||||||
{
|
{
|
||||||
public byte[] reg = new byte[4]; // register
|
public byte[] reg = new byte[4]; // register
|
||||||
|
|
||||||
@ -1314,46 +1269,8 @@ namespace VirtualNes.Core
|
|||||||
dummy2 = 0;
|
dummy2 = 0;
|
||||||
sync_len_count = 0;
|
sync_len_count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public uint GetSize()
|
|
||||||
{
|
|
||||||
return 64;
|
|
||||||
}
|
}
|
||||||
|
public class TRIANGLE
|
||||||
public void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(reg);
|
|
||||||
buffer.Write(enable);
|
|
||||||
buffer.Write(holdnote);
|
|
||||||
buffer.Write(volume);
|
|
||||||
buffer.Write(complement);
|
|
||||||
buffer.Write(phaseacc);
|
|
||||||
buffer.Write(freq);
|
|
||||||
buffer.Write(freqlimit);
|
|
||||||
buffer.Write(adder);
|
|
||||||
buffer.Write(duty);
|
|
||||||
buffer.Write(len_count);
|
|
||||||
buffer.Write(nowvolume);
|
|
||||||
buffer.Write(env_fixed);
|
|
||||||
buffer.Write(env_decay);
|
|
||||||
buffer.Write(env_count);
|
|
||||||
buffer.Write(dummy0);
|
|
||||||
buffer.Write(env_vol);
|
|
||||||
buffer.Write(swp_on);
|
|
||||||
buffer.Write(swp_inc);
|
|
||||||
buffer.Write(swp_shift);
|
|
||||||
buffer.Write(swp_decay);
|
|
||||||
buffer.Write(swp_count);
|
|
||||||
buffer.Write(dummy1);
|
|
||||||
buffer.Write(sync_reg);
|
|
||||||
buffer.Write(sync_output_enable);
|
|
||||||
buffer.Write(sync_enable);
|
|
||||||
buffer.Write(sync_holdnote);
|
|
||||||
buffer.Write(dummy2);
|
|
||||||
buffer.Write(sync_len_count);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public class TRIANGLE : IStateBufferObject
|
|
||||||
{
|
{
|
||||||
public byte[] reg = new byte[4];
|
public byte[] reg = new byte[4];
|
||||||
|
|
||||||
@ -1379,7 +1296,6 @@ namespace VirtualNes.Core
|
|||||||
public int sync_len_count;
|
public int sync_len_count;
|
||||||
public int sync_lin_count;
|
public int sync_lin_count;
|
||||||
|
|
||||||
|
|
||||||
internal void ZeroMemory()
|
internal void ZeroMemory()
|
||||||
{
|
{
|
||||||
Array.Clear(reg, 0, reg.Length);
|
Array.Clear(reg, 0, reg.Length);
|
||||||
@ -1402,34 +1318,8 @@ namespace VirtualNes.Core
|
|||||||
sync_len_count = 0;
|
sync_len_count = 0;
|
||||||
sync_lin_count = 0;
|
sync_lin_count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public uint GetSize()
|
|
||||||
{
|
|
||||||
return 47;
|
|
||||||
}
|
}
|
||||||
|
public class DPCM
|
||||||
public void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(reg);
|
|
||||||
buffer.Write(enable);
|
|
||||||
buffer.Write(holdnote);
|
|
||||||
buffer.Write(counter_start);
|
|
||||||
buffer.Write(dummy0);
|
|
||||||
buffer.Write(phaseacc);
|
|
||||||
buffer.Write(freq);
|
|
||||||
buffer.Write(len_count);
|
|
||||||
buffer.Write(lin_count);
|
|
||||||
buffer.Write(adder);
|
|
||||||
buffer.Write(nowvolume);
|
|
||||||
buffer.Write(sync_reg);
|
|
||||||
buffer.Write(sync_enable);
|
|
||||||
buffer.Write(sync_holdnote);
|
|
||||||
buffer.Write(sync_counter_start);
|
|
||||||
buffer.Write(sync_len_count);
|
|
||||||
buffer.Write(sync_lin_count);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public class DPCM : IStateBufferObject
|
|
||||||
{
|
{
|
||||||
public byte[] reg = new byte[4];
|
public byte[] reg = new byte[4];
|
||||||
public byte enable;
|
public byte enable;
|
||||||
@ -1453,42 +1343,8 @@ namespace VirtualNes.Core
|
|||||||
public byte sync_irq_enable;
|
public byte sync_irq_enable;
|
||||||
public int sync_cycles, sync_cache_cycles;
|
public int sync_cycles, sync_cache_cycles;
|
||||||
public int sync_dmalength, sync_cache_dmalength;
|
public int sync_dmalength, sync_cache_dmalength;
|
||||||
|
|
||||||
public uint GetSize()
|
|
||||||
{
|
|
||||||
return 72;
|
|
||||||
}
|
}
|
||||||
|
public class NOISE
|
||||||
public void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(reg);
|
|
||||||
buffer.Write(enable);
|
|
||||||
buffer.Write(looping);
|
|
||||||
buffer.Write(cur_byte);
|
|
||||||
buffer.Write(dpcm_value);
|
|
||||||
buffer.Write(freq);
|
|
||||||
buffer.Write(phaseacc);
|
|
||||||
buffer.Write(output);
|
|
||||||
buffer.Write(address);
|
|
||||||
buffer.Write(cache_addr);
|
|
||||||
buffer.Write(dmalength);
|
|
||||||
buffer.Write(cache_dmalength);
|
|
||||||
buffer.Write(dpcm_output_real);
|
|
||||||
buffer.Write(dpcm_output_fake);
|
|
||||||
buffer.Write(dpcm_output_old);
|
|
||||||
buffer.Write(dpcm_output_offset);
|
|
||||||
buffer.Write(sync_reg);
|
|
||||||
buffer.Write(sync_enable);
|
|
||||||
buffer.Write(sync_looping);
|
|
||||||
buffer.Write(sync_irq_gen);
|
|
||||||
buffer.Write(sync_irq_enable);
|
|
||||||
buffer.Write(sync_cycles);
|
|
||||||
buffer.Write(sync_cache_cycles);
|
|
||||||
buffer.Write(sync_dmalength);
|
|
||||||
buffer.Write(sync_cache_dmalength);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public class NOISE : IStateBufferObject
|
|
||||||
{
|
{
|
||||||
public byte[] reg = new byte[4]; // register
|
public byte[] reg = new byte[4]; // register
|
||||||
|
|
||||||
@ -1521,7 +1377,6 @@ namespace VirtualNes.Core
|
|||||||
public byte dummy1;
|
public byte dummy1;
|
||||||
public int sync_len_count;
|
public int sync_len_count;
|
||||||
|
|
||||||
|
|
||||||
internal void ZeroMemory()
|
internal void ZeroMemory()
|
||||||
{
|
{
|
||||||
Array.Clear(reg, 0, reg.Length);
|
Array.Clear(reg, 0, reg.Length);
|
||||||
@ -1551,37 +1406,6 @@ namespace VirtualNes.Core
|
|||||||
dummy1 = 0;
|
dummy1 = 0;
|
||||||
sync_len_count = 0;
|
sync_len_count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public uint GetSize()
|
|
||||||
{
|
|
||||||
return 52;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(reg);
|
|
||||||
buffer.Write(enable);
|
|
||||||
buffer.Write(holdnote);
|
|
||||||
buffer.Write(volume);
|
|
||||||
buffer.Write(xor_tap);
|
|
||||||
buffer.Write(shift_reg);
|
|
||||||
buffer.Write(phaseacc);
|
|
||||||
buffer.Write(freq);
|
|
||||||
buffer.Write(len_count);
|
|
||||||
buffer.Write(nowvolume);
|
|
||||||
buffer.Write(output);
|
|
||||||
buffer.Write(env_fixed);
|
|
||||||
buffer.Write(env_decay);
|
|
||||||
buffer.Write(env_count);
|
|
||||||
buffer.Write(dummy0);
|
|
||||||
buffer.Write(env_vol);
|
|
||||||
buffer.Write(sync_reg);
|
|
||||||
buffer.Write(sync_output_enable);
|
|
||||||
buffer.Write(sync_enable);
|
|
||||||
buffer.Write(sync_holdnote);
|
|
||||||
buffer.Write(dummy1);
|
|
||||||
buffer.Write(sync_len_count);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -370,27 +370,7 @@ namespace VirtualNes.Core
|
|||||||
return ch.output_vol;
|
return ch.output_vol;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override uint GetSize()
|
public class SYNCRECTANGLE
|
||||||
{
|
|
||||||
//3*sizeof(BYTE) + sizeof(ch0) + sizeof(ch1) + sizeof(sch0) + sizeof(sch1); 源代码似乎少了sync_reg5015的大小
|
|
||||||
return 3 + ch0.GetSize() + ch1.GetSize() + 1 + sch0.GetSize() + sch1.GetSize();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(reg5010);
|
|
||||||
buffer.Write(reg5011);
|
|
||||||
buffer.Write(reg5015);
|
|
||||||
|
|
||||||
ch0.SaveState(buffer);
|
|
||||||
ch1.SaveState(buffer);
|
|
||||||
|
|
||||||
buffer.Write(sync_reg5015);
|
|
||||||
sch0.SaveState(buffer);
|
|
||||||
sch1.SaveState(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SYNCRECTANGLE : IStateBufferObject
|
|
||||||
{
|
{
|
||||||
// For sync
|
// For sync
|
||||||
public byte[] reg = new byte[4];
|
public byte[] reg = new byte[4];
|
||||||
@ -407,23 +387,9 @@ namespace VirtualNes.Core
|
|||||||
Array.Clear(dummy, 0, dummy.Length);
|
Array.Clear(dummy, 0, dummy.Length);
|
||||||
vbl_length = 0;
|
vbl_length = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public uint GetSize()
|
|
||||||
{
|
|
||||||
return 12;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SaveState(StateBuffer buffer)
|
public class RECTANGLE
|
||||||
{
|
|
||||||
buffer.Write(reg);
|
|
||||||
buffer.Write(enable);
|
|
||||||
buffer.Write(holdnote);
|
|
||||||
buffer.Write(dummy);
|
|
||||||
buffer.Write(vbl_length);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class RECTANGLE : IStateBufferObject
|
|
||||||
{
|
{
|
||||||
public byte[] reg = new byte[4];
|
public byte[] reg = new byte[4];
|
||||||
public byte enable;
|
public byte enable;
|
||||||
@ -444,29 +410,6 @@ namespace VirtualNes.Core
|
|||||||
|
|
||||||
public int adder;
|
public int adder;
|
||||||
public int duty_flip;
|
public int duty_flip;
|
||||||
|
|
||||||
public uint GetSize()
|
|
||||||
{
|
|
||||||
return 45;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(reg);
|
|
||||||
buffer.Write(enable);
|
|
||||||
buffer.Write(vbl_length);
|
|
||||||
buffer.Write(phaseacc);
|
|
||||||
buffer.Write(freq);
|
|
||||||
buffer.Write(output_vol);
|
|
||||||
buffer.Write(fixed_envelope);
|
|
||||||
buffer.Write(holdnote);
|
|
||||||
buffer.Write(volume);
|
|
||||||
buffer.Write(env_vol);
|
|
||||||
buffer.Write(env_phase);
|
|
||||||
buffer.Write(env_decay);
|
|
||||||
buffer.Write(adder);
|
|
||||||
buffer.Write(duty_flip);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,130 +1,101 @@
|
|||||||
using Codice.CM.Client.Differences;
|
using RECTANGLE = VirtualNes.Core.APU_VRC6.RECTANGLE;
|
||||||
using System;
|
|
||||||
using RECTANGLE = VirtualNes.Core.APU_VRC6.RECTANGLE;
|
|
||||||
using SAWTOOTH = VirtualNes.Core.APU_VRC6.SAWTOOTH;
|
using SAWTOOTH = VirtualNes.Core.APU_VRC6.SAWTOOTH;
|
||||||
|
|
||||||
namespace VirtualNes.Core
|
namespace VirtualNes.Core
|
||||||
{
|
{
|
||||||
public class APU_N106 : APU_INTERFACE
|
public class APU_N106 : APU_INTERFACE
|
||||||
{
|
{
|
||||||
CHANNEL[] op = new CHANNEL[8];
|
RECTANGLE ch0 = new RECTANGLE();
|
||||||
|
RECTANGLE ch1 = new RECTANGLE();
|
||||||
const int CHANNEL_VOL_SHIFT = 6;
|
SAWTOOTH ch2 = new SAWTOOTH();
|
||||||
float cpu_clock;
|
float cpu_clock;
|
||||||
uint cycle_rate;
|
int cycle_rate;
|
||||||
|
|
||||||
byte addrinc;
|
|
||||||
byte address;
|
|
||||||
byte channel_use;
|
|
||||||
|
|
||||||
byte[] tone = new byte[0x100];
|
|
||||||
|
|
||||||
public APU_N106()
|
public APU_N106()
|
||||||
{
|
{
|
||||||
// 仮設定
|
Reset(APU_CLOCK, 22050);
|
||||||
cpu_clock = APU_CLOCK;
|
|
||||||
cycle_rate = (uint)(cpu_clock * 12.0f * (1 << 20) / (45.0f * 22050.0f));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Reset(float fClock, int nRate)
|
public override void Reset(float fClock, int nRate)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 8; i++)
|
ch0.ZeroMemory();
|
||||||
{
|
ch1.ZeroMemory();
|
||||||
op[i].ZeroMemory();
|
ch2.ZeroMemory();
|
||||||
op[i].tonelen = 0x10 << 18;
|
|
||||||
}
|
|
||||||
|
|
||||||
address = 0;
|
|
||||||
addrinc = 1;
|
|
||||||
channel_use = 8;
|
|
||||||
|
|
||||||
Setup(fClock, nRate);
|
Setup(fClock, nRate);
|
||||||
|
|
||||||
// TONEの初期化はしない...
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Setup(float fClock, int nRate)
|
public override void Setup(float fClock, int nRate)
|
||||||
{
|
{
|
||||||
cpu_clock = fClock;
|
cpu_clock = fClock;
|
||||||
cycle_rate = (uint)(cpu_clock * 12.0f * (1 << 20) / (45.0f * nRate));
|
cycle_rate = (int)(fClock * 65536.0f / nRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Write(ushort addr, byte data)
|
public override void Write(ushort addr, byte data)
|
||||||
{
|
{
|
||||||
if (addr == 0x4800)
|
switch (addr)
|
||||||
{
|
{
|
||||||
// tone[address*2+0] = (INT)(data&0x0F);
|
// VRC6 CH0 rectangle
|
||||||
// tone[address*2+1] = (INT)(data >>4);
|
case 0x9000:
|
||||||
tone[address * 2 + 0] = (byte)(data & 0x0F);
|
ch0.reg[0] = data;
|
||||||
tone[address * 2 + 1] = (byte)(data >> 4);
|
ch0.gate = (byte)(data & 0x80);
|
||||||
|
ch0.volume = (byte)(data & 0x0F);
|
||||||
if (address >= 0x40)
|
ch0.duty_pos = (byte)((data >> 4) & 0x07);
|
||||||
{
|
|
||||||
int no = (address - 0x40) >> 3;
|
|
||||||
uint tonelen = 0;
|
|
||||||
ref CHANNEL ch = ref op[no];
|
|
||||||
|
|
||||||
switch (address & 7)
|
|
||||||
{
|
|
||||||
case 0x00:
|
|
||||||
ch.freq = (uint)((ch.freq & ~0x000000FF) | data);
|
|
||||||
break;
|
break;
|
||||||
case 0x02:
|
case 0x9001:
|
||||||
ch.freq = (uint)((ch.freq & ~0x0000FF00) | ((uint)data << 8));
|
ch0.reg[1] = data;
|
||||||
|
ch0.freq = INT2FIX((((ch0.reg[2] & 0x0F) << 8) | data) + 1);
|
||||||
break;
|
break;
|
||||||
case 0x04:
|
case 0x9002:
|
||||||
ch.freq = (uint)((ch.freq & ~0x00030000) | (((uint)data & 0x03) << 16));
|
ch0.reg[2] = data;
|
||||||
tonelen = (uint)((0x20 - (data & 0x1c)) << 18);
|
ch0.enable = (byte)(data & 0x80);
|
||||||
ch.databuf = (byte)((data & 0x1c) >> 2);
|
ch0.freq = INT2FIX((((data & 0x0F) << 8) | ch0.reg[1]) + 1);
|
||||||
if (ch.tonelen != tonelen)
|
|
||||||
{
|
|
||||||
ch.tonelen = tonelen;
|
|
||||||
ch.phase = 0;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 0x06:
|
// VRC6 CH1 rectangle
|
||||||
ch.toneadr = data;
|
case 0xA000:
|
||||||
|
ch1.reg[0] = data;
|
||||||
|
ch1.gate = (byte)(data & 0x80);
|
||||||
|
ch1.volume = (byte)(data & 0x0F);
|
||||||
|
ch1.duty_pos = (byte)((data >> 4) & 0x07);
|
||||||
break;
|
break;
|
||||||
case 0x07:
|
case 0xA001:
|
||||||
ch.vol = (byte)(data & 0x0f);
|
ch1.reg[1] = data;
|
||||||
ch.volupdate = 0xFF;
|
ch1.freq = INT2FIX((((ch1.reg[2] & 0x0F) << 8) | data) + 1);
|
||||||
if (no == 7)
|
break;
|
||||||
channel_use = (byte)(((data >> 4) & 0x07) + 1);
|
case 0xA002:
|
||||||
|
ch1.reg[2] = data;
|
||||||
|
ch1.enable = (byte)(data & 0x80);
|
||||||
|
ch1.freq = INT2FIX((((data & 0x0F) << 8) | ch1.reg[1]) + 1);
|
||||||
|
break;
|
||||||
|
// VRC6 CH2 sawtooth
|
||||||
|
case 0xB000:
|
||||||
|
ch2.reg[1] = data;
|
||||||
|
ch2.phaseaccum = (byte)(data & 0x3F);
|
||||||
|
break;
|
||||||
|
case 0xB001:
|
||||||
|
ch2.reg[1] = data;
|
||||||
|
ch2.freq = INT2FIX((((ch2.reg[2] & 0x0F) << 8) | data) + 1);
|
||||||
|
break;
|
||||||
|
case 0xB002:
|
||||||
|
ch2.reg[2] = data;
|
||||||
|
ch2.enable = (byte)(data & 0x80);
|
||||||
|
ch2.freq = INT2FIX((((data & 0x0F) << 8) | ch2.reg[1]) + 1);
|
||||||
|
// ch2.adder = 0; // クリアするとノイズの原因になる
|
||||||
|
// ch2.accum = 0; // クリアするとノイズの原因になる
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addrinc != 0)
|
|
||||||
{
|
|
||||||
address = (byte)((address + 1) & 0x7f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (addr == 0xF800)
|
|
||||||
{
|
|
||||||
address = (byte)(data & 0x7F);
|
|
||||||
addrinc = (byte)(data & 0x80);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override byte Read(ushort addr)
|
|
||||||
{
|
|
||||||
// $4800 dummy read!!
|
|
||||||
if (addr == 0x0000)
|
|
||||||
{
|
|
||||||
if (addrinc != 0)
|
|
||||||
{
|
|
||||||
address = (byte)((address + 1) & 0x7F);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (byte)(addr >> 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int Process(int channel)
|
public override int Process(int channel)
|
||||||
{
|
{
|
||||||
if (channel >= (8 - channel_use) && channel < 8)
|
switch (channel)
|
||||||
{
|
{
|
||||||
return ChannelRender(ref op[channel]);
|
case 0:
|
||||||
|
return RectangleRender(ch0);
|
||||||
|
case 1:
|
||||||
|
return RectangleRender(ch1);
|
||||||
|
case 2:
|
||||||
|
return SawtoothRender(ch2);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -132,117 +103,143 @@ namespace VirtualNes.Core
|
|||||||
|
|
||||||
public override int GetFreq(int channel)
|
public override int GetFreq(int channel)
|
||||||
{
|
{
|
||||||
if (channel < 8)
|
if (channel == 0 || channel == 1)
|
||||||
{
|
{
|
||||||
channel &= 7;
|
RECTANGLE ch;
|
||||||
if (channel < (8 - channel_use))
|
if (channel == 0) ch = ch0;
|
||||||
|
else ch = ch1;
|
||||||
|
if (ch.enable == 0 || ch.gate != 0 || ch.volume == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
if (ch.freq < INT2FIX(8))
|
||||||
ref CHANNEL ch = ref op[channel & 0x07];
|
|
||||||
if (ch.freq == 0 || ch.vol == 0)
|
|
||||||
return 0;
|
return 0;
|
||||||
int temp = channel_use * (8 - ch.databuf) * 4 * 45;
|
return (int)((256.0f * cpu_clock / (FIX2INT(ch.freq) * 16.0f)));
|
||||||
if (temp == 0)
|
}
|
||||||
|
if (channel == 2)
|
||||||
|
{
|
||||||
|
SAWTOOTH ch = ch2;
|
||||||
|
if (ch.enable == 0 || ch.phaseaccum == 0)
|
||||||
return 0;
|
return 0;
|
||||||
return (int)(256.0 * (double)cpu_clock * 12.0 * ch.freq / ((double)0x40000 * temp));
|
if (ch.freq < INT2FIX(8))
|
||||||
|
return 0;
|
||||||
|
return (int)(256.0f * cpu_clock / (FIX2INT(ch.freq) * 14.0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ChannelRender(ref CHANNEL ch)
|
int RectangleRender(RECTANGLE ch)
|
||||||
{
|
{
|
||||||
uint phasespd = (uint)(channel_use << 20);
|
// Enable?
|
||||||
|
if (ch.enable == 0)
|
||||||
|
{
|
||||||
|
ch.output_vol = 0;
|
||||||
|
ch.adder = 0;
|
||||||
|
return ch.output_vol;
|
||||||
|
}
|
||||||
|
|
||||||
ch.phaseacc -= (int)cycle_rate;
|
// Digitized output
|
||||||
|
if (ch.gate != 0)
|
||||||
|
{
|
||||||
|
ch.output_vol = ch.volume << APU_VRC6.RECTANGLE_VOL_SHIFT;
|
||||||
|
return ch.output_vol;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 一定以上の周波数は処理しない(無駄)
|
||||||
|
if (ch.freq < INT2FIX(8))
|
||||||
|
{
|
||||||
|
ch.output_vol = 0;
|
||||||
|
return ch.output_vol;
|
||||||
|
}
|
||||||
|
|
||||||
|
ch.phaseacc -= cycle_rate;
|
||||||
if (ch.phaseacc >= 0)
|
if (ch.phaseacc >= 0)
|
||||||
{
|
return ch.output_vol;
|
||||||
if (ch.volupdate != 0)
|
|
||||||
{
|
|
||||||
ch.output = (tone[((ch.phase >> 18) + ch.toneadr) & 0xFF] * ch.vol) << CHANNEL_VOL_SHIFT;
|
|
||||||
ch.volupdate = 0;
|
|
||||||
}
|
|
||||||
return ch.output;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
int output = ch.volume << APU_VRC6.RECTANGLE_VOL_SHIFT;
|
||||||
|
|
||||||
|
if (ch.freq > cycle_rate)
|
||||||
|
{
|
||||||
|
// add 1 step
|
||||||
|
ch.phaseacc += ch.freq;
|
||||||
|
ch.adder = (byte)((ch.adder + 1) & 0x0F);
|
||||||
|
if (ch.adder <= ch.duty_pos)
|
||||||
|
ch.output_vol = output;
|
||||||
|
else
|
||||||
|
ch.output_vol = -output;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// average calculate
|
||||||
|
int num_times, total;
|
||||||
|
num_times = total = 0;
|
||||||
while (ch.phaseacc < 0)
|
while (ch.phaseacc < 0)
|
||||||
{
|
{
|
||||||
ch.phaseacc += (int)phasespd;
|
ch.phaseacc += ch.freq;
|
||||||
ch.phase += ch.freq;
|
ch.adder = (byte)((ch.adder + 1) & 0x0F);
|
||||||
|
if (ch.adder <= ch.duty_pos)
|
||||||
|
total += output;
|
||||||
|
else
|
||||||
|
total += -output;
|
||||||
|
num_times++;
|
||||||
}
|
}
|
||||||
while (ch.tonelen != 0 && (ch.phase >= ch.tonelen))
|
ch.output_vol = total / num_times;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ch.output_vol;
|
||||||
|
}
|
||||||
|
|
||||||
|
int SawtoothRender(SAWTOOTH ch)
|
||||||
{
|
{
|
||||||
ch.phase -= ch.tonelen;
|
// Digitized output
|
||||||
}
|
if (ch.enable == 0)
|
||||||
|
|
||||||
ch.output = (tone[((ch.phase >> 18) + ch.toneadr) & 0xFF] * ch.vol) << CHANNEL_VOL_SHIFT;
|
|
||||||
|
|
||||||
return ch.output;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override uint GetSize()
|
|
||||||
{
|
{
|
||||||
return (uint)(3 * sizeof(byte) + 8 * op[0].GetSize() + tone.Length);
|
ch.output_vol = 0;
|
||||||
|
return ch.output_vol;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void SaveState(StateBuffer buffer)
|
// 一定以上の周波数は処理しない(無駄)
|
||||||
|
if (ch.freq < INT2FIX(9))
|
||||||
{
|
{
|
||||||
buffer.Write(addrinc);
|
return ch.output_vol;
|
||||||
buffer.Write(address);
|
|
||||||
buffer.Write(channel_use);
|
|
||||||
|
|
||||||
foreach (var oneOp in op)
|
|
||||||
oneOp.SaveState(buffer);
|
|
||||||
|
|
||||||
buffer.Write(tone);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct CHANNEL : IStateBufferObject
|
ch.phaseacc -= cycle_rate / 2;
|
||||||
|
if (ch.phaseacc >= 0)
|
||||||
|
return ch.output_vol;
|
||||||
|
|
||||||
|
if (ch.freq > cycle_rate / 2)
|
||||||
{
|
{
|
||||||
public int phaseacc;
|
// add 1 step
|
||||||
|
ch.phaseacc += ch.freq;
|
||||||
public uint freq;
|
if (++ch.adder >= 7)
|
||||||
public uint phase;
|
|
||||||
public uint tonelen;
|
|
||||||
|
|
||||||
public int output;
|
|
||||||
|
|
||||||
public byte toneadr;
|
|
||||||
public byte volupdate;
|
|
||||||
|
|
||||||
public byte vol;
|
|
||||||
public byte databuf;
|
|
||||||
|
|
||||||
internal void ZeroMemory()
|
|
||||||
{
|
{
|
||||||
phaseacc = 0;
|
ch.adder = 0;
|
||||||
freq = 0;
|
ch.accum = 0;
|
||||||
phase = 0;
|
}
|
||||||
tonelen = 0;
|
ch.accum += ch.phaseaccum;
|
||||||
output = 0;
|
ch.output_vol = ch.accum << APU_VRC6.SAWTOOTH_VOL_SHIFT;
|
||||||
toneadr = 0;
|
}
|
||||||
volupdate = 0;
|
else
|
||||||
vol = 0;
|
{
|
||||||
databuf = 0;
|
// average calculate
|
||||||
|
int num_times, total;
|
||||||
|
num_times = total = 0;
|
||||||
|
while (ch.phaseacc < 0)
|
||||||
|
{
|
||||||
|
ch.phaseacc += ch.freq;
|
||||||
|
if (++ch.adder >= 7)
|
||||||
|
{
|
||||||
|
ch.adder = 0;
|
||||||
|
ch.accum = 0;
|
||||||
|
}
|
||||||
|
ch.accum += ch.phaseaccum;
|
||||||
|
total += ch.accum << APU_VRC6.SAWTOOTH_VOL_SHIFT;
|
||||||
|
num_times++;
|
||||||
|
}
|
||||||
|
ch.output_vol = (total / num_times);
|
||||||
}
|
}
|
||||||
|
|
||||||
public uint GetSize()
|
return ch.output_vol;
|
||||||
{
|
|
||||||
return 4 * 5 + 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(phaseacc);
|
|
||||||
buffer.Write(freq);
|
|
||||||
buffer.Write(phase);
|
|
||||||
buffer.Write(tonelen);
|
|
||||||
buffer.Write(output);
|
|
||||||
buffer.Write(toneadr);
|
|
||||||
buffer.Write(volupdate);
|
|
||||||
buffer.Write(vol);
|
|
||||||
buffer.Write(databuf);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
namespace VirtualNes.Core
|
namespace VirtualNes.Core
|
||||||
{
|
{
|
||||||
@ -246,18 +245,7 @@ namespace VirtualNes.Core
|
|||||||
return ch.output_vol;
|
return ch.output_vol;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override uint GetSize()
|
public class RECTANGLE
|
||||||
{
|
|
||||||
return ch0.GetSize() + ch1.GetSize() + ch2.GetSize();
|
|
||||||
}
|
|
||||||
public override void SaveState(StateBuffer p)
|
|
||||||
{
|
|
||||||
ch0.SaveState(p);
|
|
||||||
ch1.SaveState(p);
|
|
||||||
ch2.SaveState(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
public class RECTANGLE : IStateBufferObject
|
|
||||||
{
|
{
|
||||||
public byte[] reg = new byte[3];
|
public byte[] reg = new byte[3];
|
||||||
|
|
||||||
@ -286,27 +274,9 @@ namespace VirtualNes.Core
|
|||||||
adder = 0;
|
adder = 0;
|
||||||
duty_pos = 0;
|
duty_pos = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public uint GetSize()
|
|
||||||
{
|
|
||||||
return 20;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SaveState(StateBuffer buffer)
|
public class SAWTOOTH
|
||||||
{
|
|
||||||
buffer.Write(reg);
|
|
||||||
buffer.Write(enable);
|
|
||||||
buffer.Write(gate);
|
|
||||||
buffer.Write(volume);
|
|
||||||
buffer.Write(phaseacc);
|
|
||||||
buffer.Write(freq);
|
|
||||||
buffer.Write(output_vol);
|
|
||||||
buffer.Write(adder);
|
|
||||||
buffer.Write(duty_pos);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SAWTOOTH : IStateBufferObject
|
|
||||||
{
|
{
|
||||||
public byte[] reg = new byte[3];
|
public byte[] reg = new byte[3];
|
||||||
|
|
||||||
@ -335,24 +305,6 @@ namespace VirtualNes.Core
|
|||||||
accum = 0;
|
accum = 0;
|
||||||
phaseaccum = 0;
|
phaseaccum = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public uint GetSize()
|
|
||||||
{
|
|
||||||
return 20;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(reg);
|
|
||||||
buffer.Write(enable);
|
|
||||||
buffer.Write(volume);
|
|
||||||
buffer.Write(phaseacc);
|
|
||||||
buffer.Write(freq);
|
|
||||||
buffer.Write(output_vol);
|
|
||||||
buffer.Write(adder);
|
|
||||||
buffer.Write(accum);
|
|
||||||
buffer.Write(phaseaccum);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
|
||||||
using VirtualNes.Core.Emu2413;
|
using VirtualNes.Core.Emu2413;
|
||||||
|
|
||||||
namespace VirtualNes.Core
|
namespace VirtualNes.Core
|
||||||
@ -93,15 +92,5 @@ namespace VirtualNes.Core
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override uint GetSize()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
//not impl
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2021,11 +2021,6 @@ namespace VirtualNes.Core
|
|||||||
{
|
{
|
||||||
r = R;
|
r = R;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal int GetDmaCycles()
|
|
||||||
{
|
|
||||||
return DMA_cycles;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum StatusFlag6502 : int
|
public enum StatusFlag6502 : int
|
||||||
|
@ -53,11 +53,6 @@ namespace VirtualNes.Core
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Span<T> Span(int start, int length)
|
|
||||||
{
|
|
||||||
return new Span<T>(m_rawArray, start + Offset, length);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static implicit operator ArrayRef<T>(T[] array)
|
public static implicit operator ArrayRef<T>(T[] array)
|
||||||
{
|
{
|
||||||
return new ArrayRef<T>(array);
|
return new ArrayRef<T>(array);
|
||||||
|
@ -40,10 +40,5 @@ namespace VirtualNes.Core
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void memcpy(Array dst, Array src, int length)
|
|
||||||
{
|
|
||||||
Array.Copy(src, dst, length);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
namespace VirtualNes.Core
|
||||||
|
{
|
||||||
|
public enum NESCOMMAND
|
||||||
|
{
|
||||||
|
NESCMD_NONE = 0,
|
||||||
|
NESCMD_HWRESET,
|
||||||
|
NESCMD_SWRESET,
|
||||||
|
NESCMD_EXCONTROLLER, // Commandparam
|
||||||
|
NESCMD_DISK_THROTTLE_ON,
|
||||||
|
NESCMD_DISK_THROTTLE_OFF,
|
||||||
|
NESCMD_DISK_EJECT,
|
||||||
|
NESCMD_DISK_0A,
|
||||||
|
NESCMD_DISK_0B,
|
||||||
|
NESCMD_DISK_1A,
|
||||||
|
NESCMD_DISK_1B,
|
||||||
|
NESCMD_DISK_2A,
|
||||||
|
NESCMD_DISK_2B,
|
||||||
|
NESCMD_DISK_3A,
|
||||||
|
NESCMD_DISK_3B,
|
||||||
|
|
||||||
|
NESCMD_SOUND_MUTE, // CommandParam
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 31fee02299bfd5141aefb2bbfb0555a9
|
guid: d7e8126382c9728429056ba33afc85eb
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
@ -60,12 +60,12 @@ namespace VirtualNes
|
|||||||
public const byte BANKTYPE_CRAM = 0x01;
|
public const byte BANKTYPE_CRAM = 0x01;
|
||||||
public const byte BANKTYPE_VRAM = 0x80;
|
public const byte BANKTYPE_VRAM = 0x80;
|
||||||
|
|
||||||
// =ミラータイプ;
|
// 儈儔乕僞僀僾
|
||||||
public const byte VRAM_HMIRROR = 0x00; // Horizontal
|
public const byte VRAM_HMIRROR = 0x00; // Horizontal
|
||||||
public const byte VRAM_VMIRROR = 0x01; // Virtical
|
public const byte VRAM_VMIRROR = 0x01; // Virtical
|
||||||
public const byte VRAM_MIRROR4 = 0x02; // All screen
|
public const byte VRAM_MIRROR4 = 0x02; // All screen
|
||||||
public const byte VRAM_MIRROR4L = 0x03; // PA10 L固定 $2000-$23FFのミラー
|
public const byte VRAM_MIRROR4L = 0x03; // PA10 L屌掕 $2000-$23FF偺儈儔乕
|
||||||
public const byte VRAM_MIRROR4H = 0x04; // PA10 H固定 $2400-$27FFのミラー
|
public const byte VRAM_MIRROR4H = 0x04; // PA10 H屌掕 $2400-$27FF偺儈儔乕
|
||||||
|
|
||||||
// Frame-IRQ儗僕僗僞($4017)
|
// Frame-IRQ儗僕僗僞($4017)
|
||||||
public static int FrameIRQ;
|
public static int FrameIRQ;
|
||||||
|
@ -248,7 +248,7 @@ namespace VirtualNes.Core
|
|||||||
chr6 = p[14];
|
chr6 = p[14];
|
||||||
chr7 = p[15];
|
chr7 = p[15];
|
||||||
irq_enable = p[16];
|
irq_enable = p[16];
|
||||||
irq_counter = p[17];
|
irq_counter = (INT)p[17];
|
||||||
irq_latch = p[18];
|
irq_latch = p[18];
|
||||||
irq_request = p[19];
|
irq_request = p[19];
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,7 @@
|
|||||||
using Codice.CM.Client.Differences;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Runtime.ConstrainedExecution;
|
|
||||||
using System.Runtime.InteropServices.ComTypes;
|
|
||||||
using System.Security.Cryptography;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using UnityEngine;
|
|
||||||
using VirtualNes.Core.Debug;
|
using VirtualNes.Core.Debug;
|
||||||
|
|
||||||
namespace VirtualNes.Core
|
namespace VirtualNes.Core
|
||||||
@ -26,6 +21,7 @@ namespace VirtualNes.Core
|
|||||||
private List<CHEATCODE> m_CheatCode = new List<CHEATCODE>();
|
private List<CHEATCODE> m_CheatCode = new List<CHEATCODE>();
|
||||||
private List<GENIECODE> m_GenieCode = new List<GENIECODE>();
|
private List<GENIECODE> m_GenieCode = new List<GENIECODE>();
|
||||||
private bool m_bDiskThrottle;
|
private bool m_bDiskThrottle;
|
||||||
|
private int m_CommandRequest;
|
||||||
private int m_nSnapNo;
|
private int m_nSnapNo;
|
||||||
private bool m_bNsfPlaying;
|
private bool m_bNsfPlaying;
|
||||||
private bool m_bNsfInit;
|
private bool m_bNsfInit;
|
||||||
@ -177,6 +173,7 @@ namespace VirtualNes.Core
|
|||||||
Debuger.Log("VirtuaNES - CSharpCore\n");
|
Debuger.Log("VirtuaNES - CSharpCore\n");
|
||||||
|
|
||||||
m_bDiskThrottle = false;
|
m_bDiskThrottle = false;
|
||||||
|
m_CommandRequest = 0;
|
||||||
|
|
||||||
m_nSnapNo = 0;
|
m_nSnapNo = 0;
|
||||||
|
|
||||||
@ -454,6 +451,31 @@ namespace VirtualNes.Core
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Command(NESCOMMAND cmd)
|
||||||
|
{
|
||||||
|
CommandParam(cmd, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CommandParam(NESCOMMAND cmd, int param)
|
||||||
|
{
|
||||||
|
switch (cmd)
|
||||||
|
{
|
||||||
|
case NESCOMMAND.NESCMD_NONE: break;
|
||||||
|
case NESCOMMAND.NESCMD_HWRESET:
|
||||||
|
Reset();
|
||||||
|
m_CommandRequest = (int)cmd;
|
||||||
|
break;
|
||||||
|
case NESCOMMAND.NESCMD_SWRESET:
|
||||||
|
SoftReset();
|
||||||
|
m_CommandRequest = (int)cmd;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new NotImplementedException($"{cmd} not impl right now");
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public void CheatInitial()
|
public void CheatInitial()
|
||||||
{
|
{
|
||||||
m_CheatCode.Clear();
|
m_CheatCode.Clear();
|
||||||
@ -1651,256 +1673,6 @@ namespace VirtualNes.Core
|
|||||||
return m_BarcodeOut;
|
return m_BarcodeOut;
|
||||||
}
|
}
|
||||||
|
|
||||||
public State GetState()
|
|
||||||
{
|
|
||||||
State state = new State();
|
|
||||||
|
|
||||||
//HEADER
|
|
||||||
{
|
|
||||||
state.HEADER.ID = "VirtuaNES ST";
|
|
||||||
state.HEADER.BlockVersion = 0x0200;
|
|
||||||
|
|
||||||
if (rom.GetMapperNo() != 20)
|
|
||||||
state.HEADER.Ext0 = rom.GetPROM_CRC();
|
|
||||||
else
|
|
||||||
{
|
|
||||||
state.HEADER.Ext0 = rom.GetGameID();
|
|
||||||
state.HEADER.Ext1 = (ushort)rom.GetMakerID();
|
|
||||||
state.HEADER.Ext2 = (ushort)rom.GetDiskNo();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//REGISTER STATE
|
|
||||||
{
|
|
||||||
state.regBLOCK.ID = "REG DATA";
|
|
||||||
state.regBLOCK.BlockVersion = 0x0210;
|
|
||||||
state.regBLOCK.BlockSize = state.reg.GetSize();
|
|
||||||
|
|
||||||
R6502 R = null;
|
|
||||||
cpu.GetContext(ref R);
|
|
||||||
|
|
||||||
state.reg.cpureg.PC = R.PC;
|
|
||||||
state.reg.cpureg.A = R.A;
|
|
||||||
state.reg.cpureg.X = R.X;
|
|
||||||
state.reg.cpureg.Y = R.Y;
|
|
||||||
state.reg.cpureg.S = R.S;
|
|
||||||
state.reg.cpureg.P = R.P;
|
|
||||||
state.reg.cpureg.I = R.INT_pending;
|
|
||||||
|
|
||||||
int cycles = 0;
|
|
||||||
apu.GetFrameIRQ(ref cycles,
|
|
||||||
ref state.reg.cpureg.FrameIRQ_count,
|
|
||||||
ref state.reg.cpureg.FrameIRQ_type,
|
|
||||||
ref state.reg.cpureg.FrameIRQ,
|
|
||||||
ref state.reg.cpureg.FrameIRQ_occur);
|
|
||||||
state.reg.cpureg.FrameIRQ_cycles = cycles; // 参照がINTな為(ぉ
|
|
||||||
|
|
||||||
state.reg.cpureg.DMA_cycles = cpu.GetDmaCycles();
|
|
||||||
state.reg.cpureg.emul_cycles = emul_cycles;
|
|
||||||
state.reg.cpureg.base_cycles = base_cycles;
|
|
||||||
|
|
||||||
// SAVE PPU STATE
|
|
||||||
state.reg.ppureg.reg0 = MMU.PPUREG[0];
|
|
||||||
state.reg.ppureg.reg1 = MMU.PPUREG[1];
|
|
||||||
state.reg.ppureg.reg2 = MMU.PPUREG[2];
|
|
||||||
state.reg.ppureg.reg3 = MMU.PPUREG[3];
|
|
||||||
state.reg.ppureg.reg7 = MMU.PPU7_Temp;
|
|
||||||
state.reg.ppureg.loopy_t = MMU.loopy_t;
|
|
||||||
state.reg.ppureg.loopy_v = MMU.loopy_v;
|
|
||||||
state.reg.ppureg.loopy_x = MMU.loopy_x;
|
|
||||||
state.reg.ppureg.toggle56 = MMU.PPU56Toggle;
|
|
||||||
}
|
|
||||||
|
|
||||||
//RAM STATE
|
|
||||||
{
|
|
||||||
state.ram = RAMSTAT.GetDefault();
|
|
||||||
uint size = 0;
|
|
||||||
|
|
||||||
// SAVE RAM STATE
|
|
||||||
MemoryUtility.memcpy(state.ram.RAM, MMU.RAM, state.ram.RAM.Length);
|
|
||||||
MemoryUtility.memcpy(state.ram.BGPAL, MMU.BGPAL, state.ram.BGPAL.Length);
|
|
||||||
MemoryUtility.memcpy(state.ram.SPPAL, MMU.SPPAL, state.ram.SPPAL.Length);
|
|
||||||
MemoryUtility.memcpy(state.ram.SPRAM, MMU.SPRAM, state.ram.SPRAM.Length);
|
|
||||||
|
|
||||||
// S-RAM STATE(使用/未使用に関わらず存在すればセーブする)
|
|
||||||
if (rom.IsSAVERAM())
|
|
||||||
{
|
|
||||||
size = (uint)SAVERAM_SIZE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create Header
|
|
||||||
state.ramBLOCK.ID = "RAM DATA";
|
|
||||||
state.ramBLOCK.BlockVersion = 0x0100;
|
|
||||||
state.ramBLOCK.BlockSize = size + state.ram.GetSize();
|
|
||||||
|
|
||||||
if (rom.IsSAVERAM())
|
|
||||||
{
|
|
||||||
state.WRAM = new byte[SAVERAM_SIZE];
|
|
||||||
Array.Copy(MMU.WRAM, state.WRAM, SAVERAM_SIZE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//BANK STATE
|
|
||||||
{
|
|
||||||
state.mmu = MMUSTAT.GetDefault();
|
|
||||||
uint size = 0;
|
|
||||||
|
|
||||||
// SAVE CPU MEMORY BANK DATA
|
|
||||||
// BANK0,1,2はバンクセーブに関係なし
|
|
||||||
// VirtuaNES0.30から
|
|
||||||
// バンク3はSRAM使用に関わらずセーブ
|
|
||||||
for (int i = 3; i < 8; i++)
|
|
||||||
{
|
|
||||||
state.mmu.CPU_MEM_TYPE[i] = MMU.CPU_MEM_TYPE[i];
|
|
||||||
state.mmu.CPU_MEM_PAGE[i] = (ushort)MMU.CPU_MEM_PAGE[i];
|
|
||||||
|
|
||||||
if (MMU.CPU_MEM_TYPE[i] == MMU.BANKTYPE_RAM
|
|
||||||
|| MMU.CPU_MEM_TYPE[i] == MMU.BANKTYPE_DRAM)
|
|
||||||
{
|
|
||||||
size += 8 * 1024; // 8K BANK
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// SAVE VRAM MEMORY DATA
|
|
||||||
for (int i = 0; i < 12; i++)
|
|
||||||
{
|
|
||||||
state.mmu.PPU_MEM_TYPE[i] = MMU.PPU_MEM_TYPE[i];
|
|
||||||
state.mmu.PPU_MEM_PAGE[i] = (ushort)MMU.PPU_MEM_PAGE[i];
|
|
||||||
}
|
|
||||||
size += 4 * 1024; // 1K BANK x 4 (VRAM)
|
|
||||||
|
|
||||||
for (int i = 0; i < 8; i++)
|
|
||||||
{
|
|
||||||
state.mmu.CRAM_USED[i] = MMU.CRAM_USED[i];
|
|
||||||
if (MMU.CRAM_USED[i] != 0)
|
|
||||||
{
|
|
||||||
size += 4 * 1024; // 4K BANK
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create Header
|
|
||||||
state.mmuBLOCK.ID = "MMU DATA";
|
|
||||||
state.mmuBLOCK.BlockVersion = 0x0200;
|
|
||||||
state.mmuBLOCK.BlockSize = size + state.mmu.GetSize();
|
|
||||||
|
|
||||||
state.CPU_MEM_BANK = new List<byte>();
|
|
||||||
// WRITE CPU RAM MEMORY BANK
|
|
||||||
for (int i = 3; i < 8; i++)
|
|
||||||
{
|
|
||||||
if (state.mmu.CPU_MEM_TYPE[i] != MMU.BANKTYPE_ROM)
|
|
||||||
{
|
|
||||||
state.CPU_MEM_BANK.AddRange(MMU.CPU_MEM_BANK[i].Span(0, 8 * 1024).ToArray());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WRITE VRAM MEMORY(常に4K分すべて書き込む)
|
|
||||||
state.VRAM = new byte[4 * 1024];
|
|
||||||
Array.Copy(MMU.VRAM, state.VRAM, state.VRAM.Length);
|
|
||||||
|
|
||||||
state.CRAM = new List<byte>();
|
|
||||||
// WRITE CRAM MEMORY
|
|
||||||
for (int i = 0; i < 8; i++)
|
|
||||||
{
|
|
||||||
if (MMU.CRAM_USED[i] != 0)
|
|
||||||
{
|
|
||||||
var bytes = new byte[4 * 1024];
|
|
||||||
Array.Copy(MMU.CRAM, 0x1000 * i, bytes, 0, bytes.Length);
|
|
||||||
state.CRAM.AddRange(bytes);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// MMC STATE
|
|
||||||
{
|
|
||||||
state.mmc = MMCSTAT.GetDefault();
|
|
||||||
|
|
||||||
// Create Header
|
|
||||||
state.mmcBLOCK.ID = "MMC DATA";
|
|
||||||
state.mmcBLOCK.BlockVersion = 0x0100;
|
|
||||||
state.mmcBLOCK.BlockSize = state.mmc.GetSize();
|
|
||||||
|
|
||||||
if (mapper.IsStateSave())
|
|
||||||
{
|
|
||||||
mapper.SaveState(state.mmc.mmcdata);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//CONTROLLER STATE
|
|
||||||
{
|
|
||||||
// Create Header
|
|
||||||
state.ctrBLOCK.ID = "CTR DATA";
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
//SND STATE
|
|
||||||
{
|
|
||||||
state.snd = SNDSTAT.GetDefault();
|
|
||||||
|
|
||||||
// Create Header
|
|
||||||
state.sndBLOCK.ID = "SND DATA";
|
|
||||||
state.sndBLOCK.BlockVersion = 0x0100;
|
|
||||||
state.sndBLOCK.BlockSize = state.snd.GetSize();
|
|
||||||
|
|
||||||
StateBuffer buffer = new StateBuffer();
|
|
||||||
apu.SaveState(buffer);
|
|
||||||
Array.Copy(buffer.Data.ToArray(), state.snd.snddata, buffer.Data.Count);
|
|
||||||
}
|
|
||||||
|
|
||||||
// DISKIMAGE STATE
|
|
||||||
if (rom.GetMapperNo() == 20)
|
|
||||||
{
|
|
||||||
var lpDisk = rom.GetPROM();
|
|
||||||
var lpWrite = rom.GetDISK();
|
|
||||||
int DiskSize = 16 + 65500 * rom.GetDiskNo();
|
|
||||||
|
|
||||||
|
|
||||||
// 相違数をカウント
|
|
||||||
for (int i = 16; i < DiskSize; i++)
|
|
||||||
{
|
|
||||||
if (lpWrite[i] != 0)
|
|
||||||
state.dsk.DifferentSize++;
|
|
||||||
}
|
|
||||||
|
|
||||||
state.dskBLOCK.ID = "DISKDATA";
|
|
||||||
state.dskBLOCK.BlockVersion = 0x0210;
|
|
||||||
state.dskBLOCK.BlockSize = 0;
|
|
||||||
|
|
||||||
for (int i = 16; i < DiskSize; i++)
|
|
||||||
{
|
|
||||||
if (lpWrite[i] != 0)
|
|
||||||
{
|
|
||||||
state.dskdata = (uint)(i & 0x00FFFFFF);
|
|
||||||
state.dskdata |= ((uint)lpDisk[i] & 0xFF) << 24;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// EXCTR STATE
|
|
||||||
if (pad.GetExController() != 0)
|
|
||||||
{
|
|
||||||
state.exctrBLOCK.ID = "EXCTRDAT";
|
|
||||||
state.exctrBLOCK.BlockVersion = 0x0100;
|
|
||||||
state.exctrBLOCK.BlockSize = state.exctr.GetSize();
|
|
||||||
|
|
||||||
// Some excontrollers will default 0
|
|
||||||
state.exctr.data = pad.GetSyncExData();
|
|
||||||
}
|
|
||||||
|
|
||||||
return state;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void LoadState(State state)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum IRQMETHOD
|
public enum IRQMETHOD
|
||||||
{
|
{
|
||||||
IRQ_HSYNC = 0, IRQ_CLOCK = 1
|
IRQ_HSYNC = 0, IRQ_CLOCK = 1
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
using Codice.CM.Client.Differences;
|
using System.Collections.Generic;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace VirtualNes.Core
|
namespace VirtualNes.Core
|
||||||
{
|
{
|
||||||
@ -509,68 +507,6 @@ namespace VirtualNes.Core
|
|||||||
{
|
{
|
||||||
return excontroller_select;
|
return excontroller_select;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal bool GetStrobe()
|
|
||||||
{
|
|
||||||
return bStrobe;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal uint GetSyncExData()
|
|
||||||
{
|
|
||||||
uint data = 0;
|
|
||||||
|
|
||||||
switch ((EXCONTROLLER)excontroller_select)
|
|
||||||
{
|
|
||||||
case EXCONTROLLER.EXCONTROLLER_ZAPPER:
|
|
||||||
case EXCONTROLLER.EXCONTROLLER_PADDLE:
|
|
||||||
case EXCONTROLLER.EXCONTROLLER_SPACESHADOWGUN:
|
|
||||||
case EXCONTROLLER.EXCONTROLLER_OEKAKIDS_TABLET:
|
|
||||||
case EXCONTROLLER.EXCONTROLLER_VSZAPPER:
|
|
||||||
{
|
|
||||||
int x, y;
|
|
||||||
x = expad.GetSyncData(0);
|
|
||||||
y = expad.GetSyncData(1);
|
|
||||||
if (x == -1 || y == -1)
|
|
||||||
{
|
|
||||||
data = 0x80000000;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
data = (uint)((x & 0xFF) | ((y & 0xFF) << 8));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (excontroller_select != (int)EXCONTROLLER.EXCONTROLLER_SPACESHADOWGUN)
|
|
||||||
{
|
|
||||||
if (expad.GetSyncData(2) != 0)
|
|
||||||
data |= 0x0010000;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
data |= (uint)(expad.GetSyncData(2) << 16);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case EXCONTROLLER.EXCONTROLLER_CRAZYCLIMBER:
|
|
||||||
data = (uint)expad.GetSyncData(0);
|
|
||||||
break;
|
|
||||||
case EXCONTROLLER.EXCONTROLLER_TOPRIDER:
|
|
||||||
data = (uint)expad.GetSyncData(0);
|
|
||||||
break;
|
|
||||||
case EXCONTROLLER.EXCONTROLLER_FAMILYTRAINER_A:
|
|
||||||
case EXCONTROLLER.EXCONTROLLER_FAMILYTRAINER_B:
|
|
||||||
data = (uint)expad.GetSyncData(0);
|
|
||||||
break;
|
|
||||||
case EXCONTROLLER.EXCONTROLLER_EXCITINGBOXING:
|
|
||||||
data = (uint)expad.GetSyncData(0);
|
|
||||||
break;
|
|
||||||
case EXCONTROLLER.EXCONTROLLER_MAHJANG:
|
|
||||||
data = (uint)expad.GetSyncData(0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum VSType
|
public enum VSType
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 915f7790a5c8e34469efbee412b66d3a
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,23 +0,0 @@
|
|||||||
namespace VirtualNes.Core
|
|
||||||
{
|
|
||||||
public struct BLOCKHDR : IStateBufferObject
|
|
||||||
{
|
|
||||||
public string ID;
|
|
||||||
public ushort Reserved;
|
|
||||||
public ushort BlockVersion;
|
|
||||||
public uint BlockSize;
|
|
||||||
|
|
||||||
public readonly void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(ID);
|
|
||||||
buffer.Write(Reserved);
|
|
||||||
buffer.Write(BlockVersion);
|
|
||||||
buffer.Write(BlockSize);
|
|
||||||
}
|
|
||||||
|
|
||||||
public readonly uint GetSize()
|
|
||||||
{
|
|
||||||
return (uint)(ID.Length + sizeof(ushort) + sizeof(ushort) + sizeof(uint));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 4c00b92c189cbc841a1f8e26749ba6df
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,28 +0,0 @@
|
|||||||
using Codice.CM.Client.Differences;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace VirtualNes.Core
|
|
||||||
{
|
|
||||||
public struct CTRSTAT : IStateBufferObject
|
|
||||||
{
|
|
||||||
public uint pad1bit;
|
|
||||||
public uint pad2bit;
|
|
||||||
public uint pad3bit;
|
|
||||||
public uint pad4bit;
|
|
||||||
public byte strobe;
|
|
||||||
|
|
||||||
public readonly uint GetSize()
|
|
||||||
{
|
|
||||||
return sizeof(uint) * 4 + sizeof(byte);
|
|
||||||
}
|
|
||||||
|
|
||||||
public readonly void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(pad1bit);
|
|
||||||
buffer.Write(pad2bit);
|
|
||||||
buffer.Write(pad3bit);
|
|
||||||
buffer.Write(pad4bit);
|
|
||||||
buffer.Write(strobe);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: be39d1ba53756fc4fa9cbdc7d7fc34a2
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,17 +0,0 @@
|
|||||||
namespace VirtualNes.Core
|
|
||||||
{
|
|
||||||
public struct DISKDATA : IStateBufferObject
|
|
||||||
{
|
|
||||||
public int DifferentSize;
|
|
||||||
|
|
||||||
public uint GetSize()
|
|
||||||
{
|
|
||||||
return sizeof(int);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(DifferentSize);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: f364c4c9681ea6b4fad0c68f42f9b230
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,17 +0,0 @@
|
|||||||
namespace VirtualNes.Core
|
|
||||||
{
|
|
||||||
public struct EXCTRSTAT : IStateBufferObject
|
|
||||||
{
|
|
||||||
public uint data;
|
|
||||||
|
|
||||||
public readonly uint GetSize()
|
|
||||||
{
|
|
||||||
return sizeof(uint);
|
|
||||||
}
|
|
||||||
|
|
||||||
public readonly void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: ed6b363609705fd41a70255c4bbc7dd2
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,33 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace VirtualNes.Core
|
|
||||||
{
|
|
||||||
public struct FILEHDR2 : IStateBufferObject
|
|
||||||
{
|
|
||||||
public string ID;
|
|
||||||
/// <summary> 2字节 </summary>
|
|
||||||
public ushort BlockVersion;
|
|
||||||
/// <summary> 4字节 </summary>
|
|
||||||
public uint Ext0;
|
|
||||||
/// <summary> 2字节 </summary>
|
|
||||||
public ushort Ext1;
|
|
||||||
/// <summary> 2字节 </summary>
|
|
||||||
public ushort Ext2;
|
|
||||||
|
|
||||||
public readonly void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(ID);
|
|
||||||
buffer.Write(BlockVersion);
|
|
||||||
buffer.Write(Ext0);
|
|
||||||
buffer.Write(Ext1);
|
|
||||||
buffer.Write(Ext2);
|
|
||||||
}
|
|
||||||
|
|
||||||
public readonly uint GetSize()
|
|
||||||
{
|
|
||||||
return (uint)(ID.Length + sizeof(ushort) + sizeof(uint) + sizeof(ushort) + sizeof(ushort));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 86729820f1e0c0d4cbd58955e1238fd6
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,22 +0,0 @@
|
|||||||
namespace VirtualNes.Core
|
|
||||||
{
|
|
||||||
public struct MMCSTAT : IStateBufferObject
|
|
||||||
{
|
|
||||||
public byte[] mmcdata;
|
|
||||||
|
|
||||||
public static MMCSTAT GetDefault()
|
|
||||||
{
|
|
||||||
return new MMCSTAT() { mmcdata = new byte[256] };
|
|
||||||
}
|
|
||||||
|
|
||||||
public uint GetSize()
|
|
||||||
{
|
|
||||||
return (uint)mmcdata.Length;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(mmcdata);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 61532b9db0674494099449267f13b2c5
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,38 +0,0 @@
|
|||||||
namespace VirtualNes.Core
|
|
||||||
{
|
|
||||||
public struct MMUSTAT : IStateBufferObject
|
|
||||||
{
|
|
||||||
public byte[] CPU_MEM_TYPE;
|
|
||||||
public ushort[] CPU_MEM_PAGE;
|
|
||||||
public byte[] PPU_MEM_TYPE;
|
|
||||||
public ushort[] PPU_MEM_PAGE;
|
|
||||||
public byte[] CRAM_USED;
|
|
||||||
|
|
||||||
public static MMUSTAT GetDefault()
|
|
||||||
{
|
|
||||||
var res = new MMUSTAT();
|
|
||||||
|
|
||||||
res.CPU_MEM_TYPE = new byte[8];
|
|
||||||
res.CPU_MEM_PAGE = new ushort[8];
|
|
||||||
res.PPU_MEM_TYPE = new byte[12];
|
|
||||||
res.PPU_MEM_PAGE = new ushort[12];
|
|
||||||
res.CRAM_USED = new byte[8];
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
public uint GetSize()
|
|
||||||
{
|
|
||||||
return (uint)(CPU_MEM_TYPE.Length + CPU_MEM_PAGE.Length + PPU_MEM_TYPE.Length + PPU_MEM_PAGE.Length + CRAM_USED.Length);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(CPU_MEM_TYPE);
|
|
||||||
buffer.Write(CPU_MEM_PAGE);
|
|
||||||
buffer.Write(PPU_MEM_TYPE);
|
|
||||||
buffer.Write(PPU_MEM_PAGE);
|
|
||||||
buffer.Write(CRAM_USED);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: bae9e1d800e0de741b04ec6979bc086f
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,38 +0,0 @@
|
|||||||
|
|
||||||
namespace VirtualNes.Core
|
|
||||||
{
|
|
||||||
public struct RAMSTAT : IStateBufferObject
|
|
||||||
{
|
|
||||||
/// <summary> Internal NES RAM </summary>
|
|
||||||
public byte[] RAM;
|
|
||||||
/// <summary> BG Palette </summary>
|
|
||||||
public byte[] BGPAL;
|
|
||||||
/// <summary> SP Palette </summary>
|
|
||||||
public byte[] SPPAL;
|
|
||||||
/// <summary> Sprite RAM </summary>
|
|
||||||
public byte[] SPRAM;
|
|
||||||
|
|
||||||
public static RAMSTAT GetDefault()
|
|
||||||
{
|
|
||||||
var res = new RAMSTAT();
|
|
||||||
res.RAM = new byte[2 * 1024];
|
|
||||||
res.BGPAL = new byte[16];
|
|
||||||
res.SPPAL = new byte[16];
|
|
||||||
res.SPRAM = new byte[256];
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
public readonly uint GetSize()
|
|
||||||
{
|
|
||||||
return (uint)(RAM.Length + BGPAL.Length + SPPAL.Length + SPRAM.Length);
|
|
||||||
}
|
|
||||||
|
|
||||||
public readonly void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(RAM);
|
|
||||||
buffer.Write(BGPAL);
|
|
||||||
buffer.Write(SPPAL);
|
|
||||||
buffer.Write(SPRAM);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 1acd6e5360be08b4e88b477d7983aa1d
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,96 +0,0 @@
|
|||||||
namespace VirtualNes.Core
|
|
||||||
{
|
|
||||||
public struct REGSTAT : IStateBufferObject
|
|
||||||
{
|
|
||||||
public CPUSTAT cpureg;
|
|
||||||
public PPUSTAT ppureg;
|
|
||||||
|
|
||||||
public void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
cpureg.SaveState(buffer);
|
|
||||||
ppureg.SaveState(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
public uint GetSize()
|
|
||||||
{
|
|
||||||
return cpureg.GetSize() + ppureg.GetSize();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public struct CPUSTAT : IStateBufferObject
|
|
||||||
{
|
|
||||||
public ushort PC;
|
|
||||||
public byte A;
|
|
||||||
public byte X;
|
|
||||||
public byte Y;
|
|
||||||
public byte S;
|
|
||||||
public byte P;
|
|
||||||
public byte I; // Interrupt pending flag
|
|
||||||
|
|
||||||
public byte FrameIRQ;
|
|
||||||
public byte FrameIRQ_occur;
|
|
||||||
public byte FrameIRQ_count;
|
|
||||||
public byte FrameIRQ_type;
|
|
||||||
public int FrameIRQ_cycles;
|
|
||||||
public int DMA_cycles;
|
|
||||||
|
|
||||||
public long emul_cycles;
|
|
||||||
public long base_cycles;
|
|
||||||
|
|
||||||
public readonly uint GetSize()
|
|
||||||
{
|
|
||||||
return 32;
|
|
||||||
}
|
|
||||||
|
|
||||||
public readonly void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(PC);
|
|
||||||
buffer.Write(A);
|
|
||||||
buffer.Write(X);
|
|
||||||
buffer.Write(Y);
|
|
||||||
buffer.Write(S);
|
|
||||||
buffer.Write(P);
|
|
||||||
buffer.Write(I);
|
|
||||||
buffer.Write(FrameIRQ);
|
|
||||||
buffer.Write(FrameIRQ_occur);
|
|
||||||
buffer.Write(FrameIRQ_count);
|
|
||||||
buffer.Write(FrameIRQ_type);
|
|
||||||
buffer.Write(FrameIRQ_cycles);
|
|
||||||
buffer.Write(DMA_cycles);
|
|
||||||
buffer.Write(emul_cycles);
|
|
||||||
buffer.Write(base_cycles);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public struct PPUSTAT : IStateBufferObject
|
|
||||||
{
|
|
||||||
public byte reg0;
|
|
||||||
public byte reg1;
|
|
||||||
public byte reg2;
|
|
||||||
public byte reg3;
|
|
||||||
public byte reg7;
|
|
||||||
public byte toggle56;
|
|
||||||
|
|
||||||
public ushort loopy_t;
|
|
||||||
public ushort loopy_v;
|
|
||||||
public ushort loopy_x;
|
|
||||||
|
|
||||||
public readonly uint GetSize()
|
|
||||||
{
|
|
||||||
return 12;
|
|
||||||
}
|
|
||||||
|
|
||||||
public readonly void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(reg0);
|
|
||||||
buffer.Write(reg1);
|
|
||||||
buffer.Write(reg2);
|
|
||||||
buffer.Write(reg3);
|
|
||||||
buffer.Write(reg7);
|
|
||||||
buffer.Write(toggle56);
|
|
||||||
buffer.Write(loopy_t);
|
|
||||||
buffer.Write(loopy_v);
|
|
||||||
buffer.Write(loopy_x);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 1350a5cfb70265848b3af2a05a2709eb
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,28 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace VirtualNes.Core
|
|
||||||
{
|
|
||||||
public struct SNDSTAT : IStateBufferObject
|
|
||||||
{
|
|
||||||
public byte[] snddata;
|
|
||||||
|
|
||||||
public static SNDSTAT GetDefault()
|
|
||||||
{
|
|
||||||
return new SNDSTAT() { snddata = new byte[0x800] };
|
|
||||||
}
|
|
||||||
|
|
||||||
public uint GetSize()
|
|
||||||
{
|
|
||||||
return (uint)snddata.Length;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SaveState(StateBuffer buffer)
|
|
||||||
{
|
|
||||||
buffer.Write(snddata);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 1906102fbfecacf4a988a89e6d373c10
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,78 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace VirtualNes.Core
|
|
||||||
{
|
|
||||||
public struct State
|
|
||||||
{
|
|
||||||
public FILEHDR2 HEADER;
|
|
||||||
|
|
||||||
public BLOCKHDR regBLOCK;
|
|
||||||
public REGSTAT reg;
|
|
||||||
|
|
||||||
public BLOCKHDR ramBLOCK;
|
|
||||||
public RAMSTAT ram;
|
|
||||||
/// <summary> Maybe null cause by rom IsSaveRAM() </summary>
|
|
||||||
public byte[] WRAM;
|
|
||||||
|
|
||||||
public BLOCKHDR mmuBLOCK;
|
|
||||||
public MMUSTAT mmu;
|
|
||||||
public List<byte> CPU_MEM_BANK;
|
|
||||||
public byte[] VRAM;
|
|
||||||
public List<byte> CRAM;
|
|
||||||
|
|
||||||
public BLOCKHDR mmcBLOCK;
|
|
||||||
public MMCSTAT mmc;
|
|
||||||
|
|
||||||
public BLOCKHDR ctrBLOCK;
|
|
||||||
public CTRSTAT ctr;
|
|
||||||
|
|
||||||
public BLOCKHDR sndBLOCK;
|
|
||||||
public SNDSTAT snd;
|
|
||||||
|
|
||||||
public BLOCKHDR dskBLOCK;
|
|
||||||
public DISKDATA dsk;
|
|
||||||
public uint dskdata;
|
|
||||||
|
|
||||||
public BLOCKHDR exctrBLOCK;
|
|
||||||
public EXCTRSTAT exctr;
|
|
||||||
|
|
||||||
public readonly byte[] ToBytes()
|
|
||||||
{
|
|
||||||
StateBuffer buffer = new StateBuffer();
|
|
||||||
|
|
||||||
HEADER.SaveState(buffer);
|
|
||||||
|
|
||||||
regBLOCK.SaveState(buffer);
|
|
||||||
reg.SaveState(buffer);
|
|
||||||
|
|
||||||
ramBLOCK.SaveState(buffer);
|
|
||||||
ram.SaveState(buffer);
|
|
||||||
|
|
||||||
if(WRAM!=null) buffer.Write(WRAM);
|
|
||||||
|
|
||||||
mmuBLOCK.SaveState(buffer);
|
|
||||||
mmu.SaveState(buffer);
|
|
||||||
buffer.Write(CPU_MEM_BANK.ToArray());
|
|
||||||
buffer.Write(VRAM);
|
|
||||||
buffer.Write(CRAM.ToArray());
|
|
||||||
|
|
||||||
mmcBLOCK.SaveState(buffer);
|
|
||||||
mmc.SaveState(buffer);
|
|
||||||
|
|
||||||
ctrBLOCK.SaveState(buffer);
|
|
||||||
ctr.SaveState(buffer);
|
|
||||||
|
|
||||||
sndBLOCK.SaveState(buffer);
|
|
||||||
snd.SaveState(buffer);
|
|
||||||
|
|
||||||
dskBLOCK.SaveState(buffer);
|
|
||||||
dsk.SaveState(buffer);
|
|
||||||
buffer.Write(dskdata);
|
|
||||||
|
|
||||||
exctrBLOCK.SaveState(buffer);
|
|
||||||
exctr.SaveState(buffer);
|
|
||||||
|
|
||||||
return buffer.Data.ToArray();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: b685425b0082cf246bf59e849aef0d0b
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,88 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace VirtualNes.Core
|
|
||||||
{
|
|
||||||
public class StateBuffer
|
|
||||||
{
|
|
||||||
public List<byte> Data = new List<byte>();
|
|
||||||
|
|
||||||
public long Position
|
|
||||||
{
|
|
||||||
get => Data.Count - 1;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
var gap = value - Position;
|
|
||||||
if (gap > 0)
|
|
||||||
{
|
|
||||||
Data.AddRange(new byte[gap]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Data.RemoveRange((int)Position, (int)gap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Write(byte[] bytes)
|
|
||||||
{
|
|
||||||
Data.AddRange(bytes);
|
|
||||||
}
|
|
||||||
public void Write(sbyte[] sbytes)
|
|
||||||
{
|
|
||||||
foreach(var value in sbytes)
|
|
||||||
{
|
|
||||||
Write(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public void Write(byte[] bytes, int length)
|
|
||||||
{
|
|
||||||
Data.AddRange(bytes);
|
|
||||||
}
|
|
||||||
public void Write(byte value)
|
|
||||||
{
|
|
||||||
Data.Add(value);
|
|
||||||
}
|
|
||||||
public void Write(ushort[] values)
|
|
||||||
{
|
|
||||||
foreach (var value in values)
|
|
||||||
Write(value);
|
|
||||||
}
|
|
||||||
public void Write(int[] values)
|
|
||||||
{
|
|
||||||
foreach (var value in values)
|
|
||||||
Write(value);
|
|
||||||
}
|
|
||||||
public void Write(string value)
|
|
||||||
{
|
|
||||||
Write(Encoding.ASCII.GetBytes(value));
|
|
||||||
}
|
|
||||||
public void Write(double value)
|
|
||||||
{
|
|
||||||
Write(BitConverter.GetBytes(value));
|
|
||||||
}
|
|
||||||
public void Write(ushort value)
|
|
||||||
{
|
|
||||||
Write(BitConverter.GetBytes(value));
|
|
||||||
}
|
|
||||||
public void Write(int value)
|
|
||||||
{
|
|
||||||
Write(BitConverter.GetBytes(value));
|
|
||||||
}
|
|
||||||
public void Write(sbyte value)
|
|
||||||
{
|
|
||||||
Write(value);
|
|
||||||
}
|
|
||||||
public void Write(long value)
|
|
||||||
{
|
|
||||||
Write(BitConverter.GetBytes(value));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IStateBufferObject
|
|
||||||
{
|
|
||||||
uint GetSize();
|
|
||||||
void SaveState(StateBuffer buffer);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: f215860b2526aa04a819da176e190437
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.2d.sprite": "1.0.0",
|
|
||||||
"com.unity.collab-proxy": "1.15.15",
|
"com.unity.collab-proxy": "1.15.15",
|
||||||
"com.unity.editorcoroutines": "1.0.0",
|
"com.unity.editorcoroutines": "1.0.0",
|
||||||
"com.unity.ide.rider": "3.0.13",
|
"com.unity.ide.rider": "3.0.13",
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.2d.sprite": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"depth": 0,
|
|
||||||
"source": "builtin",
|
|
||||||
"dependencies": {}
|
|
||||||
},
|
|
||||||
"com.unity.collab-proxy": {
|
"com.unity.collab-proxy": {
|
||||||
"version": "1.15.15",
|
"version": "1.15.15",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
|
@ -5,9 +5,6 @@ EditorBuildSettings:
|
|||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Scenes:
|
m_Scenes:
|
||||||
- enabled: 1
|
|
||||||
path: Assets/Scene/AxibugEmuOnline.Client.unity
|
|
||||||
guid: eb0c18a619175384d95147898a43054b
|
|
||||||
- enabled: 1
|
- enabled: 1
|
||||||
path: Assets/Scene/EmuTest.unity
|
path: Assets/Scene/EmuTest.unity
|
||||||
guid: 3dba71db67877594a9b5b77059205ec8
|
guid: 3dba71db67877594a9b5b77059205ec8
|
||||||
|
@ -642,7 +642,7 @@ PlayerSettings:
|
|||||||
scriptingDefineSymbols:
|
scriptingDefineSymbols:
|
||||||
1: DOTWEEN
|
1: DOTWEEN
|
||||||
4: DOTWEEN
|
4: DOTWEEN
|
||||||
7: DOTWEEN;ODIN_INSPECTOR;ODIN_INSPECTOR_3;ODIN_INSPECTOR_3_1;ODIN_INSPECTOR_EDITOR_ONLY
|
7: DOTWEEN
|
||||||
13: DOTWEEN
|
13: DOTWEEN
|
||||||
14: DOTWEEN
|
14: DOTWEEN
|
||||||
19: DOTWEEN
|
19: DOTWEEN
|
||||||
@ -658,7 +658,7 @@ PlayerSettings:
|
|||||||
additionalCompilerArguments: {}
|
additionalCompilerArguments: {}
|
||||||
platformArchitecture: {}
|
platformArchitecture: {}
|
||||||
scriptingBackend:
|
scriptingBackend:
|
||||||
Android: 0
|
Android: 1
|
||||||
Standalone: 1
|
Standalone: 1
|
||||||
il2cppCompilerConfiguration: {}
|
il2cppCompilerConfiguration: {}
|
||||||
managedStrippingLevel: {}
|
managedStrippingLevel: {}
|
||||||
|
Loading…
Reference in New Issue
Block a user