From 4f264ef4cba1f9cad0ba6f3524eff95a2ed71816 Mon Sep 17 00:00:00 2001 From: minenice55 Date: Sun, 17 Sep 2023 22:55:06 -0400 Subject: [PATCH] support different control styles in options deprecate old input check methods --- .../SettingsMenu/ControllerSetup.prefab | 1921 ++++++++++++++++- Assets/Scripts/Games/DogNinja/DogNinja.cs | 2 +- .../Games/FirstContact/FirstContact.cs | 2 +- .../Scripts/Games/FirstContact/Translator.cs | 5 - .../Scripts/Games/KarateMan/KarateManJoe.cs | 4 +- .../Games/MarchingOrders/MarchingOrders.cs | 4 +- .../Scripts/Games/MeatGrinder/MeatGrinder.cs | 2 +- Assets/Scripts/Games/MunchyMonk/MunchyMonk.cs | 4 +- .../Scripts/Games/OctopusMachine/Octopus.cs | 2 +- .../Scripts/Games/RhythmTweezers/LongHair.cs | 2 +- .../Scripts/Games/RhythmTweezers/Tweezers.cs | 2 +- Assets/Scripts/Games/WizardsWaltz/Wizard.cs | 2 +- .../ControllerTypes/InputJoyshock.cs | 81 +- .../ControllerTypes/InputKeyboard.cs | 48 +- .../InputSystem/ControllerTypes/InputMouse.cs | 193 +- Assets/Scripts/InputSystem/InputController.cs | 83 +- Assets/Scripts/InputSystem/PlayerInput.cs | 263 ++- Assets/Scripts/UI/PauseMenu.cs | 49 +- .../SettingsDialog/Tabs/ControllerSettings.cs | 254 ++- 19 files changed, 2637 insertions(+), 286 deletions(-) diff --git a/Assets/Resources/Prefabs/Editor/SettingsMenu/ControllerSetup.prefab b/Assets/Resources/Prefabs/Editor/SettingsMenu/ControllerSetup.prefab index f09e5b78d..3b82da31a 100644 --- a/Assets/Resources/Prefabs/Editor/SettingsMenu/ControllerSetup.prefab +++ b/Assets/Resources/Prefabs/Editor/SettingsMenu/ControllerSetup.prefab @@ -1,5 +1,161 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1 &167034322926827804 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5959830605601995890} + - component: {fileID: 8202911340883549784} + - component: {fileID: 3150964914031037196} + m_Layer: 5 + m_Name: BindsTouchRight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &5959830605601995890 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 167034322926827804} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6956898500153539365} + - {fileID: 3655317729823433842} + - {fileID: 5723638281752444631} + m_Father: {fileID: 9026175551012134334} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 845, y: -134} + m_SizeDelta: {x: 350, y: 256} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8202911340883549784 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 167034322926827804} + m_CullTransparentMesh: 1 +--- !u!114 &3150964914031037196 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 167034322926827804} + m_Enabled: 0 + 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.392} + 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: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + 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 &433252097203419195 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5723638281752444631} + - component: {fileID: 3598767142341563587} + - component: {fileID: 2367439969848351761} + m_Layer: 5 + m_Name: BumperRIcn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5723638281752444631 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 433252097203419195} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4889907661646369442} + m_Father: {fileID: 5959830605601995890} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 12, y: -12} + m_SizeDelta: {x: 50, y: 50} + m_Pivot: {x: 0, y: 1} +--- !u!222 &3598767142341563587 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 433252097203419195} + m_CullTransparentMesh: 1 +--- !u!114 &2367439969848351761 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 433252097203419195} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 2100000, guid: 0035f9ee73a3659488de4969ea48d035, type: 2} + 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: 7882489078324362733, guid: 149c162f840b9e9428b96653dd8e40ba, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!1 &562151522154903633 GameObject: m_ObjectHideFlags: 0 @@ -1373,6 +1529,221 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 +--- !u!1 &2377747806562451505 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7348421967845561183} + - component: {fileID: 5048784501061479738} + - component: {fileID: 4520266423104490687} + m_Layer: 5 + m_Name: Pause + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7348421967845561183 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2377747806562451505} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6281455900561741999} + 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 &5048784501061479738 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2377747806562451505} + m_CullTransparentMesh: 1 +--- !u!114 &4520266423104490687 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2377747806562451505} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: + + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 4810e200fa0cb24438bac52343d7674b, type: 2} + m_sharedMaterial: {fileID: 2100000, guid: 6d4610587e293f74ca2b71ec1cf59da3, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 14 + m_fontSizeBase: 14 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 0 + m_wordWrappingRatios: 0.4 + m_overflowMode: 1 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &2381534891888314347 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3720722590260798810} + - component: {fileID: 5351529313446902258} + - component: {fileID: 3735792353049034382} + m_Layer: 5 + m_Name: BindsTouchLeft + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &3720722590260798810 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2381534891888314347} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3308513760662390593} + - {fileID: 4836245595930069381} + m_Father: {fileID: 9026175551012134334} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 268.5, y: -134} + m_SizeDelta: {x: 350, y: 256} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5351529313446902258 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2381534891888314347} + m_CullTransparentMesh: 1 +--- !u!114 &3735792353049034382 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2381534891888314347} + m_Enabled: 0 + 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.392} + 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: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + 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 &2469255184706749210 GameObject: m_ObjectHideFlags: 0 @@ -1410,7 +1781,7 @@ RectTransform: - {fileID: 3918594456177472909} - {fileID: 3918594455700716071} m_Father: {fileID: 9026175551012134334} - m_RootOrder: 1 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -1867,6 +2238,83 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &3086638758823170293 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3655317729823433842} + - component: {fileID: 5659993052068804781} + - component: {fileID: 218207244926254579} + m_Layer: 5 + m_Name: PauseIcn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3655317729823433842 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3086638758823170293} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6281455900561741999} + m_Father: {fileID: 5959830605601995890} + 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: 12, y: 12} + m_SizeDelta: {x: 50, y: 50} + m_Pivot: {x: 0, y: 0} +--- !u!222 &5659993052068804781 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3086638758823170293} + m_CullTransparentMesh: 1 +--- !u!114 &218207244926254579 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3086638758823170293} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 2100000, guid: 0035f9ee73a3659488de4969ea48d035, type: 2} + 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: -6506423922138132652, guid: 149c162f840b9e9428b96653dd8e40ba, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!1 &3150519645405769653 GameObject: m_ObjectHideFlags: 0 @@ -2118,7 +2566,7 @@ RectTransform: - {fileID: 3545008591354561835} - {fileID: 6528462599793419810} m_Father: {fileID: 9026175551012134334} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -4912,7 +5360,9 @@ MonoBehaviour: - {fileID: 7023003282004720528} - {fileID: 3718862281069217461} BatonBindingsMenus: [] - TouchBindingsMenus: [] + TouchBindingsMenus: + - {fileID: 2381534891888314347} + - {fileID: 167034322926827804} PadBindingsTxt: - {fileID: 4604067711429424208} - {fileID: 4284582035017505205} @@ -4926,7 +5376,13 @@ MonoBehaviour: - {fileID: 3757482881870811067} - {fileID: 3587226845734685475} BatonBindingsTxt: [] - TouchBindingsTxt: [] + TouchBindingsTxt: + - {fileID: 0} + - {fileID: 30726950662053239} + - {fileID: 4118707121199419495} + - {fileID: 6811614153817356371} + - {fileID: 7496553413986110838} + - {fileID: 4520266423104490687} --- !u!1 &3918594455428278211 GameObject: m_ObjectHideFlags: 0 @@ -8462,6 +8918,416 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 +--- !u!1 &5118899937337152433 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4889907661646369442} + - component: {fileID: 5514505349583842015} + - component: {fileID: 6420849316747446380} + - component: {fileID: 5679600384812518434} + m_Layer: 5 + m_Name: BumperRButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4889907661646369442 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5118899937337152433} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7255665256487633075} + m_Father: {fileID: 5723638281752444631} + 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: 52, y: 0} + m_SizeDelta: {x: 80, y: 28} + m_Pivot: {x: 0, y: 0.5} +--- !u!222 &5514505349583842015 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5118899937337152433} + m_CullTransparentMesh: 1 +--- !u!114 &6420849316747446380 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5118899937337152433} + 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: 77703dfffd29ca6439338d6adfc62c9b, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 3 +--- !u!114 &5679600384812518434 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5118899937337152433} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 6420849316747446380} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 3918594455367347236} + m_TargetAssemblyTypeName: HeavenStudio.Editor.ControllerSettings, Assembly-CSharp + m_MethodName: StartBindSingle + m_Mode: 3 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 4 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!1 &5220116078424018553 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7427129177188129510} + - component: {fileID: 1699807218636639781} + - component: {fileID: 4118707121199419495} + m_Layer: 5 + m_Name: M2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7427129177188129510 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5220116078424018553} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5822187922471854289} + 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 &1699807218636639781 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5220116078424018553} + m_CullTransparentMesh: 1 +--- !u!114 &4118707121199419495 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5220116078424018553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: 'Mouse2 + +' + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 4810e200fa0cb24438bac52343d7674b, type: 2} + m_sharedMaterial: {fileID: 2100000, guid: 6d4610587e293f74ca2b71ec1cf59da3, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 14 + m_fontSizeBase: 14 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 0 + m_wordWrappingRatios: 0.4 + m_overflowMode: 1 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &5257553548095401346 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7255665256487633075} + - component: {fileID: 3617747558085838789} + - component: {fileID: 7496553413986110838} + m_Layer: 5 + m_Name: R + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7255665256487633075 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5257553548095401346} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4889907661646369442} + 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 &3617747558085838789 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5257553548095401346} + m_CullTransparentMesh: 1 +--- !u!114 &7496553413986110838 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5257553548095401346} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: R + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 4810e200fa0cb24438bac52343d7674b, type: 2} + m_sharedMaterial: {fileID: 2100000, guid: 6d4610587e293f74ca2b71ec1cf59da3, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 14 + m_fontSizeBase: 14 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 0 + m_wordWrappingRatios: 0.4 + m_overflowMode: 1 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} --- !u!1 &5319286242203347726 GameObject: m_ObjectHideFlags: 0 @@ -8691,6 +9557,145 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 +--- !u!1 &5748095625485645192 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 520306945438403777} + - component: {fileID: 7210908499483939372} + - component: {fileID: 30726950662053239} + m_Layer: 5 + m_Name: M1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &520306945438403777 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5748095625485645192} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8919347587787106965} + 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 &7210908499483939372 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5748095625485645192} + m_CullTransparentMesh: 1 +--- !u!114 &30726950662053239 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5748095625485645192} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: 'Mouse1 + +' + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 4810e200fa0cb24438bac52343d7674b, type: 2} + m_sharedMaterial: {fileID: 2100000, guid: 6d4610587e293f74ca2b71ec1cf59da3, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 14 + m_fontSizeBase: 14 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 0 + m_wordWrappingRatios: 0.4 + m_overflowMode: 1 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} --- !u!1 &5752296308163427705 GameObject: m_ObjectHideFlags: 0 @@ -8854,6 +9859,351 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: eventParameterManager: {fileID: 0} +--- !u!1 &6150435888175704567 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6956898500153539365} + - component: {fileID: 2352497005831598882} + - component: {fileID: 3531963194143639705} + m_Layer: 5 + m_Name: Pointer2Icn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6956898500153539365 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6150435888175704567} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5822187922471854289} + m_Father: {fileID: 5959830605601995890} + 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: 80, y: 0} + m_SizeDelta: {x: 132, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2352497005831598882 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6150435888175704567} + m_CullTransparentMesh: 1 +--- !u!114 &3531963194143639705 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6150435888175704567} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 2100000, guid: 0035f9ee73a3659488de4969ea48d035, type: 2} + 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: 5518843884416884346, guid: 149c162f840b9e9428b96653dd8e40ba, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6303901910079866509 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5822187922471854289} + - component: {fileID: 9140358423679328567} + - component: {fileID: 4023891894465431000} + - component: {fileID: 9105348507779127964} + m_Layer: 5 + m_Name: Pointer2Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5822187922471854289 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6303901910079866509} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7427129177188129510} + m_Father: {fileID: 6956898500153539365} + 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: 80, y: 28} + m_Pivot: {x: 1, y: 0.5} +--- !u!222 &9140358423679328567 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6303901910079866509} + m_CullTransparentMesh: 1 +--- !u!114 &4023891894465431000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6303901910079866509} + 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: 77703dfffd29ca6439338d6adfc62c9b, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 3 +--- !u!114 &9105348507779127964 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6303901910079866509} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 4023891894465431000} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 3918594455367347236} + m_TargetAssemblyTypeName: HeavenStudio.Editor.ControllerSettings, Assembly-CSharp + m_MethodName: StartBindSingle + m_Mode: 3 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 2 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!1 &6489606290258874114 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8919347587787106965} + - component: {fileID: 8202731862500428108} + - component: {fileID: 1134193950197788} + - component: {fileID: 5017250687463795899} + m_Layer: 5 + m_Name: Pointer1Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8919347587787106965 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6489606290258874114} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 520306945438403777} + m_Father: {fileID: 3308513760662390593} + 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: 80, y: 28} + m_Pivot: {x: 0, y: 0.5} +--- !u!222 &8202731862500428108 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6489606290258874114} + m_CullTransparentMesh: 1 +--- !u!114 &1134193950197788 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6489606290258874114} + 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: 77703dfffd29ca6439338d6adfc62c9b, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 3 +--- !u!114 &5017250687463795899 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6489606290258874114} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1134193950197788} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 3918594455367347236} + m_TargetAssemblyTypeName: HeavenStudio.Editor.ControllerSettings, Assembly-CSharp + m_MethodName: StartBindSingle + m_Mode: 3 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 1 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 --- !u!1 &6836948950959881497 GameObject: m_ObjectHideFlags: 0 @@ -9576,6 +10926,140 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &7292181811998977187 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6281455900561741999} + - component: {fileID: 1497495217611795385} + - component: {fileID: 6103692376260728633} + - component: {fileID: 8360307592121364335} + m_Layer: 5 + m_Name: PauseButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6281455900561741999 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7292181811998977187} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7348421967845561183} + m_Father: {fileID: 3655317729823433842} + 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: 52, y: 0} + m_SizeDelta: {x: 80, y: 28} + m_Pivot: {x: 0, y: 0.5} +--- !u!222 &1497495217611795385 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7292181811998977187} + m_CullTransparentMesh: 1 +--- !u!114 &6103692376260728633 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7292181811998977187} + 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: 77703dfffd29ca6439338d6adfc62c9b, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 3 +--- !u!114 &8360307592121364335 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7292181811998977187} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 6103692376260728633} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 3918594455367347236} + m_TargetAssemblyTypeName: HeavenStudio.Editor.ControllerSettings, Assembly-CSharp + m_MethodName: StartBindSingle + m_Mode: 3 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 5 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 --- !u!1 &7345507372953376622 GameObject: m_ObjectHideFlags: 0 @@ -9822,7 +11306,7 @@ MonoBehaviour: m_PressedTrigger: Pressed m_SelectedTrigger: Selected m_DisabledTrigger: Disabled - m_Interactable: 1 + m_Interactable: 0 m_TargetGraphic: {fileID: 6753809477161560534} m_Template: {fileID: 8162890737611805652} m_CaptionText: {fileID: 7666680245153248921} @@ -9887,6 +11371,143 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 28} m_Pivot: {x: 0.5, y: 1} +--- !u!1 &8016441744968938499 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6811369755946900347} + - component: {fileID: 2222570769004403682} + - component: {fileID: 6811614153817356371} + m_Layer: 5 + m_Name: L + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6811369755946900347 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8016441744968938499} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4172435743589464438} + 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 &2222570769004403682 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8016441744968938499} + m_CullTransparentMesh: 1 +--- !u!114 &6811614153817356371 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8016441744968938499} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: L + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 4810e200fa0cb24438bac52343d7674b, type: 2} + m_sharedMaterial: {fileID: 2100000, guid: 6d4610587e293f74ca2b71ec1cf59da3, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 14 + m_fontSizeBase: 14 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 0 + m_wordWrappingRatios: 0.4 + m_overflowMode: 1 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} --- !u!1 &8047113938397001730 GameObject: m_ObjectHideFlags: 0 @@ -10055,8 +11676,10 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 5409993750764167790} + - {fileID: 3720722590260798810} - {fileID: 4793950890431788211} - {fileID: 414769058537447241} + - {fileID: 5959830605601995890} m_Father: {fileID: 3918594456218978263} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -10233,6 +11856,83 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 +--- !u!1 &8586788618110667262 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3308513760662390593} + - component: {fileID: 5367851225010177527} + - component: {fileID: 4425694437033233735} + m_Layer: 5 + m_Name: Pointer1Icn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3308513760662390593 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8586788618110667262} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8919347587787106965} + m_Father: {fileID: 3720722590260798810} + 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: -80, y: 0} + m_SizeDelta: {x: 132, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5367851225010177527 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8586788618110667262} + m_CullTransparentMesh: 1 +--- !u!114 &4425694437033233735 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8586788618110667262} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 2100000, guid: 0035f9ee73a3659488de4969ea48d035, type: 2} + 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: 3724681018647327355, guid: 149c162f840b9e9428b96653dd8e40ba, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!1 &8613303898747138299 GameObject: m_ObjectHideFlags: 0 @@ -10563,3 +12263,214 @@ MonoBehaviour: m_ChildScaleWidth: 0 m_ChildScaleHeight: 0 m_ReverseArrangement: 0 +--- !u!1 &9110629484717367561 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4836245595930069381} + - component: {fileID: 8266036923228107967} + - component: {fileID: 6929710045521859251} + m_Layer: 5 + m_Name: BumperLIcn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4836245595930069381 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9110629484717367561} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4172435743589464438} + m_Father: {fileID: 3720722590260798810} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -12, y: -12} + m_SizeDelta: {x: 50, y: 50} + m_Pivot: {x: 1, y: 1} +--- !u!222 &8266036923228107967 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9110629484717367561} + m_CullTransparentMesh: 1 +--- !u!114 &6929710045521859251 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9110629484717367561} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 2100000, guid: 0035f9ee73a3659488de4969ea48d035, type: 2} + 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: -598839719690993186, guid: 149c162f840b9e9428b96653dd8e40ba, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &9177651695587598607 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4172435743589464438} + - component: {fileID: 6559520144489713766} + - component: {fileID: 5760349248993267422} + - component: {fileID: 5421166897708217523} + m_Layer: 5 + m_Name: BumperLButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4172435743589464438 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9177651695587598607} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6811369755946900347} + m_Father: {fileID: 4836245595930069381} + 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: -52, y: 0} + m_SizeDelta: {x: 80, y: 28} + m_Pivot: {x: 1, y: 0.5} +--- !u!222 &6559520144489713766 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9177651695587598607} + m_CullTransparentMesh: 1 +--- !u!114 &5760349248993267422 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9177651695587598607} + 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: 77703dfffd29ca6439338d6adfc62c9b, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 3 +--- !u!114 &5421166897708217523 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9177651695587598607} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 5760349248993267422} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 3918594455367347236} + m_TargetAssemblyTypeName: HeavenStudio.Editor.ControllerSettings, Assembly-CSharp + m_MethodName: StartBindSingle + m_Mode: 3 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 3 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 diff --git a/Assets/Scripts/Games/DogNinja/DogNinja.cs b/Assets/Scripts/Games/DogNinja/DogNinja.cs index 9105eb876..1d39b3ee2 100644 --- a/Assets/Scripts/Games/DogNinja/DogNinja.cs +++ b/Assets/Scripts/Games/DogNinja/DogNinja.cs @@ -199,7 +199,7 @@ namespace HeavenStudio.Games DogAnim.SetBool("needPrepare", true); } - if (PlayerInput.Pressed(true) && !IsExpectingInputNow(InputType.STANDARD_DOWN)) + if ((PlayerInput.Pressed() || PlayerInput.GetAnyDirectionDown()) && !IsExpectingInputNow(InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN)) { System.Random rd = new System.Random(); string slice; diff --git a/Assets/Scripts/Games/FirstContact/FirstContact.cs b/Assets/Scripts/Games/FirstContact/FirstContact.cs index 671df7dcc..553fe2abf 100644 --- a/Assets/Scripts/Games/FirstContact/FirstContact.cs +++ b/Assets/Scripts/Games/FirstContact/FirstContact.cs @@ -299,7 +299,7 @@ namespace HeavenStudio.Games lastReportedBeat = Math.Round(Conductor.instance.songPositionInBeatsAsDouble); } - if (PlayerInput.Pressed(true) && !IsExpectingInputNow(InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN)) + if ((PlayerInput.Pressed() || PlayerInput.GetAnyDirectionDown()) && !IsExpectingInputNow(InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN)) { translator.DoScaledAnimationAsync("translator_eh", 0.5f); if (isSpeaking) diff --git a/Assets/Scripts/Games/FirstContact/Translator.cs b/Assets/Scripts/Games/FirstContact/Translator.cs index 8bedb9d09..72217d9e5 100644 --- a/Assets/Scripts/Games/FirstContact/Translator.cs +++ b/Assets/Scripts/Games/FirstContact/Translator.cs @@ -22,11 +22,6 @@ namespace HeavenStudio.Games.Scripts_FirstContact private void Update() { - ////IF YOU WANT TO PLAY NOTES ANYTIME W/O CONSTRAINTS - //if (PlayerInput.Pressed(true) && !game.isSpeaking) - //{ - // successTranslation(true); - //} } public void SuccessTranslation(bool ace) diff --git a/Assets/Scripts/Games/KarateMan/KarateManJoe.cs b/Assets/Scripts/Games/KarateMan/KarateManJoe.cs index e4df90d19..ae59caaf3 100644 --- a/Assets/Scripts/Games/KarateMan/KarateManJoe.cs +++ b/Assets/Scripts/Games/KarateMan/KarateManJoe.cs @@ -135,7 +135,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan } } - if (PlayerInput.Pressed(true) && !inSpecial) + if ((PlayerInput.Pressed() || PlayerInput.GetAnyDirectionDown()) && !inSpecial) { if (!KarateMan.instance.IsExpectingInputNow(InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN)) { @@ -164,7 +164,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan } } - if ((!GameManager.instance.autoplay) && (PlayerInput.PressedUp(true) && !PlayerInput.Pressing(true))) + if ((!GameManager.instance.autoplay) && (PlayerInput.PressedUp() || PlayerInput.GetAnyDirectionUp()) && !(PlayerInput.Pressing() || PlayerInput.GetAnyDirection())) { if (wantKick) { diff --git a/Assets/Scripts/Games/MarchingOrders/MarchingOrders.cs b/Assets/Scripts/Games/MarchingOrders/MarchingOrders.cs index 66c0cfb20..04eda3b39 100644 --- a/Assets/Scripts/Games/MarchingOrders/MarchingOrders.cs +++ b/Assets/Scripts/Games/MarchingOrders/MarchingOrders.cs @@ -312,12 +312,12 @@ namespace HeavenStudio.Games CadetPlayer.DoScaledAnimationAsync("Halt", 0.5f); } - if (PlayerInput.Pressed(true) && PlayerInput.GetSpecificDirection(PlayerInput.LEFT) && !IsExpectingInputNow(InputType.DIRECTION_LEFT_DOWN)) { + if (PlayerInput.GetSpecificDirectionDown((int) InputSystem.InputController.InputDirection.Left) && !IsExpectingInputNow(InputType.DIRECTION_LEFT_DOWN)) { Miss(); CadetHeadPlayer.DoScaledAnimationAsync("FaceL", 0.5f); } - if (PlayerInput.Pressed(true) && PlayerInput.GetSpecificDirection(PlayerInput.RIGHT) && !IsExpectingInputNow(InputType.DIRECTION_RIGHT_DOWN)) { + if (PlayerInput.GetSpecificDirectionDown((int) InputSystem.InputController.InputDirection.Right) && !IsExpectingInputNow(InputType.DIRECTION_RIGHT_DOWN)) { Miss(); CadetHeadPlayer.DoScaledAnimationAsync("FaceR", 0.5f); } diff --git a/Assets/Scripts/Games/MeatGrinder/MeatGrinder.cs b/Assets/Scripts/Games/MeatGrinder/MeatGrinder.cs index 6b35716cd..fdfddc0e4 100644 --- a/Assets/Scripts/Games/MeatGrinder/MeatGrinder.cs +++ b/Assets/Scripts/Games/MeatGrinder/MeatGrinder.cs @@ -124,7 +124,7 @@ namespace HeavenStudio.Games private void Update() { - if (PlayerInput.Pressed(true) && (!IsExpectingInputNow(InputType.STANDARD_DOWN) || !IsExpectingInputNow(InputType.DIRECTION_DOWN))) { + if ((PlayerInput.Pressed() || PlayerInput.GetAnyDirectionDown()) && (!IsExpectingInputNow(InputType.STANDARD_DOWN) || !IsExpectingInputNow(InputType.DIRECTION_DOWN))) { TackAnim.DoScaledAnimationAsync("TackEmptyHit", 0.5f); TackAnim.SetBool("tackMeated", false); SoundByte.PlayOneShotGame(sfxName+"whiff"); diff --git a/Assets/Scripts/Games/MunchyMonk/MunchyMonk.cs b/Assets/Scripts/Games/MunchyMonk/MunchyMonk.cs index bc832e9ea..50fe29220 100644 --- a/Assets/Scripts/Games/MunchyMonk/MunchyMonk.cs +++ b/Assets/Scripts/Games/MunchyMonk/MunchyMonk.cs @@ -278,8 +278,8 @@ namespace HeavenStudio.Games private void Update() { // input stuff - if (PlayerInput.Pressed(true) && !IsExpectingInputNow(InputType.STANDARD_DOWN)) { - Debug.Log("ooops" + PlayerInput.Pressed(true)); + if (PlayerInput.Pressed() && !IsExpectingInputNow(InputType.STANDARD_DOWN)) { + Debug.Log("ooops" + PlayerInput.Pressed()); MonkArmsAnim.DoScaledAnimationAsync("WristSlap", 0.5f); SoundByte.PlayOneShotGame(sfxName+"slap"); isStaring = false; diff --git a/Assets/Scripts/Games/OctopusMachine/Octopus.cs b/Assets/Scripts/Games/OctopusMachine/Octopus.cs index b210ef72d..ee26a6db4 100644 --- a/Assets/Scripts/Games/OctopusMachine/Octopus.cs +++ b/Assets/Scripts/Games/OctopusMachine/Octopus.cs @@ -47,7 +47,7 @@ namespace HeavenStudio.Games.Scripts_OctopusMachine } if (PlayerInput.PressedUp() && !game.IsExpectingInputNow(InputType.STANDARD_UP)) { - OctoAction(PlayerInput.Pressing(true) ? "Pop" : "Release"); + OctoAction(PlayerInput.Pressing() ? "Pop" : "Release"); SoundByte.PlayOneShotGame("nearMiss"); game.hasMissed = true; } diff --git a/Assets/Scripts/Games/RhythmTweezers/LongHair.cs b/Assets/Scripts/Games/RhythmTweezers/LongHair.cs index 936584d91..f919d715d 100644 --- a/Assets/Scripts/Games/RhythmTweezers/LongHair.cs +++ b/Assets/Scripts/Games/RhythmTweezers/LongHair.cs @@ -46,7 +46,7 @@ namespace HeavenStudio.Games.Scripts_RhythmTweezers float normalizedBeat = Conductor.instance.GetPositionFromBeat(inputBeat, 0.5f); anim.Play("LoopPull", 0, normalizedBeat); tweezers.anim.Play("Tweezers_LongPluck", 0, normalizedBeat); - if (!game.IsExpectingInputNow(InputType.STANDARD_UP | InputType.DIRECTION_DOWN_UP) && PlayerInput.PressedUp(true) && normalizedBeat < 1f) + if (!game.IsExpectingInputNow(InputType.STANDARD_UP | InputType.DIRECTION_DOWN_UP) && (PlayerInput.PressedUp() || PlayerInput.GetAnyDirectionUp()) && normalizedBeat < 1f) { EndEarly(); endEvent.Disable(); diff --git a/Assets/Scripts/Games/RhythmTweezers/Tweezers.cs b/Assets/Scripts/Games/RhythmTweezers/Tweezers.cs index a46dcc5bb..eb3199d2c 100644 --- a/Assets/Scripts/Games/RhythmTweezers/Tweezers.cs +++ b/Assets/Scripts/Games/RhythmTweezers/Tweezers.cs @@ -64,7 +64,7 @@ namespace HeavenStudio.Games.Scripts_RhythmTweezers private void LateUpdate() { - if (PlayerInput.Pressed(true)) + if (PlayerInput.Pressed() || PlayerInput.GetAnyDirectionDown()) { if (!pluckingThisFrame) // Did you do a successful pluck earlier in the frame? { diff --git a/Assets/Scripts/Games/WizardsWaltz/Wizard.cs b/Assets/Scripts/Games/WizardsWaltz/Wizard.cs index f0af89a35..2e6273575 100644 --- a/Assets/Scripts/Games/WizardsWaltz/Wizard.cs +++ b/Assets/Scripts/Games/WizardsWaltz/Wizard.cs @@ -40,7 +40,7 @@ namespace HeavenStudio.Games.Scripts_WizardsWaltz private void LateUpdate() { - if (PlayerInput.Pressed(true)) + if (PlayerInput.Pressed() || PlayerInput.GetAnyDirectionDown()) { animator.Play("Magic", 0, 0); SoundByte.PlayOneShotGame("wizardsWaltz/wand"); diff --git a/Assets/Scripts/InputSystem/ControllerTypes/InputJoyshock.cs b/Assets/Scripts/InputSystem/ControllerTypes/InputJoyshock.cs index 87552ec39..370ff8243 100644 --- a/Assets/Scripts/InputSystem/ControllerTypes/InputJoyshock.cs +++ b/Assets/Scripts/InputSystem/ControllerTypes/InputJoyshock.cs @@ -662,7 +662,7 @@ namespace HeavenStudio.InputSystem return -1; } - public override bool GetAction(int button) + public override bool GetAction(ControlStyles style, int button) { if (button == -1) { return false; } if (otherHalf != null) @@ -672,10 +672,10 @@ namespace HeavenStudio.InputSystem return actionStates[button].pressed; } - public override bool GetActionDown(int button, out double dt) + public override bool GetActionDown(ControlStyles style, int button, out double dt) { if (button == -1) { dt = 0; return false; } - if (otherHalf != null && otherHalf.GetActionDown(button, out dt)) + if (otherHalf != null && otherHalf.GetActionDown(style, button, out dt)) { return true; } @@ -683,10 +683,10 @@ namespace HeavenStudio.InputSystem return actionStates[button].pressed && actionStates[button].isDelta; } - public override bool GetActionUp(int button, out double dt) + public override bool GetActionUp(ControlStyles style, int button, out double dt) { if (button == -1) { dt = 0; return false; } - if (otherHalf != null && otherHalf.GetActionUp(button, out dt)) + if (otherHalf != null && otherHalf.GetActionUp(style, button, out dt)) { return true; } @@ -764,9 +764,9 @@ namespace HeavenStudio.InputSystem } if (otherHalf != null) { - return GetAction(bt) || BitwiseUtils.WantCurrent(otherHalf.directionStateCurrent, 1 << (int)direction) || BitwiseUtils.WantCurrent(directionStateCurrent, 1 << (int)direction); + return GetAction(ControlStyles.Pad, bt) || BitwiseUtils.WantCurrent(otherHalf.directionStateCurrent, 1 << (int)direction) || BitwiseUtils.WantCurrent(directionStateCurrent, 1 << (int)direction); } - return GetAction(bt) || BitwiseUtils.WantCurrent(directionStateCurrent, 1 << (int)direction); + return GetAction(ControlStyles.Pad, bt) || BitwiseUtils.WantCurrent(directionStateCurrent, 1 << (int)direction); } public override bool GetHatDirectionDown(InputDirection direction, out double dt) @@ -790,7 +790,7 @@ namespace HeavenStudio.InputSystem dt = 0; return false; } - bool btbool = GetActionDown(bt, out dt); + bool btbool = GetActionDown(ControlStyles.Pad, bt, out dt); if (!btbool) dt = 0; if (otherHalf != null) { @@ -820,7 +820,7 @@ namespace HeavenStudio.InputSystem dt = 0; return false; } - bool btbool = GetActionUp(bt, out dt); + bool btbool = GetActionUp(ControlStyles.Pad, bt, out dt); if (!btbool) dt = 0; if (otherHalf != null) { @@ -966,5 +966,68 @@ namespace HeavenStudio.InputSystem { return otherHalf; } + + public override bool GetFlick(out double dt, out InputDirection direction) + { + dt = 0; + direction = InputDirection.Up; + return false; + } + + public override bool GetSwipe(out double dt, out InputDirection direction) + { + dt = 0; + direction = InputDirection.Up; + return false; + } + + public override void SetMaterialProperties(Material m) + { + Color colour; + switch (GetDeviceName()) + { + case "Joy-Con (L)": + case "Joy-Con (R)": + m.SetColor("_BodyColor", GetBodyColor()); + m.SetColor("_BtnColor", GetButtonColor()); + m.SetColor("_LGripColor", ColorUtility.TryParseHtmlString("#2F353A", out colour) ? colour : Color.white); + m.SetColor("_RGripColor", ColorUtility.TryParseHtmlString("#2F353A", out colour) ? colour : Color.white); + break; + case "Joy-Con Pair": + m.SetColor("_BodyColor", splitType == SplitRight ? GetButtonColor() : GetOtherHalf().GetButtonColor()); + m.SetColor("_BtnColor", splitType == SplitLeft ? GetButtonColor() : GetOtherHalf().GetButtonColor()); + m.SetColor("_LGripColor", GetLeftGripColor()); + m.SetColor("_RGripColor", GetRightGripColor()); + break; + case "DualShock 4": + m.SetColor("_BodyColor", ColorUtility.TryParseHtmlString("#E1E2E4", out colour) ? colour : Color.white); + m.SetColor("_BtnColor", ColorUtility.TryParseHtmlString("#414246", out colour) ? colour : Color.white); + m.SetColor("_LGripColor", GetLightbarColour()); + m.SetColor("_RGripColor", GetLightbarColour()); + break; + case "DualSense": + m.SetColor("_BodyColor", ColorUtility.TryParseHtmlString("#DEE0EB", out colour) ? colour : Color.white); + m.SetColor("_BtnColor", ColorUtility.TryParseHtmlString("#272D39", out colour) ? colour : Color.white); + m.SetColor("_LGripColor", GetLightbarColour()); + m.SetColor("_RGripColor", GetLightbarColour()); + break; + default: + m.SetColor("_BodyColor", GetBodyColor()); + m.SetColor("_BtnColor", GetButtonColor()); + m.SetColor("_LGripColor", GetLeftGripColor()); + m.SetColor("_RGripColor", GetRightGripColor()); + break; + } + } + + public override bool GetCurrentStyleSupported() + { + return PlayerInput.CurrentControlStyle is ControlStyles.Pad; // or ControlStyles.Baton + } + + public override ControlStyles GetDefaultStyle() + { + return ControlStyles.Pad; + } } } \ No newline at end of file diff --git a/Assets/Scripts/InputSystem/ControllerTypes/InputKeyboard.cs b/Assets/Scripts/InputSystem/ControllerTypes/InputKeyboard.cs index ae39f6bf7..1129cc098 100644 --- a/Assets/Scripts/InputSystem/ControllerTypes/InputKeyboard.cs +++ b/Assets/Scripts/InputSystem/ControllerTypes/InputKeyboard.cs @@ -38,7 +38,8 @@ namespace HeavenStudio.InputSystem .Where(k => ((int)k < (int)KeyCode.Mouse0)) .ToArray(); - static ControlBindings defaultBindings { + static ControlBindings defaultBindings + { get { return new ControlBindings() @@ -75,10 +76,10 @@ namespace HeavenStudio.InputSystem } public override void OnSelected() - { + { } - + public override string GetDeviceName() { return "Keyboard"; @@ -157,20 +158,23 @@ namespace HeavenStudio.InputSystem return -1; } - public override bool GetAction(int button) + public override bool GetAction(ControlStyles style, int button) { + if (button < 0) return false; return Input.GetKey((KeyCode)currentBindings.Pad[button]); } - public override bool GetActionDown(int button, out double dt) + public override bool GetActionDown(ControlStyles style, int button, out double dt) { dt = 0; + if (button < 0) return false; return Input.GetKeyDown((KeyCode)currentBindings.Pad[button]); } - public override bool GetActionUp(int button, out double dt) + public override bool GetActionUp(ControlStyles style, int button, out double dt) { dt = 0; + if (button < 0) return false; return Input.GetKeyUp((KeyCode)currentBindings.Pad[button]); } @@ -250,12 +254,42 @@ namespace HeavenStudio.InputSystem this.playerNum = null; return; } - this.playerNum = (int) playerNum; + this.playerNum = (int)playerNum; } public override int? GetPlayer() { return playerNum; } + + public override bool GetFlick(out double dt, out InputDirection direction) + { + dt = 0; + direction = InputDirection.Up; + return false; + } + + public override bool GetSwipe(out double dt, out InputDirection direction) + { + dt = 0; + direction = InputDirection.Up; + return false; + } + + public override void SetMaterialProperties(Material m) + { + bool b = ColorUtility.TryParseHtmlString("#F4F4F4", out Color colour); + m.SetColor("_BodyColor", b ? colour : Color.white); + } + + public override bool GetCurrentStyleSupported() + { + return PlayerInput.CurrentControlStyle is ControlStyles.Pad; // or ControlStyles.Baton + } + + public override ControlStyles GetDefaultStyle() + { + return ControlStyles.Pad; + } } } \ No newline at end of file diff --git a/Assets/Scripts/InputSystem/ControllerTypes/InputMouse.cs b/Assets/Scripts/InputSystem/ControllerTypes/InputMouse.cs index cbf68ec5f..6c34a07ae 100644 --- a/Assets/Scripts/InputSystem/ControllerTypes/InputMouse.cs +++ b/Assets/Scripts/InputSystem/ControllerTypes/InputMouse.cs @@ -8,28 +8,25 @@ using HeavenStudio.Util; namespace HeavenStudio.InputSystem.Loaders { - namespace HeavenStudio.InputSystem.Loaders + public static class InputMouseInitializer { - public static class InputMouseInitializer + [LoadOrder(1)] + public static InputController[] Initialize() { - [LoadOrder(1)] - public static InputController[] Initialize() - { - PlayerInput.PlayerInputRefresh.Add(Refresh); + PlayerInput.PlayerInputRefresh.Add(Refresh); - InputMouse mouse = new InputMouse(); - mouse.SetPlayer(null); - mouse.InitializeController(); - return new InputController[] { mouse }; - } + InputMouse mouse = new InputMouse(); + mouse.SetPlayer(null); + mouse.InitializeController(); + return new InputController[] { mouse }; + } - public static InputController[] Refresh() - { - InputMouse mouse = new InputMouse(); - mouse.SetPlayer(null); - mouse.InitializeController(); - return new InputController[] { mouse }; - } + public static InputController[] Refresh() + { + InputMouse mouse = new InputMouse(); + mouse.SetPlayer(null); + mouse.InitializeController(); + return new InputController[] { mouse }; } } } @@ -38,12 +35,16 @@ namespace HeavenStudio.InputSystem { public class InputMouse : InputController { + const double FlickMarginTime = 0.1; + const double BigMoveMarginRate = 1.25; + private static readonly KeyCode[] keyCodes = Enum.GetValues(typeof(KeyCode)) .Cast() .Where(k => ((int)k <= (int)KeyCode.Mouse6)) .ToArray(); - static ControlBindings defaultBindings { + static ControlBindings defaultBindings + { get { return new ControlBindings() @@ -61,20 +62,46 @@ namespace HeavenStudio.InputSystem } } + static Vector3 screenBounds = Vector3.zero; + static Vector3 ScreenBounds + { + get + { + screenBounds.x = Screen.width; + screenBounds.y = Screen.height; + return screenBounds; + } + } + + Vector3 rawPointerPos, lastRawPointerPos, startPointerPos, lastDownPointerPos, lastUpPointerPos; + Vector3 deltaPointerPos, lastDeltaPointerPos; + double timeMoveChange, timeDirectionChange; + byte dirLeftRight, dirUpDown; + public override void InitializeController() { + LoadBindings(); } public override void UpdateState() { // Update the state of the controller + lastRawPointerPos = rawPointerPos; + lastDeltaPointerPos = deltaPointerPos; + rawPointerPos = Input.mousePosition; + deltaPointerPos = rawPointerPos - lastRawPointerPos; + + if (GetAction(ControlStyles.Touch, 0)) + { + Debug.Log(deltaPointerPos.normalized); + } } public override void OnSelected() - { + { } - + public override string GetDeviceName() { return "Mouse"; @@ -82,7 +109,7 @@ namespace HeavenStudio.InputSystem public override string[] GetButtonNames() { - string[] names = new string[(int)KeyCode.Mouse6]; + string[] names = new string[(int)KeyCode.Mouse6 + 1]; for (int i = 0; i < keyCodes.Length; i++) { names[(int)keyCodes[i]] = keyCodes[i].ToString(); @@ -97,7 +124,7 @@ namespace HeavenStudio.InputSystem public override bool GetIsConnected() { - return true; + return Input.mousePresent; } public override bool GetIsPoorConnection() @@ -134,7 +161,7 @@ namespace HeavenStudio.InputSystem { if (Input.anyKeyDown) { - for (KeyCode i = keyCodes[1]; i <= KeyCode.Menu; i++) + for (KeyCode i = keyCodes[1]; i <= KeyCode.Mouse6; i++) { if (Input.GetKeyDown(i)) return (int)i; @@ -153,21 +180,95 @@ namespace HeavenStudio.InputSystem return -1; } - public override bool GetAction(int button) + public override bool GetAction(ControlStyles style, int button) { - return Input.GetKey((KeyCode)currentBindings.Pad[button]); + if (button < 0) return false; + if (button is 0 or 1 or 2) + { + bool bt = Input.GetKey((KeyCode)currentBindings.Touch[1]) || Input.GetKey((KeyCode)currentBindings.Touch[2]); + switch (button) + { + case 0: + return bt; + case 1: + if (bt && rawPointerPos.x <= screenBounds.x * 0.5f) + { + lastDownPointerPos = rawPointerPos; + return true; + } + return false; + case 2: + if (bt && rawPointerPos.x >= screenBounds.x * 0.5f) + { + lastDownPointerPos = rawPointerPos; + return true; + } + return false; + } + } + return Input.GetKey((KeyCode)currentBindings.Touch[button]); } - public override bool GetActionDown(int button, out double dt) + public override bool GetActionDown(ControlStyles style, int button, out double dt) { dt = 0; - return Input.GetKeyDown((KeyCode)currentBindings.Pad[button]); + if (button < 0) return false; + if (button is 0 or 1 or 2) + { + bool bt = Input.GetKeyDown((KeyCode)currentBindings.Touch[1]) || Input.GetKeyDown((KeyCode)currentBindings.Touch[2]); + switch (button) + { + case 0: + return bt; + case 1: + if (bt && rawPointerPos.x <= screenBounds.x * 0.5f) + { + lastDownPointerPos = rawPointerPos; + startPointerPos = rawPointerPos; + return true; + } + return false; + case 2: + if (bt && rawPointerPos.x >= screenBounds.x * 0.5f) + { + lastDownPointerPos = rawPointerPos; + startPointerPos = rawPointerPos; + return true; + } + return false; + } + } + return Input.GetKeyDown((KeyCode)currentBindings.Touch[button]); } - public override bool GetActionUp(int button, out double dt) + public override bool GetActionUp(ControlStyles style, int button, out double dt) { dt = 0; - return Input.GetKeyUp((KeyCode)currentBindings.Pad[button]); + if (button < 0) return false; + if (button is 0 or 1 or 2) + { + bool bt = Input.GetKeyUp((KeyCode)currentBindings.Touch[1]) || Input.GetKeyUp((KeyCode)currentBindings.Touch[2]); + switch (button) + { + case 0: + return bt; + case 1: + if (bt && rawPointerPos.x <= screenBounds.x * 0.5f) + { + lastUpPointerPos = rawPointerPos; + return true; + } + return false; + case 2: + if (bt && rawPointerPos.x >= screenBounds.x * 0.5f) + { + lastUpPointerPos = rawPointerPos; + return true; + } + return false; + } + } + return Input.GetKeyUp((KeyCode)currentBindings.Touch[button]); } public override float GetAxis(InputAxis axis) @@ -246,12 +347,42 @@ namespace HeavenStudio.InputSystem this.playerNum = null; return; } - this.playerNum = (int) playerNum; + this.playerNum = (int)playerNum; } public override int? GetPlayer() { return playerNum; } + + public override bool GetFlick(out double dt, out InputDirection direction) + { + dt = 0; + direction = InputDirection.Up; + return false; + } + + public override bool GetSwipe(out double dt, out InputDirection direction) + { + dt = 0; + direction = InputDirection.Up; + return false; + } + + public override void SetMaterialProperties(Material m) + { + bool b = ColorUtility.TryParseHtmlString("#F4F4F4", out Color colour); + m.SetColor("_BodyColor", b ? colour : Color.white); + } + + public override bool GetCurrentStyleSupported() + { + return PlayerInput.CurrentControlStyle is ControlStyles.Touch; + } + + public override ControlStyles GetDefaultStyle() + { + return ControlStyles.Touch; + } } } \ No newline at end of file diff --git a/Assets/Scripts/InputSystem/InputController.cs b/Assets/Scripts/InputSystem/InputController.cs index ed68ec876..1b2ec6ba2 100644 --- a/Assets/Scripts/InputSystem/InputController.cs +++ b/Assets/Scripts/InputSystem/InputController.cs @@ -23,7 +23,7 @@ namespace HeavenStudio.InputSystem TouchpadY = 7 } - public enum InputVector: int + public enum InputVector : int { LStick = 0, RStick = 1, @@ -46,31 +46,31 @@ namespace HeavenStudio.InputSystem public enum InputFeatures { //readable properties - Readable_ShellColour = 1 << 0, - Readable_ButtonColour = 1 << 1, - Readable_LeftGripColour = 1 << 2, - Readable_RightGripColour = 1 << 3, - Readable_AnalogueTriggers = 1 << 4, - Readable_StringInput = 1 << 5, - Readable_Pointer = 1 << 6, - Readable_MotionSensor = 1 << 7, + Readable_ShellColour = 1 << 0, + Readable_ButtonColour = 1 << 1, + Readable_LeftGripColour = 1 << 2, + Readable_RightGripColour = 1 << 3, + Readable_AnalogueTriggers = 1 << 4, + Readable_StringInput = 1 << 5, + Readable_Pointer = 1 << 6, + Readable_MotionSensor = 1 << 7, //writable properties - Writable_PlayerLED = 1 << 8, - Writable_LightBar = 1 << 9, - Writable_Chroma = 1 << 10, - Writable_Speaker = 1 << 11, + Writable_PlayerLED = 1 << 8, + Writable_LightBar = 1 << 9, + Writable_Chroma = 1 << 10, + Writable_Speaker = 1 << 11, //other / "special" properties - Extra_SplitControllerLeft = 1 << 12, - Extra_SplitControllerRight = 1 << 13, - Extra_Rumble = 1 << 14, - Extra_HDRumble = 1 << 15, + Extra_SplitControllerLeft = 1 << 12, + Extra_SplitControllerRight = 1 << 13, + Extra_Rumble = 1 << 14, + Extra_HDRumble = 1 << 15, //supported control styles - Style_Pad = 1 << 16, - Style_Baton = 1 << 17, - Style_Touch = 1 << 18, + Style_Pad = 1 << 16, + Style_Baton = 1 << 17, + Style_Touch = 1 << 18, }; //Following enums are specific to Heaven Studio, can be removed in other applications @@ -101,7 +101,7 @@ namespace HeavenStudio.InputSystem Pause = 10, } - //FUTURE: buttons used in Heaven Studio gameplay ("Form Baton" / WiiMote Style) + //buttons used in Heaven Studio gameplay ("Form Baton" / WiiMote Style) public enum ActionsBaton : int { South = 0, //-- all these... @@ -115,23 +115,32 @@ namespace HeavenStudio.InputSystem Pause = 8, } - //FUTURE: buttons used in Heaven Studio gameplay (Touch Style) + //buttons used in Heaven Studio gameplay (Touch Style) public enum ActionsTouch : int { - Tap = 0, // flicks are handled like a motion, don't have a binding - Left = 1, // also maps to tap, but with directionality (tap the left side of the panel) - Right = 2, // also maps to tap, but with directionality (tap the right side of the panel) + // flicks and swipes are handled as motions, and don't have bindings + Tap = 0, + Left = 1, // also maps to tap, but with directionality (tap the left side of the panel). internally, maps to Pointer 1 + Right = 2, // also maps to tap, but with directionality (tap the right side of the panel). internally, maps to Pointer 2 ButtonL = 3, ButtonR = 4, Pause = 5, } + //buttons used in Heaven Studio gameplay (Move Style) + public enum ActionsMove : int + { + Button = 0, + Pause = 1, + } + [System.Serializable] public struct ControlBindings { public int[] Pad; public int[] Baton; public int[] Touch; + public int[] Move; } // FUTURE: Move Style needs to be implemented per-game (maybe implement checks for common actions?) @@ -224,7 +233,7 @@ namespace HeavenStudio.InputSystem /// /// /// - public abstract bool GetAction(int action); + public abstract bool GetAction(ControlStyles style, int action); /// /// True if the action was just pressed this Update @@ -232,7 +241,7 @@ namespace HeavenStudio.InputSystem /// /// time since the reported event, use to compensate for controller delays /// - public abstract bool GetActionDown(int action, out double dt); + public abstract bool GetActionDown(ControlStyles style, int action, out double dt); /// /// True if the action was just released this Update @@ -240,7 +249,7 @@ namespace HeavenStudio.InputSystem /// /// time since the reported event, use to compensate for controller delays /// - public abstract bool GetActionUp(int action, out double dt); + public abstract bool GetActionUp(ControlStyles style, int action, out double dt); /// /// Get the value of an analogue axis @@ -249,8 +258,17 @@ namespace HeavenStudio.InputSystem /// public abstract float GetAxis(InputAxis axis); + /// + /// Get the value of a 3d vector (2d vectors have z set to 0) + /// + /// + /// public abstract Vector3 GetVector(InputVector vector); + /// + /// Get the value of a pointer mapped to screen coordinates + /// + /// public abstract Vector2 GetPointer(); /// @@ -276,6 +294,9 @@ namespace HeavenStudio.InputSystem /// public abstract bool GetHatDirectionUp(InputDirection direction, out double dt); + public abstract bool GetFlick(out double dt, out InputDirection direction); + public abstract bool GetSwipe(out double dt, out InputDirection direction); + /// /// Sets the player number (starts at 1, set to -1 or null for no player) /// @@ -288,7 +309,9 @@ namespace HeavenStudio.InputSystem /// public abstract int? GetPlayer(); - //public abstract Sprite GetDisplayIcon(); //"big icon" for the controller in the settings menu - //public abstract Sprite GetPlaybackIcon(); //"small icon" for the controller during playback + public abstract void SetMaterialProperties(Material m); + + public abstract bool GetCurrentStyleSupported(); + public abstract ControlStyles GetDefaultStyle(); } } \ No newline at end of file diff --git a/Assets/Scripts/InputSystem/PlayerInput.cs b/Assets/Scripts/InputSystem/PlayerInput.cs index c52012ec9..d3cd0f7dd 100644 --- a/Assets/Scripts/InputSystem/PlayerInput.cs +++ b/Assets/Scripts/InputSystem/PlayerInput.cs @@ -12,9 +12,11 @@ using HeavenStudio.Games; namespace HeavenStudio.InputSystem { - public class LoadOrder : Attribute { + public class LoadOrder : Attribute + { public int Order { get; set; } - public LoadOrder(int order) { + public LoadOrder(int order) + { Order = order; } } @@ -47,7 +49,7 @@ namespace HeavenStudio public const int LEFT = 3; public static InputController.ControlStyles CurrentControlStyle = InputController.ControlStyles.Pad; - + static List inputDevices; public delegate InputController[] InputControllerInitializer(); @@ -59,14 +61,15 @@ namespace HeavenStudio public static List PlayerInputRefresh; static List loadRunners; - static void BuildLoadRunnerList() { + static void BuildLoadRunnerList() + { PlayerInputRefresh = new(); loadRunners = System.Reflection.Assembly.GetExecutingAssembly() .GetTypes() .Where(x => x.Namespace == "HeavenStudio.InputSystem.Loaders" && x.GetMethod("Initialize", BindingFlags.Public | BindingFlags.Static) != null) - .Select(t => (InputControllerInitializer) Delegate.CreateDelegate( - typeof(InputControllerInitializer), - null, + .Select(t => (InputControllerInitializer)Delegate.CreateDelegate( + typeof(InputControllerInitializer), + null, t.GetMethod("Initialize", BindingFlags.Public | BindingFlags.Static), false )) @@ -80,44 +83,49 @@ namespace HeavenStudio inputDevices = new List(); BuildLoadRunnerList(); - foreach (InputControllerInitializer runner in loadRunners) { + foreach (InputControllerInitializer runner in loadRunners) + { InputController[] controllers = runner(); - if (controllers != null) { + if (controllers != null) + { inputDevices.AddRange(controllers); } } - + return inputDevices.Count; } public static int RefreshInputControllers() { inputDevices = new List(); - if (PlayerInputRefresh != null) { - foreach (InputControllerRefresh runner in PlayerInputRefresh) { + if (PlayerInputRefresh != null) + { + foreach (InputControllerRefresh runner in PlayerInputRefresh) + { InputController[] controllers = runner(); - if (controllers != null) { + if (controllers != null) + { inputDevices.AddRange(controllers); } } } return inputDevices.Count; } - + public static int GetNumControllersConnected() { return inputDevices.Count; } - + public static List GetInputControllers() { return inputDevices; } - + public static InputController GetInputController(int player) { // Needed so Keyboard works on MacOS and Linux - #if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX +#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX inputDevices = new List(); if(inputDevices.Count < 1) { @@ -126,7 +134,7 @@ namespace HeavenStudio keyboard.InitializeController(); inputDevices.Add(keyboard); } - #endif +#endif //select input controller that has player field set to player //this will return the first controller that has that player number in the case of controller pairs (eg. Joy-Cons) //so such controllers should have a reference to the other controller in the pair @@ -139,17 +147,17 @@ namespace HeavenStudio } return null; } - + public static int GetInputControllerId(int player) { //select input controller id that has player field set to player //this will return the first controller that has that player number in the case of controller pairs (eg. Joy-Cons) //so such controllers should have a reference to the other controller in the pair //controller IDs are determined by connection order (the Keyboard is always first) - - + + // Needed so Keyboard works on MacOS and Linux - #if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX +#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX inputDevices = new List(); if(inputDevices.Count < 1) { @@ -158,7 +166,7 @@ namespace HeavenStudio keyboard.InitializeController(); inputDevices.Add(keyboard); } - #endif +#endif for (int i = 0; i < inputDevices.Count; i++) { if (inputDevices[i].GetPlayer() == player) @@ -168,11 +176,11 @@ namespace HeavenStudio } return -1; } - + public static void UpdateInputControllers() { // Needed so Keyboard works on MacOS and Linux - #if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX +#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX inputDevices = new List(); if(inputDevices.Count < 1) { @@ -181,18 +189,18 @@ namespace HeavenStudio keyboard.InitializeController(); inputDevices.Add(keyboard); } - #endif +#endif foreach (InputController i in inputDevices) { i.UpdateState(); } } - + public static void CleanUp() { PlayerInputCleanUp?.Invoke(); } - + // The autoplay isn't activated AND // The song is actually playing AND // The GameManager allows you to Input @@ -200,7 +208,7 @@ namespace HeavenStudio { return !GameManager.instance.autoplay && Conductor.instance.isPlaying && GameManager.instance.canInput; } - + /*--------------------*/ /* MAIN INPUT METHODS */ /*--------------------*/ @@ -219,82 +227,162 @@ namespace HeavenStudio } return false; } - - // BUTTONS - - public static bool Pressed(bool includeDPad = false) + + public static bool GetPadDown(InputController.ActionsPad ac, out double dt) { - bool keyDown = GetInputController(1).GetActionDown((int) InputController.ActionsPad.East, out _) || (includeDPad && GetAnyDirectionDown()); + bool a = GetInputController(1).GetActionDown(InputController.ControlStyles.Pad, (int)ac, out dt); + return a && !GameManager.instance.autoplay && Conductor.instance.isPlaying && GameManager.instance.canInput; + } + + public static bool GetPadDown(InputController.ActionsPad ac) + { + bool a = GetInputController(1).GetActionDown(InputController.ControlStyles.Pad, (int)ac, out _); + return a && !GameManager.instance.autoplay && Conductor.instance.isPlaying && GameManager.instance.canInput; + } + + public static bool GetPadUp(InputController.ActionsPad ac, out double dt) + { + bool a = GetInputController(1).GetActionUp(InputController.ControlStyles.Pad, (int)ac, out dt); + return a && !GameManager.instance.autoplay && Conductor.instance.isPlaying && GameManager.instance.canInput; + } + + public static bool GetPadUp(InputController.ActionsPad ac) + { + bool a = GetInputController(1).GetActionUp(InputController.ControlStyles.Pad, (int)ac, out _); + return a && !GameManager.instance.autoplay && Conductor.instance.isPlaying && GameManager.instance.canInput; + } + + public static bool GetPad(InputController.ActionsPad ac) + { + bool a = GetInputController(1).GetAction(InputController.ControlStyles.Pad, (int)ac); + return a && !GameManager.instance.autoplay && Conductor.instance.isPlaying && GameManager.instance.canInput; + } + + public static bool GetTouchDown(InputController.ActionsPad ac, out double dt) + { + bool a = GetInputController(1).GetActionDown(InputController.ControlStyles.Touch, (int)ac, out dt); + return a && !GameManager.instance.autoplay && Conductor.instance.isPlaying && GameManager.instance.canInput; + } + + public static bool GetTouchDown(InputController.ActionsPad ac) + { + bool a = GetInputController(1).GetActionDown(InputController.ControlStyles.Touch, (int)ac, out _); + return a && !GameManager.instance.autoplay && Conductor.instance.isPlaying && GameManager.instance.canInput; + } + + public static bool GetTouchUp(InputController.ActionsPad ac, out double dt) + { + bool a = GetInputController(1).GetActionUp(InputController.ControlStyles.Touch, (int)ac, out dt); + return a && !GameManager.instance.autoplay && Conductor.instance.isPlaying && GameManager.instance.canInput; + } + + public static bool GetTouchUp(InputController.ActionsPad ac) + { + bool a = GetInputController(1).GetActionUp(InputController.ControlStyles.Touch, (int)ac, out _); + return a && !GameManager.instance.autoplay && Conductor.instance.isPlaying && GameManager.instance.canInput; + } + + public static bool GetTouch(InputController.ActionsTouch ac) + { + bool a = GetInputController(1).GetAction(InputController.ControlStyles.Touch, (int)ac); + return a && !GameManager.instance.autoplay && Conductor.instance.isPlaying && GameManager.instance.canInput; + } + + public static bool GetSwipe() + { + bool a = false; + return a && !GameManager.instance.autoplay && Conductor.instance.isPlaying && GameManager.instance.canInput; + } + + public static bool GetFlick() + { + bool a = false; + return a && !GameManager.instance.autoplay && Conductor.instance.isPlaying && GameManager.instance.canInput; + } + + #region Deprecated Input Methods + [Obsolete("Use GetPadDown instead")] + public static bool Pressed() + { + bool keyDown = GetInputController(1).GetActionDown(InputController.ControlStyles.Pad, (int)InputController.ActionsPad.East, out _); return keyDown && !GameManager.instance.autoplay && Conductor.instance.isPlaying && GameManager.instance.canInput; } - public static bool Pressed(out double dt, bool includeDPad = false) + [Obsolete("Use GetPadDown instead")] + public static bool Pressed(out double dt) { - bool keyDown = GetInputController(1).GetActionDown((int) InputController.ActionsPad.East, out dt) || (includeDPad && GetAnyDirectionDown()); + bool keyDown = GetInputController(1).GetActionDown(InputController.ControlStyles.Pad, (int)InputController.ActionsPad.East, out dt); return keyDown && !GameManager.instance.autoplay && Conductor.instance.isPlaying && GameManager.instance.canInput; } - - public static bool PressedUp(bool includeDPad = false) + + [Obsolete("Use GetPadUp instead")] + public static bool PressedUp() { - bool keyUp = GetInputController(1).GetActionUp((int) InputController.ActionsPad.East, out _) || (includeDPad && GetAnyDirectionUp()); + bool keyUp = GetInputController(1).GetActionUp(InputController.ControlStyles.Pad, (int)InputController.ActionsPad.East, out _); return keyUp && !GameManager.instance.autoplay && Conductor.instance.isPlaying && GameManager.instance.canInput; } - - public static bool PressedUp(out double dt, bool includeDPad = false) + + [Obsolete("Use GetPadUp instead")] + public static bool PressedUp(out double dt) { - bool keyUp = GetInputController(1).GetActionUp((int) InputController.ActionsPad.East, out dt) || (includeDPad && GetAnyDirectionUp()); + bool keyUp = GetInputController(1).GetActionUp(InputController.ControlStyles.Pad, (int)InputController.ActionsPad.East, out dt); return keyUp && !GameManager.instance.autoplay && Conductor.instance.isPlaying && GameManager.instance.canInput; } - - public static bool Pressing(bool includeDPad = false) + + [Obsolete("Use GetPad instead")] + public static bool Pressing() { - bool pressing = GetInputController(1).GetAction((int) InputController.ActionsPad.East) || (includeDPad && GetAnyDirection()); + bool pressing = GetInputController(1).GetAction(InputController.ControlStyles.Pad, (int)InputController.ActionsPad.East); return pressing && !GameManager.instance.autoplay && Conductor.instance.isPlaying && GameManager.instance.canInput; } - - + + [Obsolete("Use GetPadDown instead")] public static bool AltPressed() { - bool down = GetInputController(1).GetActionDown((int) InputController.ActionsPad.South, out _); + bool down = GetInputController(1).GetActionDown(InputController.ControlStyles.Pad, (int)InputController.ActionsPad.South, out _); return down && PlayerHasControl(); } + [Obsolete("Use GetPadDown instead")] public static bool AltPressed(out double dt) { - bool down = GetInputController(1).GetActionDown((int) InputController.ActionsPad.South, out dt); + bool down = GetInputController(1).GetActionDown(InputController.ControlStyles.Pad, (int)InputController.ActionsPad.South, out dt); return down && PlayerHasControl(); } - + + [Obsolete("Use GetPadUp instead")] public static bool AltPressedUp() { - bool up = GetInputController(1).GetActionUp((int) InputController.ActionsPad.South, out _); + bool up = GetInputController(1).GetActionUp(InputController.ControlStyles.Pad, (int)InputController.ActionsPad.South, out _); return up && PlayerHasControl(); } - + + [Obsolete("Use GetPadUp instead")] public static bool AltPressedUp(out double dt) { - bool up = GetInputController(1).GetActionUp((int) InputController.ActionsPad.South, out dt); + bool up = GetInputController(1).GetActionUp(InputController.ControlStyles.Pad, (int)InputController.ActionsPad.South, out dt); return up && PlayerHasControl(); } - + + [Obsolete("Use GetPad instead")] public static bool AltPressing() { - bool pressing = GetInputController(1).GetAction((int) InputController.ActionsPad.South); + bool pressing = GetInputController(1).GetAction(InputController.ControlStyles.Pad, (int)InputController.ActionsPad.South); return pressing && PlayerHasControl(); } - - //Directions - + + [Obsolete("Use GetPadDown instead")] public static bool GetAnyDirectionDown() { InputController c = GetInputController(1); - return (c.GetHatDirectionDown((InputController.InputDirection) UP, out _) - || c.GetHatDirectionDown((InputController.InputDirection) DOWN, out _) - || c.GetHatDirectionDown((InputController.InputDirection) LEFT, out _) - || c.GetHatDirectionDown((InputController.InputDirection) RIGHT, out _) + return (c.GetHatDirectionDown((InputController.InputDirection)UP, out _) + || c.GetHatDirectionDown((InputController.InputDirection)DOWN, out _) + || c.GetHatDirectionDown((InputController.InputDirection)LEFT, out _) + || c.GetHatDirectionDown((InputController.InputDirection)RIGHT, out _) ) && PlayerHasControl(); } + [Obsolete("Use GetPadDown instead")] public static bool GetAnyDirectionDown(out double dt) { InputController c = GetInputController(1); @@ -306,17 +394,19 @@ namespace HeavenStudio dt = Math.Max(Math.Max(Math.Max(d1, d2), d3), d4); return r; } - + + [Obsolete("Use GetPadUp instead")] public static bool GetAnyDirectionUp() { InputController c = GetInputController(1); - return (c.GetHatDirectionUp((InputController.InputDirection) UP, out _) - || c.GetHatDirectionUp((InputController.InputDirection) DOWN, out _) - || c.GetHatDirectionUp((InputController.InputDirection) LEFT, out _) - || c.GetHatDirectionUp((InputController.InputDirection) RIGHT, out _) - ) && PlayerHasControl(); + return (c.GetHatDirectionUp((InputController.InputDirection)UP, out _) + || c.GetHatDirectionUp((InputController.InputDirection)DOWN, out _) + || c.GetHatDirectionUp((InputController.InputDirection)LEFT, out _) + || c.GetHatDirectionUp((InputController.InputDirection)RIGHT, out _) + ) && PlayerHasControl(); } + [Obsolete("Use GetPadUp instead")] public static bool GetAnyDirectionUp(out double dt) { InputController c = GetInputController(1); @@ -328,40 +418,47 @@ namespace HeavenStudio dt = Math.Max(Math.Max(Math.Max(d1, d2), d3), d4); return r; } - + + [Obsolete("Use GetPad instead")] public static bool GetAnyDirection() { InputController c = GetInputController(1); - return (c.GetHatDirection((InputController.InputDirection) UP) - || c.GetHatDirection((InputController.InputDirection) DOWN) - || c.GetHatDirection((InputController.InputDirection) LEFT) - || c.GetHatDirection((InputController.InputDirection) RIGHT) + return (c.GetHatDirection((InputController.InputDirection)UP) + || c.GetHatDirection((InputController.InputDirection)DOWN) + || c.GetHatDirection((InputController.InputDirection)LEFT) + || c.GetHatDirection((InputController.InputDirection)RIGHT) ) && PlayerHasControl(); } - + + [Obsolete("Use GetPad instead")] public static bool GetSpecificDirection(int direction) { - return GetInputController(1).GetHatDirection((InputController.InputDirection) direction) && PlayerHasControl(); + return GetInputController(1).GetHatDirection((InputController.InputDirection)direction) && PlayerHasControl(); } - + + [Obsolete("Use GetPadDown instead")] public static bool GetSpecificDirectionDown(int direction) { - return GetInputController(1).GetHatDirectionDown((InputController.InputDirection) direction, out _) && PlayerHasControl(); + return GetInputController(1).GetHatDirectionDown((InputController.InputDirection)direction, out _) && PlayerHasControl(); } - + + [Obsolete("Use GetPadUp instead")] public static bool GetSpecificDirectionUp(int direction) { - return GetInputController(1).GetHatDirectionUp((InputController.InputDirection) direction, out _) && PlayerHasControl(); + return GetInputController(1).GetHatDirectionUp((InputController.InputDirection)direction, out _) && PlayerHasControl(); } - + + [Obsolete("Use GetPadDown instead")] public static bool GetSpecificDirectionDown(int direction, out double dt) { - return GetInputController(1).GetHatDirectionDown((InputController.InputDirection) direction, out dt) && PlayerHasControl(); + return GetInputController(1).GetHatDirectionDown((InputController.InputDirection)direction, out dt) && PlayerHasControl(); } - + + [Obsolete("Use GetPadUp instead")] public static bool GetSpecificDirectionUp(int direction, out double dt) { - return GetInputController(1).GetHatDirectionUp((InputController.InputDirection) direction, out dt) && PlayerHasControl(); + return GetInputController(1).GetHatDirectionUp((InputController.InputDirection)direction, out dt) && PlayerHasControl(); } + #endregion } } diff --git a/Assets/Scripts/UI/PauseMenu.cs b/Assets/Scripts/UI/PauseMenu.cs index 6f92795be..724654883 100644 --- a/Assets/Scripts/UI/PauseMenu.cs +++ b/Assets/Scripts/UI/PauseMenu.cs @@ -31,7 +31,7 @@ namespace HeavenStudio.Common [SerializeField] RectTransform patternL; [SerializeField] RectTransform patternR; - + public static bool IsPaused { get { return isPaused; } } private static bool isPaused = false; @@ -40,6 +40,8 @@ namespace HeavenStudio.Common private bool isQuitting = false; private int optionSelected = 0; + int btPause, btUp, btDown, btConfirm; + void Pause() { if (GlobalGameManager.IsShowingDialog) return; @@ -69,7 +71,7 @@ namespace HeavenStudio.Common animator.Play("PauseHide"); SoundByte.PlayOneShot("ui/PauseOut"); } - + isPaused = false; canPick = false; } @@ -84,8 +86,31 @@ namespace HeavenStudio.Common // Update is called once per frame void Update() { + switch (PlayerInput.CurrentControlStyle) + { + case InputController.ControlStyles.Touch: + btPause = (int)InputController.ActionsTouch.Pause; + btConfirm = (int)InputController.ActionsTouch.Tap; + btUp = -1; + btDown = -1; + break; + case InputController.ControlStyles.Baton: + btPause = (int)InputController.ActionsBaton.Pause; + btUp = (int)InputController.ActionsBaton.Up; + btDown = (int)InputController.ActionsBaton.Down; + btConfirm = (int)InputController.ActionsBaton.Face; + break; + default: + btPause = (int)InputController.ActionsPad.Pause; + btUp = (int)InputController.ActionsPad.Up; + btDown = (int)InputController.ActionsPad.Down; + btConfirm = (int)InputController.ActionsPad.East; + break; + } + if (isQuitting) return; - if (PlayerInput.GetInputController(1).GetActionDown((int) InputController.ActionsPad.Pause, out _)) + + if (PlayerInput.GetInputController(1).GetActionDown(PlayerInput.CurrentControlStyle, btPause, out _)) { if (isPaused) { @@ -98,27 +123,27 @@ namespace HeavenStudio.Common } else if (isPaused && canPick && !settingsDialog.IsOpen) { - if (Input.GetKeyDown(KeyCode.UpArrow) || PlayerInput.GetInputController(1).GetActionDown((int)InputController.ActionsPad.Up, out _)) + if (Input.GetKeyDown(KeyCode.UpArrow) || PlayerInput.GetInputController(1).GetActionDown(PlayerInput.CurrentControlStyle, btUp, out _)) { optionSelected--; if (optionSelected < 0) { optionSelected = optionHolder.transform.childCount - 1; } - ChooseOption((Options) optionSelected); + ChooseOption((Options)optionSelected); } - else if (Input.GetKeyDown(KeyCode.DownArrow) || PlayerInput.GetInputController(1).GetActionDown((int)InputController.ActionsPad.Down, out _)) + else if (Input.GetKeyDown(KeyCode.DownArrow) || PlayerInput.GetInputController(1).GetActionDown(PlayerInput.CurrentControlStyle, btDown, out _)) { optionSelected++; if (optionSelected > optionHolder.transform.childCount - 1) { optionSelected = 0; } - ChooseOption((Options) optionSelected); + ChooseOption((Options)optionSelected); } - else if (Input.GetKeyDown(KeyCode.Return) || PlayerInput.GetInputController(1).GetActionDown((int)InputController.ActionsPad.East, out _)) + else if (Input.GetKeyDown(KeyCode.Return) || PlayerInput.GetInputController(1).GetActionDown(PlayerInput.CurrentControlStyle, btConfirm, out _)) { - UseOption((Options) optionSelected); + UseOption((Options)optionSelected); } } @@ -131,18 +156,18 @@ namespace HeavenStudio.Common public void ChooseCurrentOption() { - ChooseOption((Options) optionSelected, false); + ChooseOption((Options)optionSelected, false); canPick = true; } public void ChooseOption(Options option, bool sound = true) { - optionArrow.transform.position = new Vector3(optionArrow.transform.position.x, optionHolder.transform.GetChild((int) option).position.y, optionArrow.transform.position.z); + optionArrow.transform.position = new Vector3(optionArrow.transform.position.x, optionHolder.transform.GetChild((int)option).position.y, optionArrow.transform.position.z); foreach (Transform child in optionHolder.transform) { child.transform.localScale = new Vector3(1f, 1f, 1f); } - optionHolder.transform.GetChild((int) option).transform.localScale = new Vector3(1.2f, 1.2f, 1.2f); + optionHolder.transform.GetChild((int)option).transform.localScale = new Vector3(1.2f, 1.2f, 1.2f); if (sound) SoundByte.PlayOneShot("ui/UIOption"); } diff --git a/Assets/Scripts/UI/SettingsDialog/Tabs/ControllerSettings.cs b/Assets/Scripts/UI/SettingsDialog/Tabs/ControllerSettings.cs index 055325566..27414321b 100644 --- a/Assets/Scripts/UI/SettingsDialog/Tabs/ControllerSettings.cs +++ b/Assets/Scripts/UI/SettingsDialog/Tabs/ControllerSettings.cs @@ -12,7 +12,7 @@ using HeavenStudio.Util; using HeavenStudio.InputSystem; using static JSL; -namespace HeavenStudio.Editor +namespace HeavenStudio.Editor { public class ControllerSettings : TabsContent { @@ -45,19 +45,29 @@ namespace HeavenStudio.Editor private bool bindAllMode; private int currentBindingBt; - private void Start() { - PopulateStylesDropdown(); + private void Start() + { numConnectedLabel.text = "Connected: " + PlayerInput.GetNumControllersConnected(); currentControllerLabel.text = "Current Controller: " + PlayerInput.GetInputController(1).GetDeviceName(); PopulateControllersDropdown(); - + PopulateStylesDropdown(); + pairSearchItem.SetActive(false); - ShowControllerBinds(PlayerInput.GetInputController(1)); - ShowControllerIcon(PlayerInput.GetInputController(1)); + InputController initController = PlayerInput.GetInputController(1); + if (!initController.GetCurrentStyleSupported()) + { + PlayerInput.CurrentControlStyle = initController.GetDefaultStyle(); + stylesDropdown.value = (int)PlayerInput.CurrentControlStyle; + } + + UpdateControlStyleMapping(); + ShowControllerBinds(initController); + ShowControllerIcon(initController); } - private void Update() { + private void Update() + { InputController currentController = PlayerInput.GetInputController(1); if (currentBindingBt >= 0) { @@ -65,7 +75,18 @@ namespace HeavenStudio.Editor if (bt > 0) { InputController.ControlBindings binds = currentController.GetCurrentBindings(); - binds.Pad[currentBindingBt] = bt; + switch (PlayerInput.CurrentControlStyle) + { + case InputController.ControlStyles.Touch: + binds.Touch[currentBindingBt] = bt; + break; + case InputController.ControlStyles.Baton: + binds.Baton[currentBindingBt] = bt; + break; + default: + binds.Pad[currentBindingBt] = bt; + break; + } currentController.SetCurrentBindings(binds); currentControllerLabel.text = "Current Controller: " + currentController.GetDeviceName(); ShowControllerBinds(currentController); @@ -75,10 +96,12 @@ namespace HeavenStudio.Editor } else { - if (isAutoSearching) { + if (isAutoSearching) + { var controllers = PlayerInput.GetInputControllers(); - foreach (var newController in controllers) { - if (newController.GetLastButtonDown() > 0) + foreach (var newController in controllers) + { + if (newController.GetLastButtonDown() > 0) { isAutoSearching = false; autoSearchLabel.SetActive(false); @@ -88,18 +111,20 @@ namespace HeavenStudio.Editor } } } - else if (isPairSearching) { + else if (isPairSearching) + { var controllers = PlayerInput.GetInputControllers(); InputController.InputFeatures lrFlag = pairSelectLR ? InputController.InputFeatures.Extra_SplitControllerLeft : InputController.InputFeatures.Extra_SplitControllerRight; - foreach (var pairController in controllers) { + foreach (var pairController in controllers) + { if (pairController == currentController) continue; InputController.InputFeatures features = pairController.GetFeatures(); if (!features.HasFlag(lrFlag)) continue; - if (pairController.GetLastButtonDown() > 0) + if (pairController.GetLastButtonDown() > 0) { - (PlayerInput.GetInputController(1) as InputJoyshock)?.AssignOtherHalf((InputJoyshock) pairController); + (PlayerInput.GetInputController(1) as InputJoyshock)?.AssignOtherHalf((InputJoyshock)pairController); isPairSearching = false; pairSearchLabel.SetActive(false); currentControllerLabel.text = "Current Controller: " + pairController.GetDeviceName(); @@ -116,23 +141,41 @@ namespace HeavenStudio.Editor void AdvanceAutoBind(InputController currentController) { + int pauseVal; + Type enumType; + switch (PlayerInput.CurrentControlStyle) + { + case InputController.ControlStyles.Touch: + enumType = typeof(InputController.ActionsTouch); + pauseVal = (int)InputController.ActionsTouch.Pause; + break; + case InputController.ControlStyles.Baton: + enumType = typeof(InputController.ActionsBaton); + pauseVal = (int)InputController.ActionsBaton.Pause; + break; + default: + enumType = typeof(InputController.ActionsPad); + pauseVal = (int)InputController.ActionsPad.Pause; + break; + } + if (bindAllMode) { currentBindingBt++; Debug.Log("Binding: " + currentBindingBt); - while (currentController.GetIsActionUnbindable(currentBindingBt, InputController.ControlStyles.Pad) && currentBindingBt < (int)InputController.ActionsPad.Pause) + while (currentController.GetIsActionUnbindable(currentBindingBt, PlayerInput.CurrentControlStyle) && currentBindingBt < pauseVal) { currentBindingBt++; Debug.Log("Unbindable, binding: " + currentBindingBt); } - if (currentBindingBt > (int)InputController.ActionsPad.Pause) + if (currentBindingBt > pauseVal) { currentController.SaveBindings(); CancelBind(); return; } - - currentControllerLabel.text = $"Now Binding: {(InputController.ActionsPad) currentBindingBt}"; + + currentControllerLabel.text = $"Now Binding: {enumType.GetEnumName(currentBindingBt)}"; } else { @@ -145,41 +188,51 @@ namespace HeavenStudio.Editor { Debug.Log("Assigning controller: " + newController.GetDeviceName()); - lastController.SetPlayer(-1); + lastController.SetPlayer(null); newController.SetPlayer(1); - if ((lastController as InputJoyshock) != null) + if ((lastController as InputJoyshock) != null) { (lastController as InputJoyshock)?.UnAssignOtherHalf(); } - if ((newController as InputJoyshock) != null) + if ((newController as InputJoyshock) != null) { newController.OnSelected(); (newController as InputJoyshock)?.UnAssignOtherHalf(); } currentControllerLabel.text = "Current Controller: " + newController.GetDeviceName(); - + + if (!newController.GetCurrentStyleSupported()) + { + PlayerInput.CurrentControlStyle = newController.GetDefaultStyle(); + stylesDropdown.value = (int)PlayerInput.CurrentControlStyle; + } + + UpdateControlStyleMapping(); ShowControllerBinds(newController); ShowControllerIcon(newController); InputController.InputFeatures features = newController.GetFeatures(); - if (features.HasFlag(InputController.InputFeatures.Extra_SplitControllerLeft)) { + if (features.HasFlag(InputController.InputFeatures.Extra_SplitControllerLeft)) + { pairingLabel.text = "Joy-Con (L) Selected\nPress any button on Joy-Con (R) to pair."; pairSelectLR = !features.HasFlag(InputController.InputFeatures.Extra_SplitControllerLeft); pairSearchItem.SetActive(true); StartPairSearch(); } - else if (features.HasFlag(InputController.InputFeatures.Extra_SplitControllerRight)) { + else if (features.HasFlag(InputController.InputFeatures.Extra_SplitControllerRight)) + { pairingLabel.text = "Joy-Con (R) Selected\nPress any button on Joy-Con (L) to pair."; pairSelectLR = !features.HasFlag(InputController.InputFeatures.Extra_SplitControllerLeft); pairSearchItem.SetActive(true); StartPairSearch(); } - else { + else + { CancelPairSearch(); pairSearchItem.SetActive(false); } @@ -198,12 +251,24 @@ namespace HeavenStudio.Editor public void StartBindSingle(int bt) { CancelBind(); - if (PlayerInput.GetInputController(1).GetIsActionUnbindable(bt, InputController.ControlStyles.Pad)) + if (PlayerInput.GetInputController(1).GetIsActionUnbindable(bt, PlayerInput.CurrentControlStyle)) { return; } currentBindingBt = bt; - currentControllerLabel.text = $"Now Binding: {(InputController.ActionsPad) bt}"; + + switch (PlayerInput.CurrentControlStyle) + { + case InputController.ControlStyles.Touch: + currentControllerLabel.text = $"Now Binding: {(InputController.ActionsTouch)bt}"; + break; + case InputController.ControlStyles.Baton: + currentControllerLabel.text = $"Now Binding: {(InputController.ActionsBaton)bt}"; + break; + default: + currentControllerLabel.text = $"Now Binding: {(InputController.ActionsPad)bt}"; + break; + } } public void StartBindAll() @@ -230,7 +295,8 @@ namespace HeavenStudio.Editor controller.SaveBindings(); } - public void StartAutoSearch() { + public void StartAutoSearch() + { CancelBind(); if (!isPairSearching) { @@ -239,18 +305,22 @@ namespace HeavenStudio.Editor } } - public void StartPairSearch() { + public void StartPairSearch() + { CancelBind(); - if (!isAutoSearching) { + if (!isAutoSearching) + { pairSearchLabel.SetActive(true); pairSearchCancelBt.SetActive(true); isPairSearching = true; } } - public void CancelPairSearch() { + public void CancelPairSearch() + { CancelBind(); - if (isPairSearching) { + if (isPairSearching) + { pairSearchLabel.SetActive(false); pairSearchCancelBt.SetActive(false); isPairSearching = false; @@ -272,9 +342,9 @@ namespace HeavenStudio.Editor var enumNames = Enum.GetNames(typeof(InputController.ControlStyles)).ToList(); - controllersDropdown.ClearOptions(); + stylesDropdown.ClearOptions(); stylesDropdown.AddOptions(enumNames); - stylesDropdown.value = (int) PlayerInput.CurrentControlStyle; + stylesDropdown.value = (int)PlayerInput.CurrentControlStyle; } public void PopulateControllersDropdown() @@ -292,27 +362,78 @@ namespace HeavenStudio.Editor controllersDropdown.value = PlayerInput.GetInputControllerId(1); } + public void ChangeControlStyle() + { + CancelBind(); + PlayerInput.CurrentControlStyle = (InputController.ControlStyles)stylesDropdown.value; + } + + public void UpdateControlStyleMapping() + { + switch (PlayerInput.CurrentControlStyle) + { + case InputController.ControlStyles.Touch: + PadBindingsMenus.ForEach(x => x.SetActive(false)); + BatonBindingsMenus.ForEach(x => x.SetActive(false)); + TouchBindingsMenus.ForEach(x => x.SetActive(true)); + break; + case InputController.ControlStyles.Baton: + PadBindingsMenus.ForEach(x => x.SetActive(false)); + BatonBindingsMenus.ForEach(x => x.SetActive(true)); + TouchBindingsMenus.ForEach(x => x.SetActive(false)); + break; + default: + PadBindingsMenus.ForEach(x => x.SetActive(true)); + BatonBindingsMenus.ForEach(x => x.SetActive(false)); + TouchBindingsMenus.ForEach(x => x.SetActive(false)); + break; + } + } + public void ShowControllerBinds(InputController controller) { string[] buttons = controller.GetButtonNames(); + List bindsTxt; + int[] binds; + + switch (PlayerInput.CurrentControlStyle) + { + case InputController.ControlStyles.Touch: + bindsTxt = TouchBindingsTxt; + binds = controller.GetCurrentBindings().Touch; + break; + case InputController.ControlStyles.Baton: + bindsTxt = BatonBindingsTxt; + binds = controller.GetCurrentBindings().Baton; + break; + default: + bindsTxt = PadBindingsTxt; + binds = controller.GetCurrentBindings().Pad; + break; + } //show binds int ac = 0; - foreach (int i in controller.GetCurrentBindings().Pad) + foreach (int i in binds) { - if (ac >= PadBindingsTxt.Count) break; - + if (ac >= bindsTxt.Count) break; + if (bindsTxt[ac] == null) + { + ac++; + continue; + } + if (i == -1) { - PadBindingsTxt[ac].text = "NOT BOUND"; + bindsTxt[ac].text = "NOT BOUND"; } else if (buttons[i] == null) { - PadBindingsTxt[ac].text = "UNKNOWN"; + bindsTxt[ac].text = "UNKNOWN"; } else { - PadBindingsTxt[ac].text = buttons[i]; + bindsTxt[ac].text = buttons[i]; } ac++; } @@ -336,56 +457,7 @@ namespace HeavenStudio.Editor } //setup material - Color colour; - switch (name) - { - case "Keyboard": - controllerMat.SetColor("_BodyColor", ColorUtility.TryParseHtmlString("#F4F4F4", out colour) ? colour : Color.white); - break; - case "Joy-Con (L)": - case "Joy-Con (R)": - InputJoyshock joy = (InputJoyshock) controller; - controllerMat.SetColor("_BodyColor", joy.GetBodyColor()); - controllerMat.SetColor("_BtnColor", joy.GetButtonColor()); - controllerMat.SetColor("_LGripColor", ColorUtility.TryParseHtmlString("#2F353A", out colour) ? colour : Color.white); - controllerMat.SetColor("_RGripColor", ColorUtility.TryParseHtmlString("#2F353A", out colour) ? colour : Color.white); - break; - case "Joy-Con Pair": - joy = (InputJoyshock) controller; - int joySide = JslGetControllerSplitType(joy.GetHandle()); - controllerMat.SetColor("_BodyColor", joySide == SplitRight ? joy.GetButtonColor() : joy.GetOtherHalf().GetButtonColor()); - controllerMat.SetColor("_BtnColor", joySide == SplitLeft ? joy.GetButtonColor() : joy.GetOtherHalf().GetButtonColor()); - controllerMat.SetColor("_LGripColor", joy.GetLeftGripColor()); - controllerMat.SetColor("_RGripColor", joy.GetRightGripColor()); - break; - case "Pro Controller": - joy = (InputJoyshock) controller; - controllerMat.SetColor("_BodyColor", joy.GetBodyColor()); - controllerMat.SetColor("_BtnColor", joy.GetButtonColor()); - controllerMat.SetColor("_LGripColor", joy.GetLeftGripColor()); - controllerMat.SetColor("_RGripColor", joy.GetRightGripColor()); - break; - case "DualShock 4": - joy = (InputJoyshock) controller; - controllerMat.SetColor("_BodyColor", ColorUtility.TryParseHtmlString("#E1E2E4", out colour) ? colour : Color.white); - controllerMat.SetColor("_BtnColor", ColorUtility.TryParseHtmlString("#414246", out colour) ? colour : Color.white); - controllerMat.SetColor("_LGripColor", joy.GetLightbarColour()); - controllerMat.SetColor("_RGripColor", joy.GetLightbarColour()); - break; - case "DualSense": - joy = (InputJoyshock) controller; - controllerMat.SetColor("_BodyColor", ColorUtility.TryParseHtmlString("#DEE0EB", out colour) ? colour : Color.white); - controllerMat.SetColor("_BtnColor", ColorUtility.TryParseHtmlString("#272D39", out colour) ? colour : Color.white); - controllerMat.SetColor("_LGripColor", joy.GetLightbarColour()); - controllerMat.SetColor("_RGripColor", joy.GetLightbarColour()); - break; - default: - controllerMat.SetColor("_BodyColor", Color.white); - controllerMat.SetColor("_BtnColor", Color.white); - controllerMat.SetColor("_LGripColor", Color.white); - controllerMat.SetColor("_RGripColor", Color.white); - break; - } + controller.SetMaterialProperties(controllerMat); } public override void OnOpenTab()