master #57

Merged
sin365 merged 11 commits from Alienjack/AxibugEmuOnline:master into master 2024-11-28 10:13:53 +08:00
68 changed files with 5606 additions and 818 deletions

6
.gitignore vendored
View File

@ -13,7 +13,5 @@
/AxibugEmuOnline.Client/ProjectSettings/ProjectVersion.txt
/AxibugEmuOnline.Client/ProjectSettings/AutoStreamingSettings.asset
/AxibugEmuOnline.Client/Logs
/virtuanessrc097-master/save
/virtuanessrc097-master/.vs
/virtuanessrc097-master/Debug
/virtuanessrc097-master/VirtuaNES.ini
/virtuanessrc097-master

View File

@ -458,6 +458,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 39557e19783acee499ace6c68549e8f8, type: 3}
m_Name:
m_EditorClassIdentifier:
InputTemplate: {fileID: 0}
VideoProvider: {fileID: 4232056520112715744}
AudioProvider: {fileID: 9003897287163669553}
m_bPause: 0

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3ecc1c637c161184099b69c3d7a0f354
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,822 @@
%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: 3
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: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: DESCRIBTIONDESCRIBTIONDESCRIBTIONDESCRIBTIONDESCRIBTIONDESCRIBTIONDESCRIBTIONDESCRIBTIONDESCRIBTIONDESCRIBTIONDESCRIBTION
--- !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.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0, 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: 21300000, guid: 8706af46c93329b4da3c86c0b13b886e, type: 3}
m_Type: 0
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: 2}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 8754483333502849411}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -200, y: 0}
m_SizeDelta: {x: -396, 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: 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: 8706af46c93329b4da3c86c0b13b886e, type: 3}
m_Type: 0
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: 5700455559359757662}
- component: {fileID: 1719219194513122235}
m_Layer: 5
m_Name: FilterItemTemplate
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: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !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!114 &1719219194513122235
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: 267dda362a6090d42b48e3cced57ae9c, type: 3}
m_Name:
m_EditorClassIdentifier:
Icon: {fileID: 6771349210554360888}
Txt: {fileID: 991446423622995247}
SubTitle: {fileID: 6534898873012636952}
spline: {fileID: 4812759387377418448}
Descript: {fileID: 3380485461544738227}
Root: {fileID: 8754483333502849411}
ShadowIcon: {fileID: 2619187604372594158}
InfoNode: {fileID: 6788248266412682264}
SubMenuItemGroup: {fileID: 0}
SelectScale: 1
UnSelectScale: 0.85
--- !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: 6797116381500671839}
- {fileID: 6673031368290035463}
- {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: 0, y: 1}
m_AnchoredPosition: {x: 100, y: 0}
m_SizeDelta: {x: 600, 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: 13
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: 0
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 0
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 &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}
- component: {fileID: 8545526122445709124}
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:
- {fileID: 8986746042327041630}
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: 30
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: NAME
--- !u!114 &8545526122445709124
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: e19747de3f5aca642ab2be37e372fb86, type: 3}
m_Name:
m_EditorClassIdentifier:
m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5}
m_EffectDistance: {x: 1.5, y: 1.5}
m_UseGraphicAlpha: 1
--- !u!1 &5468696000904882177
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8986746042327041630}
- component: {fileID: 952406696262539679}
- component: {fileID: 6534898873012636952}
m_Layer: 5
m_Name: subTitle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8986746042327041630
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5468696000904882177}
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: 6095356919362338847}
m_RootOrder: 0
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: 0, y: 0}
m_SizeDelta: {x: 580, y: 33}
m_Pivot: {x: 1, y: 0.5}
--- !u!222 &952406696262539679
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5468696000904882177}
m_CullTransparentMesh: 1
--- !u!114 &6534898873012636952
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5468696000904882177}
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: 25
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 300
m_Alignment: 5
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: 4324234
--- !u!1 &6688216270065609628
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6797116381500671839}
- component: {fileID: 5682159953164052307}
- component: {fileID: 4812759387377418448}
m_Layer: 5
m_Name: spline
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6797116381500671839
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6688216270065609628}
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: 4}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5682159953164052307
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6688216270065609628}
m_CullTransparentMesh: 1
--- !u!114 &4812759387377418448
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6688216270065609628}
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 &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: 6087025893861054323}
- {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}
--- !u!1 &9036340599819825964
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6673031368290035463}
m_Layer: 5
m_Name: space
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6673031368290035463
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9036340599819825964}
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: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 10}
m_Pivot: {x: 0.5, y: 0.5}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 52fd21b2efaed0c4fa5229087906809a
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,182 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 12
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 256
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 1
m_PVRDenoiserTypeDirect: 1
m_PVRDenoiserTypeIndirect: 1
m_PVRDenoiserTypeAO: 1
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_LightingSettings: {fileID: 0}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1001 &4232056520998800727
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4232056521131536013, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
propertyPath: m_Name
value: NesEmulator
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}

View File

@ -1,38 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!84 &8400000
RenderTexture:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: New Render Texture
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_IsAlphaChannelOptional: 0
serializedVersion: 3
m_Width: 256
m_Height: 240
m_AntiAliasing: 1
m_MipCount: -1
m_DepthFormat: 0
m_ColorFormat: 8
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_BindMS: 0
m_EnableCompatibleFormat: 1
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 0
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1

View File

