diff --git a/Assets/Plugins/Starpelly/Colors.cs b/Assets/Plugins/Starpelly/Colors.cs index 82363aea2..14af99a88 100644 --- a/Assets/Plugins/Starpelly/Colors.cs +++ b/Assets/Plugins/Starpelly/Colors.cs @@ -16,6 +16,7 @@ namespace Starpelly /// public static Color Hex2RGB(this string hex) { + if (hex is null or "") return Color.black; try { hex = hex.Replace("0x", "");//in case the string is formatted 0xFFFFFF @@ -25,7 +26,7 @@ namespace Starpelly byte g = byte.Parse(hex.Substring(2, 2), System.Globalization.NumberStyles.HexNumber); byte b = byte.Parse(hex.Substring(4, 2), System.Globalization.NumberStyles.HexNumber); //Only use alpha if the string has enough characters - if (hex.Length == 8) + if (hex.Length >= 8) { a = byte.Parse(hex.Substring(6, 2), System.Globalization.NumberStyles.HexNumber); } diff --git a/Assets/Resources/Prefabs/Editor/SettingsMenu/ControllerSetup.prefab b/Assets/Resources/Prefabs/Editor/SettingsMenu/ControllerSetup.prefab index 5ebbabcbd..26e4f81b3 100644 --- a/Assets/Resources/Prefabs/Editor/SettingsMenu/ControllerSetup.prefab +++ b/Assets/Resources/Prefabs/Editor/SettingsMenu/ControllerSetup.prefab @@ -2090,6 +2090,7 @@ RectTransform: - {fileID: 3918594455571216808} - {fileID: 3918594456177472909} - {fileID: 3918594455700716071} + - {fileID: 8475765577213823739} m_Father: {fileID: 9026175551012134334} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -3402,6 +3403,82 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 +--- !u!1 &3902585457234082832 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8475765577213823739} + - component: {fileID: 4444702116040102111} + - component: {fileID: 888764958146106342} + m_Layer: 5 + m_Name: Mouse + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &8475765577213823739 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3902585457234082832} + 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: 4793950890431788211} + m_RootOrder: 7 + 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 &4444702116040102111 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3902585457234082832} + m_CullTransparentMesh: 1 +--- !u!114 &888764958146106342 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3902585457234082832} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 2100000, guid: 55b3a6672a0ec294d8f3edb9c1f94b36, 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: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: -974588141, guid: d44d97eed2a444b41be17f9737b43b5f, 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 &3918594454379110542 GameObject: m_ObjectHideFlags: 0 @@ -3437,11 +3514,11 @@ RectTransform: m_Father: {fileID: 3918594454557351925} 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: -229.1, y: -25} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: 330, y: -0.0000000019699655} m_SizeDelta: {x: 50, y: 50} - m_Pivot: {x: 0.5, y: 0} + m_Pivot: {x: 0, y: 0.5} --- !u!222 &3918594454379110530 CanvasRenderer: m_ObjectHideFlags: 0 @@ -3664,8 +3741,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 602.5, y: -243.97882} - m_SizeDelta: {x: 1165, y: 100} + m_AnchoredPosition: {x: 754, y: -307.9788} + m_SizeDelta: {x: 1468, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &3918594454393827267 MonoBehaviour: @@ -3808,7 +3885,7 @@ MonoBehaviour: m_linkedTextComponent: {fileID: 0} parentLinkedComponent: {fileID: 0} m_enableKerning: 1 - m_ActiveFontFeatures: 00000000 + m_ActiveFontFeatures: 6e72656b m_enableExtraPadding: 0 checkPaddingRequired: 0 m_isRichText: 1 @@ -3947,7 +4024,7 @@ MonoBehaviour: m_linkedTextComponent: {fileID: 0} parentLinkedComponent: {fileID: 0} m_enableKerning: 1 - m_ActiveFontFeatures: 00000000 + m_ActiveFontFeatures: 6e72656b m_enableExtraPadding: 0 checkPaddingRequired: 0 m_isRichText: 1 @@ -4004,7 +4081,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0.000005722046, y: -0.000005722046} + m_AnchoredPosition: {x: 0, y: -0.000005722046} m_SizeDelta: {x: 50, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3918594454531700427 @@ -4246,7 +4323,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 1165, y: 64} + m_SizeDelta: {x: 0, y: 64} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3918594454557351915 CanvasRenderer: @@ -4573,7 +4650,7 @@ MonoBehaviour: m_Spacing: 0 m_ChildForceExpandWidth: 1 m_ChildForceExpandHeight: 1 - m_ChildControlWidth: 0 + m_ChildControlWidth: 1 m_ChildControlHeight: 0 m_ChildScaleWidth: 0 m_ChildScaleHeight: 1 @@ -5749,7 +5826,7 @@ MonoBehaviour: m_linkedTextComponent: {fileID: 0} parentLinkedComponent: {fileID: 0} m_enableKerning: 1 - m_ActiveFontFeatures: 00000000 + m_ActiveFontFeatures: 6e72656b m_enableExtraPadding: 0 checkPaddingRequired: 0 m_isRichText: 1 @@ -5879,6 +5956,7 @@ MonoBehaviour: - {fileID: 3918594455571216809} - {fileID: 3918594456177472910} - {fileID: 3918594455700716064} + - {fileID: 3902585457234082832} controllerMat: {fileID: 2100000, guid: 55b3a6672a0ec294d8f3edb9c1f94b36, type: 2} PadBindingsMenus: - {fileID: 7023003282004720528} @@ -6987,7 +7065,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 1165, y: 50} + m_SizeDelta: {x: 0, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &3918594455809915006 MonoBehaviour: @@ -7538,7 +7616,7 @@ RectTransform: m_AnchorMin: {x: 1, y: 0.5} m_AnchorMax: {x: 1, y: 0.5} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 786.6, y: 50} + m_SizeDelta: {x: 990, y: 50} m_Pivot: {x: 1, y: 0.5} --- !u!222 &3918594455983756490 CanvasRenderer: @@ -7908,8 +7986,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 591, y: 0} - m_SizeDelta: {x: 1142, y: 0} + m_AnchoredPosition: {x: 754, y: 0} + m_SizeDelta: {x: 1468, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3918594456218978261 CanvasRenderer: @@ -8141,7 +8219,7 @@ MonoBehaviour: m_linkedTextComponent: {fileID: 0} parentLinkedComponent: {fileID: 0} m_enableKerning: 1 - m_ActiveFontFeatures: 00000000 + m_ActiveFontFeatures: 6e72656b m_enableExtraPadding: 0 checkPaddingRequired: 0 m_isRichText: 1 @@ -11326,7 +11404,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 1165, y: 64} + m_SizeDelta: {x: 0, y: 64} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &5124755665249610764 MonoBehaviour: diff --git a/Assets/Resources/Prefabs/GameView/CamerasEditor.prefab b/Assets/Resources/Prefabs/GameView/CamerasEditor.prefab index f47224493..fdbacd813 100644 --- a/Assets/Resources/Prefabs/GameView/CamerasEditor.prefab +++ b/Assets/Resources/Prefabs/GameView/CamerasEditor.prefab @@ -170,6 +170,120 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 3 +--- !u!1 &435555855710102188 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7576197626345016079} + - component: {fileID: 1664206953461466981} + - component: {fileID: 7845231527756581285} + m_Layer: 31 + m_Name: FlasherL + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7576197626345016079 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 435555855710102188} + 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: 8552962828543516429} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 2, y: 12} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1664206953461466981 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 435555855710102188} + m_CullTransparentMesh: 1 +--- !u!114 &7845231527756581285 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 435555855710102188} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 0, b: 0, a: 0.1254902} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 8be59c4bde4258c429ac39251f5f681b, 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: 5 +--- !u!1 &699803779871748277 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8552962828543516429} + m_Layer: 31 + m_Name: Flashers + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &8552962828543516429 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 699803779871748277} + 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: 7576197626345016079} + - {fileID: 8281773103246844715} + m_Father: {fileID: 2077856143944097172} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &2464883521749415129 GameObject: m_ObjectHideFlags: 0 @@ -693,6 +807,82 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &6809880121875460609 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8281773103246844715} + - component: {fileID: 7734333607666534753} + - component: {fileID: 2240635501115395630} + m_Layer: 31 + m_Name: FlasherR + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8281773103246844715 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6809880121875460609} + 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: 8552962828543516429} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0.0000009536743, y: 0} + m_SizeDelta: {x: 2, y: 12} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7734333607666534753 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6809880121875460609} + m_CullTransparentMesh: 1 +--- !u!114 &2240635501115395630 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6809880121875460609} + 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: 0, g: 0, b: 1, a: 0.1254902} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 8be59c4bde4258c429ac39251f5f681b, 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: 5 --- !u!1 &7051539713125569525 GameObject: m_ObjectHideFlags: 0 @@ -894,6 +1084,7 @@ RectTransform: - {fileID: 2769789585838315502} - {fileID: 8925473620302868482} - {fileID: 8512930684284350359} + - {fileID: 8552962828543516429} m_Father: {fileID: 6052331674888157612} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Resources/Prefabs/GameView/Cursor.prefab b/Assets/Resources/Prefabs/GameView/Cursor.prefab index f935ad816..42cad1476 100644 --- a/Assets/Resources/Prefabs/GameView/Cursor.prefab +++ b/Assets/Resources/Prefabs/GameView/Cursor.prefab @@ -47,10 +47,12 @@ MonoBehaviour: m_EditorClassIdentifier: follow: 1 mouseMoveSpeed: 249.1 + sideChangeTrailTime: 0 DSGuy: {fileID: 0} DSGuyAnimator: {fileID: 0} flickCoeff: 0.35 flickInitMul: 1.5 + splitTouchSnapEffect: {fileID: 0} InnerCircle: {fileID: 0} Circle: {fileID: 0} --- !u!50 &285182279131759466 @@ -84,6 +86,7 @@ GameObject: m_Component: - component: {fileID: 285182279137842937} - component: {fileID: 285182279137842938} + - component: {fileID: 7664691932365309657} m_Layer: 3 m_Name: Actual m_TagString: Untagged @@ -121,12 +124,122 @@ MonoBehaviour: m_EditorClassIdentifier: follow: 0 mouseMoveSpeed: 0 + sideChangeTrailTime: 0.05 DSGuy: {fileID: 285182280031512481} DSGuyAnimator: {fileID: 4592128791974829295} flickCoeff: 12 flickInitMul: 64 + splitTouchSnapEffect: {fileID: 7664691932365309657} InnerCircle: {fileID: 285182279842109877} Circle: {fileID: 285182279897966106} +--- !u!96 &7664691932365309657 +TrailRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 285182279137842936} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 0 + m_StaticShadowCaster: 0 + m_MotionVectors: 0 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10306, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 20000 + m_Time: 0.083333336 + m_Parameters: + serializedVersion: 3 + widthMultiplier: 0.15 + widthCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: -0.9 + tangentMode: 69 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.22058824 + - serializedVersion: 3 + time: 1 + value: 0.1 + inSlope: -0.9 + outSlope: -2.2915363 + tangentMode: 69 + weightedMode: 0 + inWeight: 0.16176468 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 0.3137255} + key1: {r: 1, g: 1, b: 1, a: 0} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + numCornerVertices: 0 + numCapVertices: 4 + alignment: 0 + textureMode: 0 + shadowBias: 0.5 + generateLightingData: 0 + m_MinVertexDistance: 0.25 + m_Autodestruct: 0 + m_Emitting: 1 --- !u!1 &285182279354310575 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Resources/Sprites/UI/Common/Controllers/controllerSheet.png b/Assets/Resources/Sprites/UI/Common/Controllers/controllerSheet.png index ac9544cda..aedd4b72b 100644 Binary files a/Assets/Resources/Sprites/UI/Common/Controllers/controllerSheet.png and b/Assets/Resources/Sprites/UI/Common/Controllers/controllerSheet.png differ diff --git a/Assets/Resources/Sprites/UI/Common/Controllers/controllerSheet.png.meta b/Assets/Resources/Sprites/UI/Common/Controllers/controllerSheet.png.meta index 7a32ac1a7..a6b39b844 100644 --- a/Assets/Resources/Sprites/UI/Common/Controllers/controllerSheet.png.meta +++ b/Assets/Resources/Sprites/UI/Common/Controllers/controllerSheet.png.meta @@ -272,6 +272,27 @@ TextureImporter: indices: edges: [] weights: [] + - serializedVersion: 2 + name: controllerSheet_0 + rect: + serializedVersion: 2 + x: 347 + y: 1067 + width: 554 + height: 902 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: a781f3f6689516247a7cc092438330f7 + internalID: -974588141 + vertices: [] + indices: + edges: [] + weights: [] outline: [] physicsShape: [] bones: [] @@ -283,6 +304,7 @@ TextureImporter: weights: [] secondaryTextures: [] nameFileIdTable: + controllerSheet_0: -974588141 nxJoyconL: 2557230542604182733 nxJoyconPair: 8903944674802394384 nxJoyconR: 9166690998051772148 diff --git a/Assets/Scripts/CircleCursor.cs b/Assets/Scripts/CircleCursor.cs index 8752bb980..fa70ab9ec 100644 --- a/Assets/Scripts/CircleCursor.cs +++ b/Assets/Scripts/CircleCursor.cs @@ -9,22 +9,38 @@ namespace HeavenStudio { public class CircleCursor : MonoBehaviour { + static readonly GradientAlphaKey[] cursorAlphaKeys = new GradientAlphaKey[] + { + new GradientAlphaKey(0.5f, 0), + new GradientAlphaKey(0, 1) + }; + [SerializeField] private bool follow = false; [SerializeField] private float mouseMoveSpeed; + [SerializeField] private float sideChangeTrailTime; [Header("DSGuy")] [SerializeField] private GameObject DSGuy; [SerializeField] private Animator DSGuyAnimator; [SerializeField] private float flickCoeff = 0.35f; [SerializeField] private float flickInitMul = 1.5f; + [SerializeField] private TrailRenderer splitTouchSnapEffect; public GameObject InnerCircle; [SerializeField] private GameObject Circle; private bool isOpen; private Vector3 vel, flickStart, flickDeltaPos; + private Color colorMain, colorL, colorR; + private Gradient gradientL, gradientR; + private bool lastLeftRightState; + private float trailEnableTime; + + private SpriteRenderer innerCircleRenderer; private void Start() { // Cursor.visible = false; + splitTouchSnapEffect.emitting = false; + innerCircleRenderer = InnerCircle.GetComponent(); } private void Open() @@ -64,6 +80,34 @@ namespace HeavenStudio } else { + bool lrState = PlayerInput.GetInputController(1).GetPointerLeftRight(); + if (PlayerInput.CurrentControlStyle == InputSystem.InputController.ControlStyles.Touch && (GameManager.instance?.GameHasSplitColours ?? false)) + { + if (lrState != lastLeftRightState) + { + lastLeftRightState = lrState; + trailEnableTime = sideChangeTrailTime; + splitTouchSnapEffect.emitting = true; + + innerCircleRenderer.color = lastLeftRightState ? colorR : colorL; + splitTouchSnapEffect.colorGradient = lastLeftRightState ? gradientR : gradientL; + } + + if (trailEnableTime <= 0) + { + trailEnableTime = 0; + splitTouchSnapEffect.emitting = false; + } + else + { + trailEnableTime -= Time.deltaTime; + } + } + else if (splitTouchSnapEffect.emitting) + { + ClearTrail(); + } + gameObject.transform.position = pos; if (vel.magnitude > 0.05f) { @@ -89,11 +133,14 @@ namespace HeavenStudio else if (PlayerInput.GetIsAction(Minigame.InputAction_FlickRelease)) { Flick(pos, deltaPos * flickInitMul); + ClearTrail(); } if ((!PlayerInput.PlayerHasControl()) && isOpen) { Close(); + ClearTrail(); + splitTouchSnapEffect.emitting = false; } } } @@ -101,6 +148,48 @@ namespace HeavenStudio public void LockCursor(bool toggle) { PlayerInput.GetInputController(1).TogglePointerLock(toggle); + ClearTrail(); + } + + public void ClearTrail() + { + splitTouchSnapEffect.Clear(); + trailEnableTime = 0; + } + + public void SetCursorColors(Color main, Color left, Color right) + { + if (innerCircleRenderer == null) innerCircleRenderer = InnerCircle.GetComponent(); + + colorMain = main; + colorL = left; + colorR = right; + if (PlayerInput.CurrentControlStyle == InputSystem.InputController.ControlStyles.Touch && (GameManager.instance?.GameHasSplitColours ?? false)) + { + innerCircleRenderer.color = lastLeftRightState ? colorR : colorL; + gradientL = new Gradient() + { + colorKeys = new GradientColorKey[] + { + new GradientColorKey(colorL, 0), + new GradientColorKey(colorL, 1) + }, + alphaKeys = cursorAlphaKeys + }; + gradientR = new Gradient() + { + colorKeys = new GradientColorKey[] + { + new GradientColorKey(colorR, 0), + new GradientColorKey(colorR, 1) + }, + alphaKeys = cursorAlphaKeys + }; + } + else + { + innerCircleRenderer.color = colorMain; + } } } } \ No newline at end of file diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index 03357d6c1..84062067e 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -52,6 +52,16 @@ namespace HeavenStudio [NonSerialized] public RiqEntity currentSection, nextSection; public double sectionProgress { get; private set; } + public bool GameHasSplitColours + { + get + { + var inf = GetGameInfo(currentGame); + if (inf == null) return false; + return inf.splitColorL != null && inf.splitColorR != null; + } + } + bool AudioLoadDone; bool ChartLoadError; @@ -992,20 +1002,20 @@ namespace HeavenStudio return eventCaller.minigames.Find(c => c.name == name); } + Color colMain; public void SetCurrentGame(string game, bool useMinigameColor = true) { currentGame = game; if (GetGameInfo(currentGame) != null) { - CircleCursor.InnerCircle.GetComponent().color = Colors.Hex2RGB(GetGameInfo(currentGame).color); - if (useMinigameColor) HeavenStudio.StaticCamera.instance.SetAmbientGlowColour(Colors.Hex2RGB(GetGameInfo(currentGame).color), true); - //else HeavenStudio.StaticCamera.instance.SetAmbientGlowColour(HeavenStudio.GameCamera.currentColor, false); + colMain = Colors.Hex2RGB(GetGameInfo(currentGame).color); + CircleCursor.SetCursorColors(colMain, Colors.Hex2RGB(GetGameInfo(currentGame).splitColorL), Colors.Hex2RGB(GetGameInfo(currentGame).splitColorR)); + if (useMinigameColor) HeavenStudio.StaticCamera.instance.SetAmbientGlowColour(colMain, true); else HeavenStudio.StaticCamera.instance.SetAmbientGlowColour(Color.black, false); } else { - CircleCursor.InnerCircle.GetComponent().color = Color.white; - //HeavenStudio.StaticCamera.instance.SetAmbientGlowColour(HeavenStudio.GameCamera.currentColor, false); + CircleCursor.SetCursorColors(Color.white, Color.white, Color.white); HeavenStudio.StaticCamera.instance.SetAmbientGlowColour(Color.black, false); } } diff --git a/Assets/Scripts/Games/BlueBear/BlueBear.cs b/Assets/Scripts/Games/BlueBear/BlueBear.cs index 5d49d7bb6..71afcbf05 100644 --- a/Assets/Scripts/Games/BlueBear/BlueBear.cs +++ b/Assets/Scripts/Games/BlueBear/BlueBear.cs @@ -13,7 +13,7 @@ namespace HeavenStudio.Games.Loaders { public static Minigame AddGame(EventCaller eventCaller) { - return new Minigame("blueBear", "Blue Bear", "b4e6f6", false, false, new List() + return new Minigame("blueBear", "Blue Bear", "b4e6f6", "e7e7e7", "bf9d34", false, false, new List() { new GameAction("donut", "Donut") { diff --git a/Assets/Scripts/Games/CatchyTune/CatchyTune.cs b/Assets/Scripts/Games/CatchyTune/CatchyTune.cs index e1a455735..55d19409b 100644 --- a/Assets/Scripts/Games/CatchyTune/CatchyTune.cs +++ b/Assets/Scripts/Games/CatchyTune/CatchyTune.cs @@ -13,7 +13,7 @@ namespace HeavenStudio.Games.Loaders // minigame menu items public static Minigame AddGame(EventCaller eventCaller) { - return new Minigame("catchyTune", "Catchy Tune", "f2f2f2", false, false, new List() + return new Minigame("catchyTune", "Catchy Tune", "f2f2f2", "ff376c", "f2f2f2", false, false, new List() { new GameAction("orange", "Orange") { diff --git a/Assets/Scripts/Games/MarchingOrders/MarchingOrders.cs b/Assets/Scripts/Games/MarchingOrders/MarchingOrders.cs index 471458b8c..ab3a778b8 100644 --- a/Assets/Scripts/Games/MarchingOrders/MarchingOrders.cs +++ b/Assets/Scripts/Games/MarchingOrders/MarchingOrders.cs @@ -51,7 +51,7 @@ namespace HeavenStudio.Games.Loaders } RiqBeatmap.OnUpdateEntity += MarchUpdater; - return new Minigame("marchingOrders", "Marching Orders", "ffb108", false, false, new List() + return new Minigame("marchingOrders", "Marching Orders", "ffb108", "ccc001", "f20016", false, false, new List() { new GameAction("bop", "Bop") { diff --git a/Assets/Scripts/Games/Minigame.cs b/Assets/Scripts/Games/Minigame.cs index 53b8e9f2f..24cc4c8bf 100644 --- a/Assets/Scripts/Games/Minigame.cs +++ b/Assets/Scripts/Games/Minigame.cs @@ -437,6 +437,11 @@ namespace HeavenStudio.Games } } + public void ToggleSplitColoursDisplay(bool on) + { + + } + private void OnDestroy() { foreach (var evt in scheduledInputs) diff --git a/Assets/Scripts/Games/TramAndPauline/TramAndPauline.cs b/Assets/Scripts/Games/TramAndPauline/TramAndPauline.cs index c94bfc54d..907483cf4 100644 --- a/Assets/Scripts/Games/TramAndPauline/TramAndPauline.cs +++ b/Assets/Scripts/Games/TramAndPauline/TramAndPauline.cs @@ -11,7 +11,7 @@ namespace HeavenStudio.Games.Loaders { public static Minigame AddGame(EventCaller eventCaller) { - return new Minigame("tramAndPauline", "Tram & Pauline", "adb5e7", false, false, new List() + return new Minigame("tramAndPauline", "Tram & Pauline", "adb5e7", "ca8b17", "c14fae", false, false, new List() { new GameAction("prepare", "Prepare") { diff --git a/Assets/Scripts/InputSystem/ControllerTypes/InputJoyshock.cs b/Assets/Scripts/InputSystem/ControllerTypes/InputJoyshock.cs index 4e1129498..946480456 100644 --- a/Assets/Scripts/InputSystem/ControllerTypes/InputJoyshock.cs +++ b/Assets/Scripts/InputSystem/ControllerTypes/InputJoyshock.cs @@ -1056,5 +1056,10 @@ namespace HeavenStudio.InputSystem public override void RecentrePointer() { } + + public override bool GetPointerLeftRight() + { + return false; + } } } \ No newline at end of file diff --git a/Assets/Scripts/InputSystem/ControllerTypes/InputKeyboard.cs b/Assets/Scripts/InputSystem/ControllerTypes/InputKeyboard.cs index fde8582a7..9521d4975 100644 --- a/Assets/Scripts/InputSystem/ControllerTypes/InputKeyboard.cs +++ b/Assets/Scripts/InputSystem/ControllerTypes/InputKeyboard.cs @@ -318,5 +318,10 @@ namespace HeavenStudio.InputSystem public override void RecentrePointer() { } + + public override bool GetPointerLeftRight() + { + return false; + } } } \ No newline at end of file diff --git a/Assets/Scripts/InputSystem/ControllerTypes/InputMouse.cs b/Assets/Scripts/InputSystem/ControllerTypes/InputMouse.cs index 0cb93a42a..88dba6c74 100644 --- a/Assets/Scripts/InputSystem/ControllerTypes/InputMouse.cs +++ b/Assets/Scripts/InputSystem/ControllerTypes/InputMouse.cs @@ -432,5 +432,10 @@ namespace HeavenStudio.InputSystem { rawPointerPos = ScreenBounds * 0.5f; } + + public override bool GetPointerLeftRight() + { + return rawPointerPos.x > ScreenBounds.x * 0.5f; + } } } \ No newline at end of file diff --git a/Assets/Scripts/InputSystem/InputController.cs b/Assets/Scripts/InputSystem/InputController.cs index b826105de..fb9ce5527 100644 --- a/Assets/Scripts/InputSystem/InputController.cs +++ b/Assets/Scripts/InputSystem/InputController.cs @@ -275,6 +275,7 @@ namespace HeavenStudio.InputSystem /// /// public abstract Vector2 GetPointer(); + public abstract bool GetPointerLeftRight(); public abstract void TogglePointerLock(bool locked); public abstract void RecentrePointer(); diff --git a/Assets/Scripts/Minigames.cs b/Assets/Scripts/Minigames.cs index 6c91ddab1..4122087e1 100644 --- a/Assets/Scripts/Minigames.cs +++ b/Assets/Scripts/Minigames.cs @@ -284,7 +284,8 @@ namespace HeavenStudio public string name; public string displayName; public string color; - public GameObject holder; + public string splitColorL; + public string splitColorR; public bool hidden; public bool fxOnly; public List actions = new List(); @@ -337,6 +338,28 @@ namespace HeavenStudio this.defaultLocale = defaultLocale; this.supportedLocales = supportedLocales ?? new List(); this.inferred = inferred; + + this.splitColorL = null; + this.splitColorR = null; + } + + public Minigame(string name, string displayName, string color, string splitColorL, string splitColorR, bool hidden, bool fxOnly, List actions, List tags = null, string assetBundle = "", string defaultLocale = "en", List supportedLocales = null, bool inferred = false) + { + this.name = name; + this.displayName = displayName; + this.color = color; + this.actions = actions; + this.hidden = hidden; + this.fxOnly = fxOnly; + + this.tags = tags ?? new List(); + this.wantAssetBundle = assetBundle; + this.defaultLocale = defaultLocale; + this.supportedLocales = supportedLocales ?? new List(); + this.inferred = inferred; + + this.splitColorL = splitColorL; + this.splitColorR = splitColorR; } public AssetBundle GetLocalizedAssetBundle() diff --git a/Assets/Shaders/Invert.mat b/Assets/Shaders/Invert.mat index c21ea8bd0..ad6b79bc9 100644 --- a/Assets/Shaders/Invert.mat +++ b/Assets/Shaders/Invert.mat @@ -2,14 +2,16 @@ %TAG !u! tag:unity3d.com,2011: --- !u!21 &2100000 Material: - serializedVersion: 6 + serializedVersion: 8 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Invert m_Shader: {fileID: 4800000, guid: 186aee7e6d6053f4f8f0cca0ed3d25ac, type: 3} - m_ShaderKeywords: ETC1_EXTERNAL_ALPHA + m_ValidKeywords: [] + m_InvalidKeywords: + - ETC1_EXTERNAL_ALPHA m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -55,6 +57,7 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + m_Ints: [] m_Floats: - _BumpScale: 1 - _Cutoff: 0.5 @@ -75,3 +78,4 @@ Material: m_Colors: - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: []