@ -5,7 +5,7 @@ using System.IO;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.Scripting;
using UnityEngine.Rendering.PostProcessing;
using static AxibugEmuOnline.Client.HttpAPI;
using static AxibugEmuOnline.Client.Manager.LogManager;
@ -28,6 +28,7 @@ namespace AxibugEmuOnline.Client.ClientCore
public static CacheManager CacheMgr;
public static AppRoom roomMgr;
public static AppSettings settings;
public static FilterManager filter;
#region Mono
public static TickLoop tickLoop;
private static CoroutineRunner coRunner;
@ -38,12 +39,7 @@ namespace AxibugEmuOnline.Client.ClientCore
#else
public static string PersistentDataPath => Application.persistentDataPath;
#endif
//[Preserve]
//[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterAssembliesLoaded)]
public static void Init()
public static void Init(Initer initer)
{
settings = new AppSettings();
@ -59,6 +55,7 @@ namespace AxibugEmuOnline.Client.ClientCore
nesRomLib = new RomLib(EnumPlatform.NES);
CacheMgr = new CacheManager();
roomMgr = new AppRoom();
filter = new FilterManager(initer.m_filterVolume, initer.m_filterPreview,initer.m_xmbBg);
var go = new GameObject("[AppAxibugEmuOnline]");
GameObject.DontDestroyOnLoad(go);
tickLoop = go.AddComponent<TickLoop>();
@ -162,7 +159,7 @@ namespace AxibugEmuOnline.Client.ClientCore
}
static void OnNoSugarNetLog(int LogLevel, string msg)
{
E_LogType logType =(E_LogType)LogLevel;
E_LogType logType = (E_LogType)LogLevel;
switch (logType)
{
case E_LogType.Debug:

View File

@ -4,7 +4,9 @@
"references": [
"GUID:390a2c4058e5c304a87e8be70c84d80b",
"GUID:085dc26d74e6f994a924d401ea41a5a8",
"GUID:0a45db2096af23647aaafe5b70ccb4d7"
"GUID:0a45db2096af23647aaafe5b70ccb4d7",
"GUID:75469ad4d38634e559750d17036d5f7c",
"GUID:d60799ab2a985554ea1a39cd38695018"
],
"includePlatforms": [],
"excludePlatforms": [],

View File

@ -1,65 +0,0 @@
using System.Collections.Generic;
using UnityEngine;
namespace AxibugEmuOnline.Client
{
public abstract class ControlScheme
{
private static ControlScheme m_current;
public static ControlScheme Current
{
get => m_current;
set
{
m_current = value;
Dictionary<KeyCode, EnumCommand> mapper = new Dictionary<KeyCode, EnumCommand>();
m_current.SetUIKeys(mapper);
CommandDispatcher.Instance.SetKeyMapper(mapper);
}
}
public string Name { get; private set; }
public virtual void SetUIKeys(Dictionary<KeyCode, EnumCommand> uiKeyMapper)
{
uiKeyMapper[KeyCode.A] = EnumCommand.SelectItemLeft;
uiKeyMapper[KeyCode.D] = EnumCommand.SelectItemRight;
uiKeyMapper[KeyCode.W] = EnumCommand.SelectItemUp;
uiKeyMapper[KeyCode.S] = EnumCommand.SelectItemDown;
uiKeyMapper[KeyCode.K] = EnumCommand.Enter;
uiKeyMapper[KeyCode.L] = EnumCommand.Back;
uiKeyMapper[KeyCode.I] = EnumCommand.OptionMenu;
uiKeyMapper[KeyCode.LeftArrow] = EnumCommand.SelectItemLeft;
uiKeyMapper[KeyCode.RightArrow] = EnumCommand.SelectItemRight;
uiKeyMapper[KeyCode.UpArrow] = EnumCommand.SelectItemUp;
uiKeyMapper[KeyCode.DownArrow] = EnumCommand.SelectItemDown;
uiKeyMapper[KeyCode.Return] = EnumCommand.Enter;
uiKeyMapper[KeyCode.Escape] = EnumCommand.Back;
uiKeyMapper[KeyCode.RightShift] = EnumCommand.OptionMenu;
uiKeyMapper[KeyCode.LeftShift] = EnumCommand.OptionMenu;
if (Application.platform == RuntimePlatform.PSP2)
{
uiKeyMapper[Common.PSVitaKey.Left] = EnumCommand.SelectItemLeft;
uiKeyMapper[Common.PSVitaKey.Right] = EnumCommand.SelectItemRight;
uiKeyMapper[Common.PSVitaKey.Up] = EnumCommand.SelectItemUp;
uiKeyMapper[Common.PSVitaKey.Down] = EnumCommand.SelectItemDown;
uiKeyMapper[Common.PSVitaKey.Circle] = EnumCommand.Enter;
uiKeyMapper[Common.PSVitaKey.Cross] = EnumCommand.Back;
uiKeyMapper[Common.PSVitaKey.Triangle] = EnumCommand.OptionMenu;
}
//PC XBOX
//uiKeyMapper[Common.PC_XBOXKEY.Left] = EnumCommand.SelectItemLeft;
//uiKeyMapper[Common.PSVitaKey.Right] = EnumCommand.SelectItemRight;
//uiKeyMapper[Common.PSVitaKey.Up] = EnumCommand.SelectItemUp;
//uiKeyMapper[Common.PSVitaKey.Down] = EnumCommand.SelectItemDown;
uiKeyMapper[Common.PC_XBOXKEY.MenuBtn] = EnumCommand.Enter;
uiKeyMapper[Common.PC_XBOXKEY.ViewBtn] = EnumCommand.Back;
uiKeyMapper[Common.PC_XBOXKEY.Y] = EnumCommand.OptionMenu;
}
}
}

View File

@ -1,27 +0,0 @@
using System.Collections.Generic;
using UnityEngine;
namespace AxibugEmuOnline.Client
{
public class NesGamingScheme : ControlScheme
{
public override void SetUIKeys(Dictionary<KeyCode, EnumCommand> uiKeyMapper)
{
uiKeyMapper[KeyCode.Escape] = EnumCommand.OptionMenu;
if (Application.platform == RuntimePlatform.PSP2)
{
uiKeyMapper[Common.PSVitaKey.L] = EnumCommand.OptionMenu;
uiKeyMapper[Common.PSVitaKey.R] = EnumCommand.OptionMenu;
}
//PC XBOX
uiKeyMapper[Common.PC_XBOXKEY.Y] = EnumCommand.OptionMenu;
}
}
public static partial class ControlSchemeSetts
{
public static NesGamingScheme NES { get; private set; } = new NesGamingScheme();
}
}

View File

@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AxibugEmuOnline.Client
{
public class NormalScheme : ControlScheme
{
}
public static partial class ControlSchemeSetts
{
public static NormalScheme Normal { get; private set; } = new NormalScheme();
}
}

View File

@ -1,5 +1,6 @@
fileFormatVersion: 2
guid: 3dba71db67877594a9b5b77059205ec8
guid: 65f05f831c65bb042a8db3bf301f54ec
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:

View File

@ -0,0 +1,77 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
namespace AxibugEmuOnline.Client
{
public abstract class FilterEffect : PostProcessEffectSettings
{
private List<EditableParamerter> m_editableParamList;
public IReadOnlyCollection<EditableParamerter> EditableParam => m_editableParamList.AsReadOnly();
public abstract string Name { get; }
public FilterEffect()
{
GetEditableFilterParamters();
}
protected void GetEditableFilterParamters()
{
var parameters = (from t in GetType().GetFields(BindingFlags.Instance | BindingFlags.Public)
where t.FieldType.IsSubclassOf(typeof(ParameterOverride))
where t.DeclaringType.IsSubclassOf(typeof(FilterEffect))
orderby t.MetadataToken
select t);
m_editableParamList = parameters.Select(p => new EditableParamerter(p.Name, (ParameterOverride)p.GetValue(this))).ToList();
}
public class EditableParamerter
{
private ParameterOverride m_paramObject;
private FieldInfo valueFieldInfo;
public Type ValueType { get; private set; }
public string Name { get; private set; }
public object Value
{
get => valueFieldInfo.GetValue(m_paramObject);
set
{
valueFieldInfo.SetValue(m_paramObject, value);
}
}
public EditableParamerter(string name, ParameterOverride paramObject)
{
m_paramObject = paramObject;
Name = name;
var paramType = paramObject.GetType();
valueFieldInfo = paramType.GetField("value", BindingFlags.Public | BindingFlags.Instance);
if (valueFieldInfo != null)
{
ValueType = valueFieldInfo.FieldType;
}
else
{
ValueType = typeof(object);
}
}
public string Serilized()
{
return JsonUtility.ToJson(Value);
}
public void Apply(string json)
{
var overrideValue = JsonUtility.FromJson(json, ValueType);
Value = overrideValue;
}
}
}
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a90914c97f6349a4e96302cc0ceeeed0
guid: c4df899ccb7155d44be59fbc5289cedd
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@ -0,0 +1,108 @@
using AxibugEmuOnline.Client;
using AxibugEmuOnline.Client.ClientCore;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
[System.Serializable]
[PostProcess(typeof(FixingPixelArtGrilleRenderer), PostProcessEvent.BeforeStack, "Filter/FixingPixelArtGrille")]
public sealed class FixingPixelArtGrille : FilterEffect
{
public override string Name => nameof(FixingPixelArtGrille);
public ParameterOverride<EnumMaskStyle> MaskStyle = new ParameterOverride<EnumMaskStyle> { value = EnumMaskStyle.ApertureGrille };
[Tooltip("Emulated input resolution\nOptimize for resize")]
public Vector2Parameter DrawResolution = new Vector2Parameter
{
value = new Vector2(272, 240)
};
[Tooltip("Hardness of scanline")]
[Range(-32, 0)]
public FloatParameter HardScan = new FloatParameter { value = -10 };
[Tooltip("Hardness of pixels in scanline")]
[Range(-6, 0)]
public FloatParameter HardPix = new FloatParameter { value = -2 };
[Tooltip("Hardness of short vertical bloom")]
[Range(-8, 0)]
public FloatParameter HardBloomScan = new FloatParameter { value = -4.0f };
[Tooltip("Hardness of short horizontal bloom")]
[Range(-4, 0)]
public FloatParameter HardBloomPix = new FloatParameter { value = -1.5f };
[Tooltip("Amount of small bloom effect")]
[Range(0, 1)]
public FloatParameter BloomAmount = new FloatParameter { value = 1 / 16f };
[Tooltip("Display warp")]
public Vector2Parameter Warp = new Vector2Parameter { value = new Vector2(1f / 64f, 1f / 24f) };
[Tooltip("Amount of shadow mask Light")]
[Range(1, 3)]
public FloatParameter MaskLight = new FloatParameter { value = 1.5f };
[Range(0.1f, 1)]
[Tooltip("Amount of shadow mask Dark")]
public FloatParameter MaskDrak = new FloatParameter { value = 0.5f };
public enum EnumMaskStyle
{
TVStyle,
ApertureGrille,
StretchedVGA,
VGAStyle
}
}
public sealed class FixingPixelArtGrilleRenderer : PostProcessEffectRenderer<FixingPixelArtGrille>
{
private Shader shader;
private Material material;
public override void Init()
{
shader = Shader.Find("PostEffect/FixingPixcelArtGrille");
material = new Material(shader);
}
public override void Render(PostProcessRenderContext context)
{
material.SetVector("_iResolution", new Vector4(Screen.width, Screen.height, 0, 0));
var res = settings.DrawResolution;
material.SetVector("_res", new Vector4(res.value.x, res.value.y, 0, 0));
material.SetFloat("_hardScan", settings.HardScan.value);
material.SetFloat("_hardPix", settings.HardPix.value);
material.SetFloat("_hardBloomScan", settings.HardBloomScan.value);
material.SetFloat("_hardBloomPix", settings.HardBloomPix.value);
material.SetFloat("_bloomAmount", settings.BloomAmount.value);
material.SetVector("_warp", settings.Warp.value);
material.SetFloat("_maskDark", settings.MaskDrak.value);
material.SetFloat("_maskLight", settings.MaskLight.value);
material.DisableKeyword("_MASKSTYLE_VGASTYLE");
material.DisableKeyword("_MASKSTYLE_TVSTYLE");
material.DisableKeyword("_MASKSTYLE_APERTUREGRILLE");
material.DisableKeyword("_MASKSTYLE_STRETCHEDVGA");
switch (settings.MaskStyle.value)
{
case FixingPixelArtGrille.EnumMaskStyle.VGAStyle:
material.EnableKeyword("_MASKSTYLE_VGASTYLE");
break;
case FixingPixelArtGrille.EnumMaskStyle.TVStyle:
material.EnableKeyword("_MASKSTYLE_TVSTYLE");
break;
case FixingPixelArtGrille.EnumMaskStyle.ApertureGrille:
material.EnableKeyword("_MASKSTYLE_APERTUREGRILLE");
break;
case FixingPixelArtGrille.EnumMaskStyle.StretchedVGA:
material.EnableKeyword("_MASKSTYLE_STRETCHEDVGA");
break;
}
context.command.Blit(context.source, context.destination, material);
}
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d43d5934b9afba14782405dc1b6eb455
guid: e88ab71ab1a47d048ba0e45b742f6140
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@ -0,0 +1,293 @@
Shader "PostEffect/FixingPixcelArtGrille"
{
Properties
{
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader
{
Pass
{
CGPROGRAM
#pragma shader_feature_local _MASKSTYLE_TVSTYLE _MASKSTYLE_APERTUREGRILLE _MASKSTYLE_STRETCHEDVGA _MASKSTYLE_VGASTYLE
#pragma vertex vert_img
#pragma fragment frag
#include "UnityCG.cginc"
sampler2D _MainTex;
float4 _MainTex_TexelSize;
//
// PUBLIC DOMAIN CRT STYLED SCAN-LINE SHADER
//
// by Timothy Lottes
//
// This is more along the style of a really good CGA arcade monitor.
// With RGB inputs instead of NTSC.
// The shadow mask example has the mask rotated 90 degrees for less chromatic aberration.
//
// Left it unoptimized to show the theory behind the algorithm.
//
// It is an example what I personally would want as a display option for pixel art games.
// Please take and use, change, or whatever.
//
float2 _iResolution = float2(1920,1080);
// Emulated input resolution.
// Optimize for resize.
float2 _res = float2(272.0,240.0);
// Hardness of scanline.
// -8.0 = soft
// -16.0 = medium
float _hardScan = -10.0;
// Hardness of pixels in scanline.
// -2.0 = soft
// -4.0 = hard
float _hardPix =-2.0;
// Hardness of short vertical bloom.
// -1.0 = wide to the point of clipping (bad)
// -1.5 = wide
// -4.0 = not very wide at all
float _hardBloomScan = -4.0;
// Hardness of short horizontal bloom.
// -0.5 = wide to the point of clipping (bad)
// -1.0 = wide
// -2.0 = not very wide at all
float _hardBloomPix = -1.5;
// Amount of small bloom effect.
// 1.0/1.0 = only bloom
// 1.0/16.0 = what I think is a good amount of small bloom
// 0.0 = no bloom
float _bloomAmount = 1.0/16.0;
// Display warp.
// 0.0 = none
// 1.0/8.0 = extreme
float2 _warp = float2(1.0/64.0,1.0/24.0);
// Amount of shadow mask.
float _maskDark = 0.5;
float _maskLight = 1.5;
//------------------------------------------------------------------------
float fract(float x){
return x-floor(x);
}
// sRGB to Linear.
// Assuing using sRGB typed textures this should not be needed.
float ToLinear1(float c){return(c<=0.04045)?c/12.92:pow((c+0.055)/1.055,2.4);}
float3 ToLinear(float3 c){return float3(ToLinear1(c.r),ToLinear1(c.g),ToLinear1(c.b));}
// Linear to sRGB.
// Assuing using sRGB typed textures this should not be needed.
float ToSrgb1(float c){return(c<0.0031308?c*12.92:1.055*pow(c,0.41666)-0.055);}
float3 ToSrgb(float3 c){return float3(ToSrgb1(c.r),ToSrgb1(c.g),ToSrgb1(c.b));}
float3 Test(float3 c){return c*(1.0/64.0)+c*c*c;}
// Nearest emulated sample given floating point position and texel offset.
// Also zero's off screen.
float3 Fetch( float2 pos,float2 off){
pos=floor(pos*_res+off)/_res;
if(max(abs(pos.x-0.5),abs(pos.y-0.5))>0.5)return float3(0.0,0.0,0.0);
return Test(ToLinear(tex2D(_MainTex,pos.xy).rgb));}
// Distance in emulated pixels to nearest texel.
float2 Dist(float2 pos){pos=pos*_res;return -((pos-floor(pos))-float2(0.5,0.5));}
// 1D Gaussian.
float Gaus(float pos,float scale){return exp2(scale*pos*pos);}
// 3-tap Gaussian filter along horz line.
float3 Horz3(float2 pos,float off){
float3 b=Fetch(pos,float2(-1.0,off));
float3 c=Fetch(pos,float2( 0.0,off));
float3 d=Fetch(pos,float2( 1.0,off));
float dst=Dist(pos).x;
// Convert distance to weight.
float scale=_hardPix;
float wb=Gaus(dst-1.0,scale);
float wc=Gaus(dst+0.0,scale);
float wd=Gaus(dst+1.0,scale);
// Return filtered sample.
return (b*wb+c*wc+d*wd)/(wb+wc+wd);}
// 5-tap Gaussian filter along horz line.
float3 Horz5(float2 pos,float off){
float3 a=Fetch(pos,float2(-2.0,off));
float3 b=Fetch(pos,float2(-1.0,off));
float3 c=Fetch(pos,float2( 0.0,off));
float3 d=Fetch(pos,float2( 1.0,off));
float3 e=Fetch(pos,float2( 2.0,off));
float dst=Dist(pos).x;
// Convert distance to weight.
float scale=_hardPix;
float wa=Gaus(dst-2.0,scale);
float wb=Gaus(dst-1.0,scale);
float wc=Gaus(dst+0.0,scale);
float wd=Gaus(dst+1.0,scale);
float we=Gaus(dst+2.0,scale);
// Return filtered sample.
return (a*wa+b*wb+c*wc+d*wd+e*we)/(wa+wb+wc+wd+we);}
// 7-tap Gaussian filter along horz line.
float3 Horz7(float2 pos,float off){
float3 a=Fetch(pos,float2(-3.0,off));
float3 b=Fetch(pos,float2(-2.0,off));
float3 c=Fetch(pos,float2(-1.0,off));
float3 d=Fetch(pos,float2( 0.0,off));
float3 e=Fetch(pos,float2( 1.0,off));
float3 f=Fetch(pos,float2( 2.0,off));
float3 g=Fetch(pos,float2( 3.0,off));
float dst=Dist(pos).x;
// Convert distance to weight.
float scale=_hardBloomPix;
float wa=Gaus(dst-3.0,scale);
float wb=Gaus(dst-2.0,scale);
float wc=Gaus(dst-1.0,scale);
float wd=Gaus(dst+0.0,scale);
float we=Gaus(dst+1.0,scale);
float wf=Gaus(dst+2.0,scale);
float wg=Gaus(dst+3.0,scale);
// Return filtered sample.
return (a*wa+b*wb+c*wc+d*wd+e*we+f*wf+g*wg)/(wa+wb+wc+wd+we+wf+wg);}
// Return scanline weight.
float Scan(float2 pos,float off){
float dst=Dist(pos).y;
return Gaus(dst+off,_hardScan);}
// Return scanline weight for bloom.
float BloomScan(float2 pos,float off){
float dst=Dist(pos).y;
return Gaus(dst+off,_hardBloomScan);}
// Allow nearest three lines to effect pixel.
float3 Tri(float2 pos){
float3 a=Horz3(pos,-1.0);
float3 b=Horz5(pos, 0.0);
float3 c=Horz3(pos, 1.0);
float wa=Scan(pos,-1.0);
float wb=Scan(pos, 0.0);
float wc=Scan(pos, 1.0);
return a*wa+b*wb+c*wc;}
// Small bloom.
float3 Bloom(float2 pos){
float3 a=Horz5(pos,-2.0);
float3 b=Horz7(pos,-1.0);
float3 c=Horz7(pos, 0.0);
float3 d=Horz7(pos, 1.0);
float3 e=Horz5(pos, 2.0);
float wa=BloomScan(pos,-2.0);
float wb=BloomScan(pos,-1.0);
float wc=BloomScan(pos, 0.0);
float wd=BloomScan(pos, 1.0);
float we=BloomScan(pos, 2.0);
return a*wa+b*wb+c*wc+d*wd+e*we;}
// Distortion of scanlines, and end of screen alpha.
float2 Warp(float2 pos){
pos=pos*2.0-1.0;
pos*=float2(1.0+(pos.y*pos.y)*_warp.x,1.0+(pos.x*pos.x)*_warp.y);
return pos*0.5+0.5;}
#if defined(_MASKSTYLE_TVSTYLE)
// Very compressed TV style shadow mask.
float3 Mask(float2 pos){
float lineee=_maskLight;
float odd=0.0;
if(fract(pos.x/6.0)<0.5)odd=1.0;
if(fract((pos.y+odd)/2.0)<0.5) lineee=_maskDark;
pos.x=fract(pos.x/3.0);
float3 mask=float3(_maskDark,_maskDark,_maskDark);
if(pos.x<0.333)mask.r=_maskLight;
else if(pos.x<0.666)mask.g=_maskLight;
else mask.b=_maskLight;
mask*=lineee;
return mask;
}
#elif defined(_MASKSTYLE_APERTUREGRILLE)
// Aperture-grille.
float3 Mask(float2 pos){
pos.x=fract(pos.x/3.0);
float3 mask=float3(_maskDark,_maskDark,_maskDark);
if(pos.x<0.333)mask.r=_maskLight;
else if(pos.x<0.666)mask.g=_maskLight;
else mask.b=_maskLight;
return mask;}
#elif defined(_MASKSTYLE_STRETCHEDVGA)
// Stretched VGA style shadow mask (same as prior shaders).
float3 Mask(float2 pos){
pos.x+=pos.y*3.0;
float3 mask=float3(_maskDark,_maskDark,_maskDark);
pos.x=fract(pos.x/6.0);
if(pos.x<0.333)mask.r=_maskLight;
else if(pos.x<0.666)mask.g=_maskLight;
else mask.b=_maskLight;
return mask;}
#elif defined(_MASKSTYLE_VGASTYLE)
// VGA style shadow mask.
float3 Mask(float2 pos){
pos.xy=floor(pos.xy*float2(1.0,0.5));
pos.x+=pos.y*3.0;
float3 mask=float3(_maskDark,_maskDark,_maskDark);
pos.x=fract(pos.x/6.0);
if(pos.x<0.333)mask.r=_maskLight;
else if(pos.x<0.666)mask.g=_maskLight;
else mask.b=_maskLight;
return mask;}
#endif
// Draw dividing bars.
float Bar(float pos,float bar){pos-=bar;return pos*pos<4.0?0.0:1.0;}
// Entry.
float4 mainImage(float2 fragCoord){
float4 fragColor = float4(1,1,1,1);
float2 pos=Warp(fragCoord.xy/_iResolution.xy);
fragColor.rgb=Tri(pos)*Mask(fragCoord.xy);
fragColor.rgb+=Bloom(pos)*_bloomAmount;
fragColor.a=1.0;
fragColor.rgb=ToSrgb(fragColor.rgb);
return fragColor;
}
struct v2f
{
float4 pos : POSITION;
float2 uv : TEXCOORD0;
};
fixed4 frag (v2f i) : SV_Target
{
float2 pos = _iResolution.xy*i.uv;
fixed4 col = mainImage(pos);
return col;
}
ENDCG
}
}
}

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 57c38351364c92e45aef2dc17245b3ce
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,62 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8e6292b2c06870d4495f009f912b9600, type: 3}
m_Name: GameCamera Profile
m_EditorClassIdentifier:
settings:
- {fileID: 117625959343581733}
--- !u!114 &117625959343581733
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e88ab71ab1a47d048ba0e45b742f6140, type: 3}
m_Name: FixingPixelArtGrille
m_EditorClassIdentifier:
active: 1
enabled:
overrideState: 1
value: 1
MaskStyle:
overrideState: 0
value: 1
DrawResolution:
overrideState: 0
value: {x: 272, y: 240}
HardScan:
overrideState: 0
value: -10
HardPix:
overrideState: 0
value: -2
HardBloomScan:
overrideState: 0
value: -4
HardBloomPix:
overrideState: 0
value: -1.5
BloomAmount:
overrideState: 0
value: 0.0625
Warp:
overrideState: 0
value: {x: 0.015625, y: 0.041666668}
MaskLight:
overrideState: 0
value: 1.5
MaskDrak:
overrideState: 0
value: 0.5

View File

@ -1,8 +1,8 @@
fileFormatVersion: 2
guid: 5d4a385f133f9074583d64ab2172a03b
guid: 17060e2d2f9e5c340a526f08317e5a98
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 8400000
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -15,6 +15,7 @@ namespace AxibugEmuOnline.Client
void SetupScheme();
void StartGame(RomFile romFile);
void DoReset();
EnumPlatform Platform { get; }
uint Frame { get; }
}

View File

@ -0,0 +1,12 @@
using System.Collections.Generic;
using UnityEngine;
namespace AxibugEmuOnline.Client
{
public abstract class CommandChanger : IKeyMapperChanger
{
public string Name { get; private set; }
public abstract object GetConfig();
}
}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d5a7a9a2191170e49b387c0487288ae9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,25 @@
using System.Collections.Generic;
using UnityEngine;
namespace AxibugEmuOnline.Client
{
public class GamingChanger : CommandChanger
{
Dictionary<KeyCode, EnumCommand> m_uiKeyMapper = new Dictionary<KeyCode, EnumCommand>();
public GamingChanger()
{
m_uiKeyMapper[KeyCode.Escape] = EnumCommand.OptionMenu;
if (Application.platform == RuntimePlatform.PSP2)
{
m_uiKeyMapper[Common.PSVitaKey.L] = EnumCommand.OptionMenu;
m_uiKeyMapper[Common.PSVitaKey.R] = EnumCommand.OptionMenu;
}
//PC XBOX
m_uiKeyMapper[Common.PC_XBOXKEY.Y] = EnumCommand.OptionMenu;
}
public override object GetConfig() => m_uiKeyMapper;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c8339ffab20bfea4cbc7d3aa440c3fdb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,54 @@
using System.Collections.Generic;
using UnityEngine;
namespace AxibugEmuOnline.Client
{
public class NormalChanger : CommandChanger
{
Dictionary<KeyCode, EnumCommand> m_uiKeyMapper = new Dictionary<KeyCode, EnumCommand>();
public NormalChanger()
{
m_uiKeyMapper[KeyCode.A] = EnumCommand.SelectItemLeft;
m_uiKeyMapper[KeyCode.D] = EnumCommand.SelectItemRight;
m_uiKeyMapper[KeyCode.W] = EnumCommand.SelectItemUp;
m_uiKeyMapper[KeyCode.S] = EnumCommand.SelectItemDown;
m_uiKeyMapper[KeyCode.K] = EnumCommand.Enter;
m_uiKeyMapper[KeyCode.L] = EnumCommand.Back;
m_uiKeyMapper[KeyCode.I] = EnumCommand.OptionMenu;
m_uiKeyMapper[KeyCode.LeftArrow] = EnumCommand.SelectItemLeft;
m_uiKeyMapper[KeyCode.RightArrow] = EnumCommand.SelectItemRight;
m_uiKeyMapper[KeyCode.UpArrow] = EnumCommand.SelectItemUp;
m_uiKeyMapper[KeyCode.DownArrow] = EnumCommand.SelectItemDown;
m_uiKeyMapper[KeyCode.Return] = EnumCommand.Enter;
m_uiKeyMapper[KeyCode.Escape] = EnumCommand.Back;
m_uiKeyMapper[KeyCode.RightShift] = EnumCommand.OptionMenu;
m_uiKeyMapper[KeyCode.LeftShift] = EnumCommand.OptionMenu;
if (Application.platform == RuntimePlatform.PSP2)
{
m_uiKeyMapper[Common.PSVitaKey.Left] = EnumCommand.SelectItemLeft;
m_uiKeyMapper[Common.PSVitaKey.Right] = EnumCommand.SelectItemRight;
m_uiKeyMapper[Common.PSVitaKey.Up] = EnumCommand.SelectItemUp;
m_uiKeyMapper[Common.PSVitaKey.Down] = EnumCommand.SelectItemDown;
m_uiKeyMapper[Common.PSVitaKey.Circle] = EnumCommand.Enter;
m_uiKeyMapper[Common.PSVitaKey.Cross] = EnumCommand.Back;
m_uiKeyMapper[Common.PSVitaKey.Triangle] = EnumCommand.OptionMenu;
}
//PC XBOX
//m_uiKeyMapper[Common.PC_XBOXKEY.Left] = EnumCommand.SelectItemLeft;
//m_uiKeyMapper[Common.PSVitaKey.Right] = EnumCommand.SelectItemRight;
//m_uiKeyMapper[Common.PSVitaKey.Up] = EnumCommand.SelectItemUp;
//m_uiKeyMapper[Common.PSVitaKey.Down] = EnumCommand.SelectItemDown;
m_uiKeyMapper[Common.PC_XBOXKEY.MenuBtn] = EnumCommand.Enter;
m_uiKeyMapper[Common.PC_XBOXKEY.ViewBtn] = EnumCommand.Back;
m_uiKeyMapper[Common.PC_XBOXKEY.Y] = EnumCommand.OptionMenu;
}
public override object GetConfig() => m_uiKeyMapper;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b8790f215d873d044aa8d00bacdee237
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,13 +1,18 @@
using AxibugEmuOnline.Client.ClientCore;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
namespace AxibugEmuOnline.Client
{
public class Initer : MonoBehaviour
{
public PostProcessVolume m_filterVolume;
public CanvasGroup m_filterPreview;
public CanvasGroup m_xmbBg;
private void Awake()
{
App.Init();
App.Init(this);
}
}
}

View File

@ -71,7 +71,7 @@ namespace AxibugEmuOnline.Client.Manager
InGameUI.Instance.Hide();
LaunchUI.Instance.ShowMainMenu();
ControlScheme.Current = ControlSchemeSetts.Normal;
CommandDispatcher.Instance.Current = CommandDispatcher.Instance.Normal;
}
public void ResetGame()

View File

@ -1,6 +1,4 @@
using DG.Tweening;
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using UnityEngine;
namespace AxibugEmuOnline.Client

View File

@ -0,0 +1,81 @@
using DG.Tweening;
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;
using static AxibugEmuOnline.Client.FilterEffect;
namespace AxibugEmuOnline.Client
{
public class FilterManager
{
private PostProcessProfile m_filterPorfile;
private List<Filter> m_filters;
private Dictionary<EnumPlatform, Filter> m_filterPlatforms = new Dictionary<EnumPlatform, Filter>();
private AlphaWraper m_previewFilterWraper;
/// <summary>
/// 滤镜列表
/// </summary>
public IReadOnlyList<Filter> Filters => m_filters;
public FilterManager(PostProcessVolume filterVolume, CanvasGroup filterPreview, CanvasGroup mainBg)
{
m_filterPorfile = filterVolume.profile;
m_filters = m_filterPorfile.settings.Where(setting => setting is FilterEffect).Select(setting => new Filter(setting as FilterEffect)).ToList();
m_previewFilterWraper = new AlphaWraper(mainBg, filterPreview, false);
ShutDownFilterPreview();
ShutDownFilter();
}
/// <summary> 关闭滤镜预览 </summary>
public void ShutDownFilterPreview()
{
m_previewFilterWraper.On = false;
}
/// <summary> 开启滤镜预览 </summary>
public void EnableFilterPreview()
{
m_previewFilterWraper.On = true;
}
/// <summary>
/// 打开滤镜
/// </summary>
/// <param name="filter"></param>
public void EnableFilter(Filter filter)
{
foreach (var selfFiler in Filters)
{
if (selfFiler != filter) selfFiler.m_setting.enabled.Override(false);
else selfFiler.m_setting.enabled.Override(true);
}
}
/// <summary>
/// 关闭滤镜效果
/// </summary>
public void ShutDownFilter()
{
//关闭所有后处理效果
foreach (var setting in m_filterPorfile.settings)
setting.enabled.Override(false);
}
public class Filter
{
public string Name => m_setting.Name;
internal FilterEffect m_setting;
public Filter(FilterEffect setting)
{
m_setting = setting;
}
internal IReadOnlyCollection<EditableParamerter> Paramerters => m_setting.EditableParam;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5354e2e13dbff91438a04b9de2351645
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,5 +1,4 @@
using AxibugEmuOnline.Client.ClientCore;
using AxiReplay;
using System;
using System.IO;
using System.Runtime.InteropServices;
@ -57,7 +56,7 @@ namespace AxibugEmuOnline.Client
}
public EmulatorConfig Config { get; private set; } = new EmulatorConfig();
public NesControllerMapper ControllerMapper { get; private set; } = new NesControllerMapper();
public void PrepareDirectory(string directPath)
{
Directory.CreateDirectory($"{App.PersistentDataPath}/{directPath}");
@ -115,7 +114,7 @@ namespace AxibugEmuOnline.Client
}
else m_sampledState = default;
var localState = NesControllerMapper.Get().CreateState();
var localState = ControllerMapper.CreateState();
var rawData = ToNet(localState);
if (LastTestInput != rawData)
{
@ -126,7 +125,7 @@ namespace AxibugEmuOnline.Client
}
else
{
m_sampledState = NesControllerMapper.Get().CreateState();
m_sampledState = ControllerMapper.CreateState();
}
}

View File

@ -1,6 +1,5 @@
using AxibugEmuOnline.Client.ClientCore;
using System;
using System.IO;
using System;
using System.Text;
using UnityEngine;
using VirtualNes.Core;
@ -8,36 +7,10 @@ namespace AxibugEmuOnline.Client
{
public class NesControllerMapper
{
private static readonly string ConfigFilePath = $"{App.PersistentDataPath}/NES/ControllerMapper.json";
public MapperSetter Player1 = new MapperSetter();
public MapperSetter Player2 = new MapperSetter();
public MapperSetter Player3 = new MapperSetter();
public MapperSetter Player4 = new MapperSetter();
public NesControllerMapper()
{
Player1.UP.keyCode = KeyCode.W;
Player1.DOWN.keyCode = KeyCode.S;
Player1.LEFT.keyCode = KeyCode.A;
Player1.RIGHT.keyCode = KeyCode.D;
Player1.B.keyCode = KeyCode.J;
Player1.A.keyCode = KeyCode.K;
Player1.SELECT.keyCode = KeyCode.V;
Player1.START.keyCode = KeyCode.B;
//PC XBOX
//Player1.B.keyCode = Common.PC_XBOXKEY.A;
//Player1.A.keyCode = Common.PC_XBOXKEY.B;
//Player1.SELECT.keyCode = Common.PC_XBOXKEY.ViewBtn;
//Player1.START.keyCode = Common.PC_XBOXKEY.MenuBtn;
}
public void Save()
{
var jsonStr = JsonUtility.ToJson(this);
File.WriteAllText(ConfigFilePath, jsonStr);
}
public MapperSetter Player1 = new MapperSetter(1);
public MapperSetter Player2 = new MapperSetter(2);
public MapperSetter Player3 = new MapperSetter(3);
public MapperSetter Player4 = new MapperSetter(4);
public ControllerState CreateState()
{
@ -46,86 +19,168 @@ namespace AxibugEmuOnline.Client
var state3 = Player3.GetButtons();
var state4 = Player4.GetButtons();
return new ControllerState(state1, state2, state3, state4);
var result = new ControllerState(state1, state2, state3, state4);
return result;
}
private static NesControllerMapper s_setting;
public static NesControllerMapper Get()
{
if (s_setting == null)
{
try
{
var json = File.ReadAllText($"{App.PersistentDataPath}/Nes/ControllerMapper.json");
s_setting = JsonUtility.FromJson<NesControllerMapper>(json);
}
catch
{
s_setting = new NesControllerMapper();
}
}
return s_setting;
}
[Serializable]
public class Mapper
{
public EnumButtonType buttonType;
public KeyCode keyCode;
MapperSetter m_setter;
EnumButtonType m_buttonType;
IKeyListener m_keyListener;
int m_controllerIndex => m_setter.ControllerIndex;
public Mapper(EnumButtonType buttonType)
public Mapper(MapperSetter setter, EnumButtonType buttonType)
{
this.buttonType = buttonType;
m_setter = setter;
m_buttonType = buttonType;
loadConfig();
}
private void loadConfig()
{
m_keyListener = MapperSetter.GetKey(m_controllerIndex, m_buttonType);
}
public EnumButtonType SampleKey()
{
return m_keyListener.IsPressing() ? m_buttonType : 0;
}
}
[Serializable]
public class MapperSetter
{
public Mapper UP = new Mapper(EnumButtonType.UP);
public Mapper DOWN = new Mapper(EnumButtonType.DOWN);
public Mapper LEFT = new Mapper(EnumButtonType.LEFT);
public Mapper RIGHT = new Mapper(EnumButtonType.RIGHT);
public Mapper A = new Mapper(EnumButtonType.A);
public Mapper B = new Mapper(EnumButtonType.B);
public Mapper SELECT = new Mapper(EnumButtonType.SELECT);
public Mapper START = new Mapper(EnumButtonType.START);
public Mapper MIC = new Mapper(EnumButtonType.MIC);
/// <summary> 控制器序号(手柄1,2,3,4) </summary>
public int ControllerIndex { get; }
public Mapper UP { get; private set; }
public Mapper DOWN { get; private set; }
public Mapper LEFT { get; private set; }
public Mapper RIGHT { get; private set; }
public Mapper A { get; private set; }
public Mapper B { get; private set; }
public Mapper SELECT { get; private set; }
public Mapper START { get; private set; }
public Mapper MIC { get; private set; }
public MapperSetter(int controllerIndex)
{
ControllerIndex = controllerIndex;
UP = new Mapper(this, EnumButtonType.UP);
DOWN = new Mapper(this, EnumButtonType.DOWN);
LEFT = new Mapper(this, EnumButtonType.LEFT);
RIGHT = new Mapper(this, EnumButtonType.RIGHT);
A = new Mapper(this, EnumButtonType.A);
B = new Mapper(this, EnumButtonType.B);
SELECT = new Mapper(this, EnumButtonType.SELECT);
START = new Mapper(this, EnumButtonType.START);
MIC = new Mapper(this, EnumButtonType.MIC);
}
public EnumButtonType GetButtons()
{
EnumButtonType res = 0;
if (Input.GetKey(UP.keyCode))
res |= EnumButtonType.UP;
if (Input.GetKey(DOWN.keyCode))
res |= EnumButtonType.DOWN;
if (Input.GetKey(LEFT.keyCode))
res |= EnumButtonType.LEFT;
if (Input.GetKey(RIGHT.keyCode))
res |= EnumButtonType.RIGHT;
if (Input.GetKey(A.keyCode))
res |= EnumButtonType.A;
if (Input.GetKey(B.keyCode))
res |= EnumButtonType.B;
if (Input.GetKey(SELECT.keyCode))
res |= EnumButtonType.SELECT;
if (Input.GetKey(START.keyCode))
res |= EnumButtonType.START;
if (Input.GetKey(MIC.keyCode))
res |= EnumButtonType.MIC;
res |= UP.SampleKey();
res |= DOWN.SampleKey();
res |= LEFT.SampleKey();
res |= RIGHT.SampleKey();
res |= A.SampleKey();
res |= B.SampleKey();
res |= SELECT.SampleKey();
res |= START.SampleKey();
res |= MIC.SampleKey();
return res;
}
public static IKeyListener GetKey(int controllerInput, EnumButtonType nesConBtnType)
{
string configKey = $"NES_{controllerInput}_{nesConBtnType}";
if (PlayerPrefs.HasKey(configKey))
{
return new KeyListener(PlayerPrefs.GetString(configKey));
}
else
{
var defaultKeyCode = GetDefaultKey();
PlayerPrefs.SetString(configKey, defaultKeyCode.ToString());
return defaultKeyCode;
}
KeyListener GetDefaultKey()
{
switch (controllerInput)
{
case 1:
if (nesConBtnType == EnumButtonType.LEFT) return new KeyListener(KeyCode.A);
if (nesConBtnType == EnumButtonType.RIGHT) return new KeyListener(KeyCode.D);
if (nesConBtnType == EnumButtonType.UP) return new KeyListener(KeyCode.W);
if (nesConBtnType == EnumButtonType.DOWN) return new KeyListener(KeyCode.S);
if (nesConBtnType == EnumButtonType.START) return new KeyListener(KeyCode.B);
if (nesConBtnType == EnumButtonType.SELECT) return new KeyListener(KeyCode.V);
if (nesConBtnType == EnumButtonType.A) return new KeyListener(KeyCode.K);
if (nesConBtnType == EnumButtonType.B) return new KeyListener(KeyCode.J);
if (nesConBtnType == EnumButtonType.MIC) return new KeyListener(KeyCode.M);
break;
case 2:
if (nesConBtnType == EnumButtonType.LEFT) return new KeyListener(KeyCode.Delete);
if (nesConBtnType == EnumButtonType.RIGHT) return new KeyListener(KeyCode.PageDown);
if (nesConBtnType == EnumButtonType.UP) return new KeyListener(KeyCode.Home);
if (nesConBtnType == EnumButtonType.DOWN) return new KeyListener(KeyCode.End);
if (nesConBtnType == EnumButtonType.START) return new KeyListener(KeyCode.PageUp);
if (nesConBtnType == EnumButtonType.SELECT) return new KeyListener(KeyCode.Insert);
if (nesConBtnType == EnumButtonType.A) return new KeyListener(KeyCode.Keypad5);
if (nesConBtnType == EnumButtonType.B) return new KeyListener(KeyCode.Keypad4);
if (nesConBtnType == EnumButtonType.MIC) return new KeyListener(KeyCode.KeypadPeriod);
break;
}
return default;
}
}
}
public interface IKeyListener
{
bool IsPressing();
}
public struct KeyListener : IKeyListener
{
private KeyCode m_key;
public KeyListener(KeyCode key)
{
m_key = key;
}
/// <summary>
/// 从配置表字符串构建
/// </summary>
public KeyListener(string confStr)
{
m_key = KeyCode.None;
if (int.TryParse(confStr, out int result))
m_key = (KeyCode)result;
}
public readonly bool IsPressing()
{
if (Input.GetKey(m_key)) return true;
return false;
}
public override string ToString()
{
return ((int)(m_key)).ToString();
}
}
}
}

View File

@ -1,5 +1,4 @@
using AxibugEmuOnline.Client.ClientCore;
using AxibugEmuOnline.Client.Common;
using System;
using System.Diagnostics;
using System.IO;
@ -12,6 +11,8 @@ namespace AxibugEmuOnline.Client
{
public class NesEmulator : MonoBehaviour, IEmuCore
{
public EnumPlatform Platform => EnumPlatform.NES;
//模拟器核心实例化对象
public NES NesCore { get; private set; }
@ -135,7 +136,7 @@ namespace AxibugEmuOnline.Client
public void SetupScheme()
{
ControlScheme.Current = ControlSchemeSetts.NES;
CommandDispatcher.Instance.Current = CommandDispatcher.Instance.Gaming;
}
public void LoadState(object state)
@ -168,6 +169,8 @@ namespace AxibugEmuOnline.Client
NesCore.LoadState(st);
}
public uint Frame => NesCore.FrameCount;
#if UNITY_EDITOR
/// <summary>
/// 编辑器用
@ -196,8 +199,7 @@ namespace AxibugEmuOnline.Client
UnityEditor.EditorUtility.SetDirty(db);
UnityEditor.AssetDatabase.SaveAssets();
}
#endif
public uint Frame => NesCore.FrameCount;
#endif
}
}

View File

@ -7,7 +7,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: VirtuNesDraw
m_Name: NesEmulator_Screen
m_Shader: {fileID: 4800000, guid: b351396ff606116478d7f4412abe4e2e, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4

View File

@ -1,4 +1,4 @@
Shader "AleinUI/Clip"
Shader "NesEmulator/Screen"
{
Properties
{
@ -107,8 +107,6 @@
mapUV.x = lerp(start,end, mapUV.x);
half4 color = tex2D(_MainTex,mapUV);
//float rawIndex = color.b;

View File

@ -0,0 +1,93 @@
using DG.Tweening;
using DG.Tweening.Core;
using DG.Tweening.Plugins.Options;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace AxibugEmuOnline.Client
{
public class AlphaWraper
{
private bool m_on;
private CanvasGroup m_offUI;
private CanvasGroup m_onUI;
private TweenerCore<float, float, FloatOptions> m_onTween;
private TweenerCore<float, float, FloatOptions> m_offTween;
public bool On
{
get => m_on;
set
{
if (m_on == value) return;
m_on = value;
if (m_onTween != null)
{
m_onTween.Kill();
m_onTween = null;
}
if (m_offTween != null)
{
m_offTween.Kill();
m_offTween = null;
}
m_onUI.gameObject.SetActiveEx(true);
m_offUI.gameObject.SetActiveEx(true);
if (On)
{
float progress = 0f;
m_onTween = DOTween.To(() => progress, (x) =>
{
progress = x;
m_onUI.alpha = progress;
m_offUI.alpha = 1 - progress;
}, 1f, 0.3f);
m_onTween.onComplete = () =>
{
m_offUI.gameObject.SetActiveEx(false);
};
}
else
{
float progress = 0f;
m_offTween = DOTween.To(() => progress, (x) =>
{
progress = x;
m_onUI.alpha = 1 - progress;
m_offUI.alpha = progress;
}, 1f, 0.3f);
m_offTween.onComplete = () =>
{
m_onUI.gameObject.SetActiveEx(false);
};
}
}
}
public AlphaWraper(CanvasGroup offUI, CanvasGroup onUI, bool defaultOn)
{
m_offUI = offUI;
m_onUI = onUI;
m_on = defaultOn;
if (On)
{
onUI.alpha = 1;
onUI.gameObject.SetActiveEx(true);
offUI.alpha = 0;
offUI.gameObject.SetActiveEx(false);
}
else
{
onUI.alpha = 0;
onUI.gameObject.SetActiveEx(false);
offUI.alpha = 1;
offUI.gameObject.SetActiveEx(true);
}
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 02337cc8c99c47341aa29b3e296b7b13
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,5 +1,3 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace AxibugEmuOnline.Client

View File

@ -0,0 +1,32 @@
using AxibugEmuOnline.Client.ClientCore;
using System;
using System.Collections.Generic;
using System.Linq;
namespace AxibugEmuOnline.Client
{
public class GlobalFilterListMenuItem : VirtualSubMenuItem
{
public override bool OnEnterItem()
{
App.filter.EnableFilterPreview();
return base.OnEnterItem();
}
public override bool OnExitItem()
{
App.filter.ShutDownFilterPreview();
App.filter.ShutDownFilter();
return base.OnExitItem();
}
protected override void GetVirtualListDatas(Action<object> datas)
{
List<object> list = new List<object>();
list.AddRange(App.filter.Filters.Select(f => (object)f));
datas.Invoke(list);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0ac5f46132259b045b524fc310dbd532
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,47 @@
using AxibugEmuOnline.Client.ClientCore;
using AxibugEmuOnline.Client.UI;
namespace AxibugEmuOnline.Client
{
/// <summary>
/// ±³¾°ÑÕÉ«ÉèÖÃUI
/// </summary>
public class UI_FilterItem : MenuItem, IVirtualItem
{
public int Index { get; set; }
public FilterManager.Filter Datacontext { get; private set; }
public void SetData(object data)
{
Datacontext = data as FilterManager.Filter;
UpdateView();
}
private void UpdateView()
{
SetBaseInfo(Datacontext.Name, $"²ÎÊýÊýÁ¿:{Datacontext.Paramerters.Count}", null);
}
public void SetDependencyProperty(object data)
{
SetSelectState(data is ThirdMenuRoot tr && tr.SelectIndex == Index);
if (m_select)
{
App.filter.EnableFilterPreview();
App.filter.EnableFilter(Datacontext);
}
}
public void Release()
{
}
public override bool OnEnterItem()
{
return false;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 267dda362a6090d42b48e3cced57ae9c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,3 +1,5 @@
using AxibugEmuOnline.Client.ClientCore;
using System;
using System.Collections.Generic;
using UnityEngine;
@ -12,11 +14,34 @@ namespace AxibugEmuOnline.Client
/// <summary> 独占注册对象,指令会被列表中最后一个对象独占 </summary>
List<CommandExecuter> m_registerHigh = new List<CommandExecuter>();
Dictionary<KeyCode, EnumCommand> m_keyMapper = new Dictionary<KeyCode, EnumCommand>();
ICommandListener m_listener;
/// <summary> 标准UI操作 </summary>
public IKeyMapperChanger Normal { get; private set; }
/// <summary> 游戏中UI操作 </summary>
public IKeyMapperChanger Gaming { get; private set; }
private IKeyMapperChanger m_current;
public IKeyMapperChanger Current
{
get => m_current;
set
{
m_current = value;
SetKeyMapper(m_current);
}
}
private void Awake()
{
Instance = this;
//初始化command监视器
m_listener = new CommandListener();
//初始化键位修改器
Normal = new NormalChanger();
Gaming = new GamingChanger();
}
private void OnDestroy()
@ -24,6 +49,11 @@ namespace AxibugEmuOnline.Client
Instance = null;
}
public bool IsRegisted(CommandExecuter commandExecuter)
{
return m_register.Contains(commandExecuter) || m_registerHigh.Contains(commandExecuter);
}
public void RegistController(CommandExecuter controller)
{
if (!controller.AloneMode)
@ -51,40 +81,21 @@ namespace AxibugEmuOnline.Client
readonly List<CommandExecuter> oneFrameRegister = new List<CommandExecuter>();
private void Update()
{
foreach (var item in m_keyMapper)
{
peekRegister(oneFrameRegister);
peekRegister(oneFrameRegister);
m_listener.Update(oneFrameRegister);
if (Input.GetKeyDown(item.Key))
{
foreach (var controller in oneFrameRegister)
{
if (!controller.Enable) continue;
controller.ExecuteCommand(item.Value, false);
}
}
if (Input.GetKeyUp(item.Key))
{
foreach (var controller in oneFrameRegister)
{
if (!controller.Enable) continue;
controller.ExecuteCommand(item.Value, true);
}
}
}
//键位映射表需要在按键响应的堆栈结束后处理,防止迭代器修改问题
//键位映射在按键响应的堆栈结束后处理,防止迭代器修改问题
if (m_waitMapperSetting != null)
{
m_keyMapper = m_waitMapperSetting;
m_listener.ApplyKeyMapper(m_waitMapperSetting);
m_waitMapperSetting = null;
}
}
private Dictionary<KeyCode, EnumCommand> m_waitMapperSetting = null;
public void SetKeyMapper(Dictionary<KeyCode, EnumCommand> mapper)
IKeyMapperChanger m_waitMapperSetting = null;
void SetKeyMapper(IKeyMapperChanger keyMapChanger)
{
m_waitMapperSetting = mapper;
m_waitMapperSetting = keyMapChanger;
}
private List<CommandExecuter> peekRegister(List<CommandExecuter> results)
@ -114,14 +125,12 @@ namespace AxibugEmuOnline.Client
return results;
}
#if UNITY_EDITOR
public void GetRegisters(out IReadOnlyList<CommandExecuter> normal, out IReadOnlyList<CommandExecuter> alone)
{
normal = m_register;
alone = m_registerHigh;
}
#endif
}
}

View File

@ -17,6 +17,7 @@ namespace AxibugEmuOnline.Client
public abstract bool Enable { get; }
public virtual bool AloneMode { get; }
public bool Registed => CommandDispatcher.Instance.IsRegisted(this);
protected virtual void Awake()
{
@ -32,10 +33,20 @@ namespace AxibugEmuOnline.Client
protected virtual void Update()
{
m_pulsInvoker_Left.Update(Time.deltaTime);
m_pulsInvoker_Right.Update(Time.deltaTime);
m_pulsInvoker_Up.Update(Time.deltaTime);
m_pulsInvoker_Down.Update(Time.deltaTime);
if (Registed)
{
m_pulsInvoker_Left.Update(Time.deltaTime);
m_pulsInvoker_Right.Update(Time.deltaTime);
m_pulsInvoker_Up.Update(Time.deltaTime);
m_pulsInvoker_Down.Update(Time.deltaTime);
}
else
{
m_pulsInvoker_Left.DisActive();
m_pulsInvoker_Right.DisActive();
m_pulsInvoker_Up.DisActive();
m_pulsInvoker_Down.DisActive();
}
}
@ -49,6 +60,7 @@ namespace AxibugEmuOnline.Client
public void ExecuteCommand(EnumCommand cmd, bool cancel)
{
if (cmd == EnumCommand.NONE) return;
if (!cancel)
{
switch (cmd)
@ -118,6 +130,7 @@ namespace AxibugEmuOnline.Client
public enum EnumCommand
{
NONE,
SelectItemLeft,
SelectItemRight,
SelectItemUp,

View File

@ -0,0 +1,38 @@
using System.Collections.Generic;
using UnityEngine;
namespace AxibugEmuOnline.Client
{
public class CommandListener : ICommandListener
{
Dictionary<KeyCode, EnumCommand> m_keyMapper = new Dictionary<KeyCode, EnumCommand>();
List<CommandState> m_commands = new List<CommandState>();
IEnumerable<CommandState> GetCommand()
{
m_commands.Clear();
foreach (var item in m_keyMapper)
{
if (Input.GetKeyDown(item.Key)) m_commands.Add(new CommandState { Cmd = item.Value, Cancel = false });
if (Input.GetKeyUp(item.Key)) m_commands.Add(new CommandState { Cmd = item.Value, Cancel = true });
}
return m_commands;
}
public void ApplyKeyMapper(IKeyMapperChanger changer)
{
var cfg = (Dictionary<KeyCode, EnumCommand>)changer.GetConfig();
m_keyMapper = cfg;
}
public void Update(IEnumerable<CommandExecuter> executers)
{
foreach (var cmd in GetCommand())
{
foreach (var executer in executers)
{
executer.ExecuteCommand(cmd.Cmd, cmd.Cancel);
}
}
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0c54554335d283d4ca61e01335c58665
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,24 @@
using System.Collections.Generic;
namespace AxibugEmuOnline.Client
{
public interface IKeyMapperChanger
{
object GetConfig();
}
public interface ICommandListener
{
/// <summary>
/// 应用键位设置
/// </summary>
/// <param name="changer"></param>
void ApplyKeyMapper(IKeyMapperChanger changer);
void Update(IEnumerable<CommandExecuter> commands);
}
public struct CommandState
{
public EnumCommand Cmd;
public bool Cancel;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 16e65b8db21c226419b57118ec1f56ff
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -124,7 +124,7 @@ namespace AxibugEmuOnline.Client
App.roomMgr.SendLeavnRoom();
App.emu.StopGame();
ControlScheme.Current = ControlSchemeSetts.Normal;
CommandDispatcher.Instance.Current = CommandDispatcher.Instance.Normal;
}
}
}

View File

@ -14,8 +14,7 @@ namespace AxibugEmuOnline.Client
RectTransform MainMenuRoot;
[SerializeField]
MainMenuController MainMenu;
[SerializeField]
Image BG;
public Image BG;
Vector2 m_mainLayoutPosition;
[SerializeField]
@ -36,7 +35,7 @@ namespace AxibugEmuOnline.Client
private void Start()
{
ControlScheme.Current = ControlSchemeSetts.Normal;
CommandDispatcher.Instance.Current = CommandDispatcher.Instance.Normal;
}
public void HideMainMenu()

View File

@ -103,9 +103,13 @@ namespace AxibugEmuOnline.Client.UI
if (InfoNode != null) InfoNode.alpha = m_progress;
if (spline != null) spline.SetAlpha(m_progress);
Root.localScale = Vector3.one * Mathf.Lerp(UnSelectScale, SelectScale, m_progress);
if (m_select) OnSelected(m_progress);
});
}
protected virtual void OnSelected(float progress) { }
public virtual bool OnEnterItem() => true;
public virtual bool OnExitItem() => true;

View File

@ -69,6 +69,8 @@ namespace AxibugEmuOnline.Client
protected override void Update()
{
UpdateMenuState();
base.Update();
}
private void UpdateMenuState()
@ -125,7 +127,7 @@ namespace AxibugEmuOnline.Client
}
}
ControlScheme m_lastCS;
IKeyMapperChanger m_lastCS;
public void Pop<T>(List<T> menus, int defaultIndex = 0) where T : OptionMenu
{
ReleaseRuntimeMenus();
@ -160,8 +162,8 @@ namespace AxibugEmuOnline.Client
0.3f
).SetEase(Ease.OutCubic);
m_lastCS = ControlScheme.Current;
ControlScheme.Current = ControlSchemeSetts.Normal;
m_lastCS = CommandDispatcher.Instance.Current;
CommandDispatcher.Instance.Current = CommandDispatcher.Instance.Normal;
}
}
@ -192,7 +194,7 @@ namespace AxibugEmuOnline.Client
m_bPoped = false;
ControlScheme.Current = m_lastCS;
CommandDispatcher.Instance.Current = m_lastCS;
OnHide?.Invoke();
}

View File

@ -60,6 +60,7 @@ namespace VirtualNes.Core
[Flags]
public enum EnumButtonType
{
NONE = 0,
UP = 1,
DOWN = 2,
LEFT = 4,

View File

@ -2,6 +2,7 @@
"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.ide.visualstudio": "2.0.22",
"com.unity.postprocessing": "3.2.2",
"com.unity.ugui": "1.0.0",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",

View File

@ -22,6 +22,15 @@
},
"url": "https://packages.unity.cn"
},
"com.unity.postprocessing": {
"version": "3.2.2",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.modules.physics": "1.0.0"
},
"url": "https://packages.unity.cn"
},
"com.unity.test-framework": {
"version": "1.1.31",
"depth": 1,

View File

@ -8,7 +8,7 @@ EditorBuildSettings:
- enabled: 1
path: Assets/Scene/AxibugEmuOnline.Client.unity
guid: eb0c18a619175384d95147898a43054b
- enabled: 1
- enabled: 0
path: Assets/Scene/Emu_NES.unity
guid: 3dba71db67877594a9b5b77059205ec8
m_configObjects: {}

View File

@ -640,21 +640,21 @@ PlayerSettings:
webGLThreadsSupport: 0
webGLDecompressionFallback: 0
scriptingDefineSymbols:
1: DOTWEEN
1: DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
4: DOTWEEN
7: DOTWEEN;ODIN_INSPECTOR;ODIN_INSPECTOR_3;ODIN_INSPECTOR_3_1;ODIN_INSPECTOR_EDITOR_ONLY
13: DOTWEEN
14: DOTWEEN
19: DOTWEEN
21: DOTWEEN
25: DOTWEEN
27: DOTWEEN
28: DOTWEEN
29: DOTWEEN
30: DOTWEEN
7: DOTWEEN;ODIN_INSPECTOR;ODIN_INSPECTOR_3;ODIN_INSPECTOR_3_1;ODIN_INSPECTOR_EDITOR_ONLY;UNITY_POST_PROCESSING_STACK_V2
13: DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
14: DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
19: DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
21: DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
25: DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
27: DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
28: DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
29: DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
30: DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
31: DOTWEEN
32: DOTWEEN
33: DOTWEEN
32: DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
33: DOTWEEN;UNITY_POST_PROCESSING_STACK_V2
additionalCompilerArguments: {}
platformArchitecture: {}
scriptingBackend:
@ -744,7 +744,7 @@ PlayerSettings:
m_VersionCode: 1
m_VersionName:
apiCompatibilityLevel: 3
activeInputHandler: 0
activeInputHandler: 2
cloudProjectId:
framebufferDepthMemorylessMode: 0
qualitySettingsNames: []

View File

@ -3,7 +3,8 @@
--- !u!78 &1
TagManager:
serializedVersion: 2
tags: []
tags:
- UIInput
layers:
- Default
- TransparentFX