added codex behaviour
This commit is contained in:
parent
d620c54be7
commit
1fec4e780d
8
Assets/Prefabs/UI/Codex.meta
Normal file
8
Assets/Prefabs/UI/Codex.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: db16d2f8e461e47e6aa183552530bc5d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8ec48b099c8274b8db9460675cf5a6b6
|
||||
guid: f00c51f85ae5941adaea825ca52e0832
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
8
Assets/Prefabs/UI/Codex/Components.meta
Normal file
8
Assets/Prefabs/UI/Codex/Components.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f89795829f6d4bf68c1cbca4052938d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
147
Assets/Prefabs/UI/Codex/Components/CodexIconComponentUI.prefab
Normal file
147
Assets/Prefabs/UI/Codex/Components/CodexIconComponentUI.prefab
Normal file
@ -0,0 +1,147 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1285616165401271549
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2553882259693637154}
|
||||
- component: {fileID: 9017171852136701099}
|
||||
m_Layer: 5
|
||||
m_Name: CodexIconComponentUI
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2553882259693637154
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1285616165401271549}
|
||||
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: 7980370667986966191}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &9017171852136701099
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1285616165401271549}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1114a7330e7844be97be4cae5617b5c1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Gameplay::Intrepid.Gameplay.Codex.UI.Components.CodexIconComponentUI
|
||||
icon: {fileID: 5567690737417303059}
|
||||
iconAnimation: {fileID: 7117617313402960343}
|
||||
--- !u!1 &8046437505522394254
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7980370667986966191}
|
||||
- component: {fileID: 242615254485060408}
|
||||
- component: {fileID: 5567690737417303059}
|
||||
- component: {fileID: 7117617313402960343}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7980370667986966191
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8046437505522394254}
|
||||
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: 2553882259693637154}
|
||||
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 &242615254485060408
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8046437505522394254}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &5567690737417303059
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8046437505522394254}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &7117617313402960343
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8046437505522394254}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4e33cf502024142968eb53d261faf91, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Utilities::Intrepid.Utilities.Sprite.SpriteAnimationController
|
||||
liveReload: 1
|
||||
postProcessingUpdateSprite:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
spriteAnimationService: {fileID: 11400000, guid: 9a5db89e9997f417ead801949370b893, type: 2}
|
||||
start:
|
||||
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3ee43ed6ea0214214ba8602cc3091892
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
404
Assets/Prefabs/UI/Codex/Components/CodexPanelComponentUI.prefab
Normal file
404
Assets/Prefabs/UI/Codex/Components/CodexPanelComponentUI.prefab
Normal file
@ -0,0 +1,404 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &416324509478960996
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5351091886041063999}
|
||||
- component: {fileID: 3327857494484505980}
|
||||
- component: {fileID: 3489324727556799602}
|
||||
- component: {fileID: 5316423476234221746}
|
||||
- component: {fileID: 3341292921356774437}
|
||||
m_Layer: 5
|
||||
m_Name: Background
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5351091886041063999
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 416324509478960996}
|
||||
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: 817218075505996544}
|
||||
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 &3327857494484505980
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 416324509478960996}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3489324727556799602
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 416324509478960996}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.02745098, g: 0.0627451, b: 0.078431375, 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: f99d9543f9a1d4118a997d7e78b78526, 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: 1
|
||||
--- !u!114 &5316423476234221746
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 416324509478960996}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b6f8f94415894c37ba6e10b5acebaab1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Gameplay::Intrepid.Gameplay.Codex.UI.Components.CodexColorLerpEffectUI
|
||||
useUnscaledTime: 1
|
||||
duration: 0.12
|
||||
curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!114 &3341292921356774437
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 416324509478960996}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9fdd777f66294b459eed0f053329b0bf, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Gameplay::Intrepid.Gameplay.Codex.UI.Components.CodexColorEffectTargetUI
|
||||
target: {fileID: 3489324727556799602}
|
||||
colorEffectUI: {fileID: 5316423476234221746}
|
||||
--- !u!1 &1093900508746780041
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 817218075505996544}
|
||||
- component: {fileID: 8918922271643254457}
|
||||
m_Layer: 5
|
||||
m_Name: CodexPanelComponentUI
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &817218075505996544
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1093900508746780041}
|
||||
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: 5351091886041063999}
|
||||
- {fileID: 4490832776911535242}
|
||||
- {fileID: 3050943421252974644}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 250, y: 150}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &8918922271643254457
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1093900508746780041}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d3124472724d4e3c84499514f80267f6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Gameplay::Intrepid.Gameplay.Codex.UI.CodexPanelUI
|
||||
backgroundType: 0
|
||||
borderType: 0
|
||||
background: {fileID: 3341292921356774437}
|
||||
border: {fileID: 2551783809612713942}
|
||||
--- !u!1 &3959540340678643811
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4490832776911535242}
|
||||
- component: {fileID: 9215136938786826689}
|
||||
- component: {fileID: 4925213537407531625}
|
||||
- component: {fileID: 7415060981115526544}
|
||||
m_Layer: 5
|
||||
m_Name: Content
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4490832776911535242
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3959540340678643811}
|
||||
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: 817218075505996544}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &9215136938786826689
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3959540340678643811}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Mask
|
||||
m_ShowMaskGraphic: 0
|
||||
--- !u!222 &4925213537407531625
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3959540340678643811}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7415060981115526544
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3959540340678643811}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
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: f99d9543f9a1d4118a997d7e78b78526, 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: 1
|
||||
--- !u!1 &7319422296609624887
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3050943421252974644}
|
||||
- component: {fileID: 9083596502734584377}
|
||||
- component: {fileID: 9167859301944789053}
|
||||
- component: {fileID: 8618498546748735978}
|
||||
- component: {fileID: 2551783809612713942}
|
||||
m_Layer: 5
|
||||
m_Name: Border
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3050943421252974644
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7319422296609624887}
|
||||
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: 817218075505996544}
|
||||
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 &9083596502734584377
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7319422296609624887}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &9167859301944789053
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7319422296609624887}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.3921569, g: 0.5843138, b: 0.9294118, 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: 783ec4722d98e4c1ebf1fe4440e41a04, 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: 1
|
||||
--- !u!114 &8618498546748735978
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7319422296609624887}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b6f8f94415894c37ba6e10b5acebaab1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Gameplay::Intrepid.Gameplay.Codex.UI.Components.CodexColorLerpEffectUI
|
||||
useUnscaledTime: 1
|
||||
duration: 0.12
|
||||
curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!114 &2551783809612713942
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7319422296609624887}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9fdd777f66294b459eed0f053329b0bf, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Gameplay::Intrepid.Gameplay.Codex.UI.Components.CodexColorEffectTargetUI
|
||||
target: {fileID: 9167859301944789053}
|
||||
colorEffectUI: {fileID: 8618498546748735978}
|
||||
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 819a22e651d254aeaa6271a8a5008be5
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,184 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &3461379372266766357
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 762940974718777101}
|
||||
- component: {fileID: 5481297712579369285}
|
||||
- component: {fileID: 4920856041323292772}
|
||||
- component: {fileID: 289836239444781818}
|
||||
- component: {fileID: 2415686604015823129}
|
||||
m_Layer: 5
|
||||
m_Name: Background
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &762940974718777101
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3461379372266766357}
|
||||
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: 4782545015208784509}
|
||||
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 &5481297712579369285
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3461379372266766357}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4920856041323292772
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3461379372266766357}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.11485404, g: 0.23029463, b: 0.2735849, a: 0.8}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &289836239444781818
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3461379372266766357}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b6f8f94415894c37ba6e10b5acebaab1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Gameplay::Intrepid.Gameplay.Codex.UI.Components.CodexColorLerpEffectUI
|
||||
useUnscaledTime: 1
|
||||
duration: 0.12
|
||||
curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!114 &2415686604015823129
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3461379372266766357}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9fdd777f66294b459eed0f053329b0bf, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Gameplay::Intrepid.Gameplay.Codex.UI.Components.CodexColorEffectTargetUI
|
||||
target: {fileID: 4920856041323292772}
|
||||
colorEffectUI: {fileID: 289836239444781818}
|
||||
--- !u!1 &4152609343146555872
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4782545015208784509}
|
||||
- component: {fileID: 1351220509199860}
|
||||
m_Layer: 5
|
||||
m_Name: CodexSurfaceComponentUI
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4782545015208784509
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4152609343146555872}
|
||||
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: 762940974718777101}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1351220509199860
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4152609343146555872}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f5e340eecbf4357824ae9b6722bd17d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Gameplay::Intrepid.Gameplay.Codex.UI.Components.CodexSurfaceComponentUI
|
||||
backgroundType: 3
|
||||
replaceAlpha: 0
|
||||
alpha: 0.5
|
||||
background: {fileID: 2415686604015823129}
|
||||
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 896db3c68c6024bbc920c44c5f96d461
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -12,4 +12,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 73c8da23e167c437b9b4044376377a24, type: 3}
|
||||
m_Name: '# Codex - Pictorial Protocol Library'
|
||||
m_EditorClassIdentifier: Gameplay::Intrepid.Gameplay.Codex.Visual.PictorialProtocolLibrary
|
||||
protocols: []
|
||||
protocols:
|
||||
- {fileID: 11400000, guid: 45f285d36d68d43cbb85c7b85d1125ad, type: 2}
|
||||
- {fileID: 11400000, guid: 6c3fd2d4d883248e18470247e672317a, type: 2}
|
||||
@ -0,0 +1,41 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b9a2dd3bc25546bfb126b9445e977c3c, type: 3}
|
||||
m_Name: pictorial-protocol.default 1
|
||||
m_EditorClassIdentifier: Gameplay::Intrepid.Gameplay.Codex.Visual.PictorialProtocolTag
|
||||
code: pictorial-protocol.default 1
|
||||
localization: {fileID: 0}
|
||||
description: {fileID: 0}
|
||||
interfaceStyle:
|
||||
surfaceBase: {r: 0.21001358, g: 0.4716981, b: 0.20247419, a: 1}
|
||||
surfaceRaised: {r: 0.21001358, g: 0.4716981, b: 0.20247419, a: 1}
|
||||
surfaceDeep: {r: 0.21001358, g: 0.4716981, b: 0.20247419, a: 1}
|
||||
surfaceOverlay: {r: 0.4637811, g: 0.8207547, b: 0.45296368, a: 0.5686275}
|
||||
textPrimary: {r: 0.84705883, g: 0.96862745, b: 1, a: 1}
|
||||
textSecondary: {r: 0.56078434, g: 0.78039217, b: 0.81960785, a: 1}
|
||||
textMuted: {r: 0.32156864, g: 0.4745098, b: 0.50980395, a: 1}
|
||||
textDisabled: {r: 0.18431373, g: 0.27450982, b: 0.29803923, a: 1}
|
||||
signalPrimary: {r: 0.92941177, g: 0.5173042, b: 0.39215687, a: 1}
|
||||
signalSecondary: {r: 0.1254902, g: 0.6980392, b: 0.6666667, a: 1}
|
||||
signalFocus: {r: 1, g: 1, b: 1, a: 1}
|
||||
signalSelected: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
|
||||
signalDisabled: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
signalDenied: {r: 0.5450981, g: 0, b: 0, a: 1}
|
||||
signalWarning: {r: 1, g: 0.6470588, b: 0, a: 1}
|
||||
signalCorruption: {r: 1, g: 0, b: 1, a: 1}
|
||||
gaugeLife: {r: 1, g: 0, b: 0, a: 1}
|
||||
gaugeShield: {r: 0, g: 1, b: 1, a: 1}
|
||||
gaugeCadence: {r: 1, g: 1, b: 1, a: 1}
|
||||
gaugeProgress: {r: 1, g: 1, b: 1, a: 1}
|
||||
lineSubtle: {r: 0.16862746, g: 0.3372549, b: 0.3764706, a: 1}
|
||||
lineActive: {r: 0.36862746, g: 0.92156863, b: 1, a: 1}
|
||||
lineCritical: {r: 1, g: 0.20784314, b: 0.3647059, a: 1}
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 45f285d36d68d43cbb85c7b85d1125ad
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -12,29 +12,30 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: b9a2dd3bc25546bfb126b9445e977c3c, type: 3}
|
||||
m_Name: pictorial-protocol.default
|
||||
m_EditorClassIdentifier: Gameplay::Intrepid.Gameplay.Codex.Visual.PictorialProtocolTag
|
||||
code: dcfda51c61c345898e10ae7aeae468ce
|
||||
code: pictorial-protocol.default
|
||||
localization: {fileID: 0}
|
||||
description: {fileID: 0}
|
||||
interfaceStyle:
|
||||
surfaceBase: {r: 0.02745098, g: 0.0627451, b: 0.078431375, a: 1}
|
||||
surfaceRaised: {r: 0.0627451, g: 0.1254902, b: 0.14901961, a: 1}
|
||||
surfaceDeep: {r: 0.011764706, g: 0.02745098, b: 0.03137255, a: 1}
|
||||
surfaceOverlay: {r: 0.08627451, g: 0.16862746, b: 0.2, a: 0.8}
|
||||
surfaceOverlay: {r: 0.11485404, g: 0.23029463, b: 0.2735849, a: 0.8}
|
||||
textPrimary: {r: 0.84705883, g: 0.96862745, b: 1, a: 1}
|
||||
textSecondary: {r: 0.56078434, g: 0.78039217, b: 0.81960785, a: 1}
|
||||
textMuted: {r: 0.32156864, g: 0.4745098, b: 0.50980395, a: 1}
|
||||
textDisabled: {r: 0.18431373, g: 0.27450982, b: 0.29803923, a: 1}
|
||||
focus: {r: 0.36862746, g: 0.92156863, b: 1, a: 1}
|
||||
selected: {r: 0.6156863, g: 1, b: 0.9019608, a: 1}
|
||||
disabled: {r: 0.23137255, g: 0.33333334, b: 0.36078432, a: 1}
|
||||
denied: {r: 1, g: 0.41568628, b: 0.2901961, a: 1}
|
||||
warning: {r: 1, g: 0.81960785, b: 0.4, a: 1}
|
||||
danger: {r: 1, g: 0.20784314, b: 0.3647059, a: 1}
|
||||
corruption: {r: 0.7058824, g: 0.36078432, b: 1, a: 1}
|
||||
life: {r: 1, g: 0.23137255, b: 0.30980393, a: 1}
|
||||
shield: {r: 0.21960784, g: 0.8509804, b: 1, a: 1}
|
||||
cadence: {r: 0.9647059, g: 0.9529412, b: 0.8235294, a: 1}
|
||||
progress: {r: 0.6156863, g: 1, b: 0.9019608, a: 1}
|
||||
signalPrimary: {r: 0.3921569, g: 0.5843138, b: 0.9294118, a: 1}
|
||||
signalSecondary: {r: 0.1254902, g: 0.6980392, b: 0.6666667, a: 1}
|
||||
signalFocus: {r: 1, g: 1, b: 1, a: 1}
|
||||
signalSelected: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
|
||||
signalDisabled: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
signalDenied: {r: 0.5450981, g: 0, b: 0, a: 1}
|
||||
signalWarning: {r: 1, g: 0.6470588, b: 0, a: 1}
|
||||
signalCorruption: {r: 1, g: 0, b: 1, a: 1}
|
||||
gaugeLife: {r: 1, g: 0, b: 0, a: 1}
|
||||
gaugeShield: {r: 0, g: 1, b: 1, a: 1}
|
||||
gaugeCadence: {r: 1, g: 1, b: 1, a: 1}
|
||||
gaugeProgress: {r: 1, g: 1, b: 1, a: 1}
|
||||
lineSubtle: {r: 0.16862746, g: 0.3372549, b: 0.3764706, a: 1}
|
||||
lineActive: {r: 0.36862746, g: 0.92156863, b: 1, a: 1}
|
||||
lineCritical: {r: 1, g: 0.20784314, b: 0.3647059, a: 1}
|
||||
BIN
Assets/Resources/Graphics/UI/border-16bit.png
(Stored with Git LFS)
Normal file
BIN
Assets/Resources/Graphics/UI/border-16bit.png
(Stored with Git LFS)
Normal file
Binary file not shown.
130
Assets/Resources/Graphics/UI/border-16bit.png.meta
Normal file
130
Assets/Resources/Graphics/UI/border-16bit.png.meta
Normal file
@ -0,0 +1,130 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 783ec4722d98e4c1ebf1fe4440e41a04
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 0
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 128
|
||||
spriteBorder: {x: 15, y: 15, z: 15, w: 15}
|
||||
spriteGenerateFallbackPhysicsShape: 0
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 64
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 1537655665
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Resources/Graphics/UI/window-16bit-content-mask.png
(Stored with Git LFS)
BIN
Assets/Resources/Graphics/UI/window-16bit-content-mask.png
(Stored with Git LFS)
Binary file not shown.
@ -0,0 +1,20 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 671522e89c004981804e95c2e4772ba4, type: 3}
|
||||
m_Name: codex-window-test.window.data
|
||||
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.Data.WindowData
|
||||
id: c5c6460a64624f5eb184dc12e2a7ad0c
|
||||
shouldBeKeptAlwaysEnabled: 0
|
||||
onEntry: {fileID: 11400000, guid: 19ca7326a886040368b9a97112b7ac79, type: 2}
|
||||
onExit: {fileID: 11400000, guid: 3d482b6144a2c4056886da54a2b44de4, type: 2}
|
||||
onShow: {fileID: 11400000, guid: 73b8a7b1bfe2640c18d78902b9000db9, type: 2}
|
||||
onHide: {fileID: 11400000, guid: 4202e7cd097404cebb92dc257aea87eb, type: 2}
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 99fd11e76bba64e05b7e6b4b77755ec2
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,18 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6f2337b04d5e44dba892ac6b72ae7e44, type: 3}
|
||||
m_Name: codex-window-test.window.enter
|
||||
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.Data.WindowAnimationData
|
||||
mode: 0
|
||||
direction: 0
|
||||
soundEffect: {fileID: 0}
|
||||
animationSpeed: 2
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 19ca7326a886040368b9a97112b7ac79
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,18 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6f2337b04d5e44dba892ac6b72ae7e44, type: 3}
|
||||
m_Name: codex-window-test.window.exit
|
||||
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.Data.WindowAnimationData
|
||||
mode: 0
|
||||
direction: 1
|
||||
soundEffect: {fileID: 0}
|
||||
animationSpeed: 1
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3d482b6144a2c4056886da54a2b44de4
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,18 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6f2337b04d5e44dba892ac6b72ae7e44, type: 3}
|
||||
m_Name: codex-window-test.window.hide
|
||||
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.Data.WindowAnimationData
|
||||
mode: 2
|
||||
direction: 1
|
||||
soundEffect: {fileID: 0}
|
||||
animationSpeed: 4
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4202e7cd097404cebb92dc257aea87eb
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,18 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6f2337b04d5e44dba892ac6b72ae7e44, type: 3}
|
||||
m_Name: codex-window-test.window.show
|
||||
m_EditorClassIdentifier: Intrepid General Utilities::Intrepid.Window.Data.WindowAnimationData
|
||||
mode: 2
|
||||
direction: 0
|
||||
soundEffect: {fileID: 0}
|
||||
animationSpeed: 4
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 73b8a7b1bfe2640c18d78902b9000db9
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
3
Assets/Scripts/Intrepid/Gameplay/Codex/UI.meta
Normal file
3
Assets/Scripts/Intrepid/Gameplay/Codex/UI.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56db2148d99e48e1a01eef1608abac6e
|
||||
timeCreated: 1783324446
|
||||
@ -0,0 +1,16 @@
|
||||
using Intrepid.SimpleEvents;
|
||||
|
||||
namespace Intrepid.Gameplay.Codex.UI
|
||||
{
|
||||
public class CodexWindowContext
|
||||
{
|
||||
public EventBus LocalBus { get; }
|
||||
public CodexWindowUI Window { get; }
|
||||
|
||||
public CodexWindowContext(EventBus localBus, CodexWindowUI window)
|
||||
{
|
||||
LocalBus = localBus;
|
||||
Window = window;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3ef53351fd53400ebee9695cddcd88cc
|
||||
timeCreated: 1783341153
|
||||
@ -6,6 +6,7 @@ using Intrepid.Gameplay.Entities.Player.ActionBelt.UI;
|
||||
using Intrepid.Gameplay.Entities.Player.Events;
|
||||
using Intrepid.Gameplay.Entities.Player.PDA.UI;
|
||||
using Intrepid.Gameplay.Entities.Player.Sentinel.Cadence.UI;
|
||||
using Intrepid.Gameplay.Entities.Player.UI;
|
||||
using Intrepid.SimpleEvents;
|
||||
using Intrepid.Utilities;
|
||||
using Intrepid.Window;
|
||||
@ -13,14 +14,14 @@ using Intrepid.Window.Data;
|
||||
using Intrepid.Window.Events;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Intrepid.Gameplay.Entities.Player.UI
|
||||
namespace Intrepid.Gameplay.Codex.UI
|
||||
{
|
||||
public class PlayerWindowManager : EventListener
|
||||
public class CodexWindowManager : EventListener
|
||||
{
|
||||
[GroupConfigurations, SerializeField] private CadenceUI cadenceUI;
|
||||
[GroupConfigurations, SerializeField] private LifeShieldMeterUI lifeShieldUI;
|
||||
[GroupConfigurations, SerializeField] private GadgetsUI gadgetsUI;
|
||||
[GroupConfigurations, SerializeField] private ActionBeltUI actionBeltUI;
|
||||
[GroupConfigurations, SerializeField] private CodexActionBeltUI actionBeltUI;
|
||||
[GroupConfigurations, SerializeField] private PDADeviceUI pdaDeviceUI;
|
||||
|
||||
private Dictionary<WindowData, Window.Window> WindowsMap { get; } = new();
|
||||
98
Assets/Scripts/Intrepid/Gameplay/Codex/UI/CodexWindowUI.cs
Normal file
98
Assets/Scripts/Intrepid/Gameplay/Codex/UI/CodexWindowUI.cs
Normal file
@ -0,0 +1,98 @@
|
||||
using System;
|
||||
using Intrepid.Gameplay.Codex.UI.Controllers;
|
||||
using Intrepid.Gameplay.Codex.Visual;
|
||||
using Intrepid.Gameplay.Codex.Visual.Events;
|
||||
using Intrepid.SimpleEvents;
|
||||
|
||||
namespace Intrepid.Gameplay.Codex.UI
|
||||
{
|
||||
public class CodexWindowUI : ManagedWindowUI, IWindowLifecycle
|
||||
{
|
||||
private CodexControllerUI[] Controllers { get; set; }
|
||||
private EventBus LocalBus { get; } = new();
|
||||
|
||||
protected override void InitializeVariables()
|
||||
{
|
||||
Controllers = GetComponentsInChildren<CodexControllerUI>(true);
|
||||
}
|
||||
|
||||
protected override void OnBootstrap()
|
||||
{
|
||||
var ctx = new CodexWindowContext(LocalBus, this);
|
||||
foreach (var controller in Controllers)
|
||||
{
|
||||
if (controller.IsNull()) continue;
|
||||
controller.BindToWindow(ctx);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Subscriptions()
|
||||
{
|
||||
Subscribe<CodexVisualChangedEvent>(e =>
|
||||
{
|
||||
foreach (var controller in Controllers)
|
||||
{
|
||||
if (controller.IsNull()) continue;
|
||||
controller.ApplyCodexVisuals(e.Context);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public virtual void BeforeOpen()
|
||||
{
|
||||
var visualContext = CodexVisualService.Instance.CurrentContext;
|
||||
foreach (var controller in Controllers)
|
||||
{
|
||||
if (controller.IsNull()) continue;
|
||||
controller.ApplyCodexVisuals(visualContext);
|
||||
controller.BeforeOpen();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void AfterOpen()
|
||||
{
|
||||
foreach (var controller in Controllers)
|
||||
{
|
||||
if (controller.IsNull()) continue;
|
||||
controller.AfterOpen();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void BeforeClose()
|
||||
{
|
||||
foreach (var controller in Controllers)
|
||||
{
|
||||
if (controller.IsNull()) continue;
|
||||
controller.BeforeClose();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void AfterClose()
|
||||
{
|
||||
foreach (var controller in Controllers)
|
||||
{
|
||||
if (controller.IsNull()) continue;
|
||||
controller.AfterClose();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void EnableInput()
|
||||
{
|
||||
foreach (var controller in Controllers)
|
||||
{
|
||||
if (controller.IsNull()) continue;
|
||||
controller.EnableInput();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void DisableInput()
|
||||
{
|
||||
foreach (var controller in Controllers)
|
||||
{
|
||||
if (controller.IsNull()) continue;
|
||||
controller.DisableInput();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d11ca2e11a4c4d3f8165f4aebe47e159
|
||||
timeCreated: 1783325103
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 51a6f5840a4240a98937aa3dc9a582a2
|
||||
timeCreated: 1783336021
|
||||
@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using Intrepid.Utilities;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Intrepid.Gameplay.Codex.UI.Components
|
||||
{
|
||||
public class CodexColorEffectTargetUI : MonoBehaviour
|
||||
{
|
||||
[GroupInjections, SerializeField] private Graphic target;
|
||||
[GroupInjections, SerializeField] private CodexColorEffectUI colorEffectUI;
|
||||
|
||||
public void Apply(Color targetColor)
|
||||
{
|
||||
if (target.IsNull()) return;
|
||||
|
||||
if (colorEffectUI.IsNotNull() && colorEffectUI.isActiveAndEnabled)
|
||||
{
|
||||
colorEffectUI.Apply(target, targetColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
target.color = targetColor;
|
||||
}
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
if (target.IsNull()) return;
|
||||
|
||||
if (colorEffectUI.IsNotNull() && colorEffectUI.isActiveAndEnabled)
|
||||
{
|
||||
colorEffectUI.Stop(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9fdd777f66294b459eed0f053329b0bf
|
||||
timeCreated: 1783352236
|
||||
@ -0,0 +1,14 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Intrepid.Gameplay.Codex.UI.Components
|
||||
{
|
||||
public abstract class CodexColorEffectUI : MonoBehaviour
|
||||
{
|
||||
public abstract void Apply(Graphic target, Color targetColor);
|
||||
|
||||
public virtual void Stop(Graphic target)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e6663fbb14c4509b0c621598065eb9d
|
||||
timeCreated: 1783351271
|
||||
@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Intrepid.Utilities;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Intrepid.Gameplay.Codex.UI.Components
|
||||
{
|
||||
public class CodexColorLerpEffectUI : CodexColorEffectUI
|
||||
{
|
||||
[SerializeField] private bool useUnscaledTime = true;
|
||||
[SerializeField, Min(0.05f)] private float duration = 0.12f;
|
||||
[SerializeField] private AnimationCurve curve = AnimationCurve.EaseInOut(0, 0, 1, 1);
|
||||
|
||||
private Coroutine Routine { get; set; }
|
||||
|
||||
public override void Apply(Graphic target, Color targetColor)
|
||||
{
|
||||
if (target.IsNull()) return;
|
||||
|
||||
if (Routine is not null)
|
||||
{
|
||||
StopCoroutine(Routine);
|
||||
Routine = null;
|
||||
}
|
||||
|
||||
Routine = StartCoroutine(TransitionRoutine(target, targetColor));
|
||||
}
|
||||
|
||||
private IEnumerator TransitionRoutine(Graphic target, Color targetColor)
|
||||
{
|
||||
var sourceColor = target.color;
|
||||
var elapsed = 0f;
|
||||
|
||||
while (elapsed < duration)
|
||||
{
|
||||
elapsed += useUnscaledTime ? Timer.UnscaledTime : Timer.ScaledTime;
|
||||
|
||||
var t = Mathf.Clamp01(elapsed / duration);
|
||||
var eased = curve?.Evaluate(t) ?? t;
|
||||
|
||||
target.color = Color.LerpUnclamped(sourceColor, targetColor, eased);
|
||||
yield return null;
|
||||
}
|
||||
|
||||
target.color = targetColor;
|
||||
Routine = null;
|
||||
}
|
||||
|
||||
public override void Stop(Graphic target)
|
||||
{
|
||||
if (Routine is not null)
|
||||
{
|
||||
StopCoroutine(Routine);
|
||||
Routine = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b6f8f94415894c37ba6e10b5acebaab1
|
||||
timeCreated: 1783349619
|
||||
@ -0,0 +1,42 @@
|
||||
using Intrepid.Gameplay.Codex.Visual;
|
||||
using Intrepid.Utilities;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Intrepid.Gameplay.Codex.UI.Components
|
||||
{
|
||||
public abstract class CodexComponentUI : MonoBehaviour, IWindowLifecycle
|
||||
{
|
||||
public abstract void ApplyCodexVisuals(CodexVisualContext ctx);
|
||||
|
||||
public virtual void BeforeOpen()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void AfterOpen()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void BeforeClose()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void AfterClose()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void EnableInput()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void DisableInput()
|
||||
{
|
||||
}
|
||||
|
||||
[GroupDebug, Button(ButtonSizes.Medium, ButtonStyle.FoldoutButton)]
|
||||
private void SetVisualsBasedOn(PictorialProtocolTag protocol)
|
||||
{
|
||||
ApplyCodexVisuals(new CodexVisualContext(protocol, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e897b39193ce4c68af3aa6425235e862
|
||||
timeCreated: 1783324459
|
||||
@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using Intrepid.Gameplay.Codex.Visual;
|
||||
using Intrepid.Utilities;
|
||||
using Intrepid.Utilities.Sprite;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Intrepid.Gameplay.Codex.UI.Components
|
||||
{
|
||||
public class CodexIconComponentUI : CodexComponentUI
|
||||
{
|
||||
[GroupInjections, SerializeField] private Image icon;
|
||||
[GroupInjections, SerializeField] private SpriteAnimationController iconAnimation;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
iconAnimation.PostProcessingUpdateSprite = sprite =>
|
||||
{
|
||||
if (sprite.IsNull()) return;
|
||||
icon.sprite = sprite;
|
||||
};
|
||||
}
|
||||
|
||||
public void ChangeAnimation(string animationId)
|
||||
{
|
||||
iconAnimation.ChangeAnimation(animationId);
|
||||
}
|
||||
|
||||
public void AnimationReset()
|
||||
{
|
||||
iconAnimation.SpriteAnimation.Reset();
|
||||
}
|
||||
|
||||
public override void ApplyCodexVisuals(CodexVisualContext ctx)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1114a7330e7844be97be4cae5617b5c1
|
||||
timeCreated: 1783359678
|
||||
@ -0,0 +1,45 @@
|
||||
using Intrepid.Gameplay.Codex.Visual;
|
||||
using Intrepid.Utilities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Intrepid.Gameplay.Codex.UI.Components
|
||||
{
|
||||
public class CodexPanelComponentUI : CodexComponentUI
|
||||
{
|
||||
[GroupConfigurations, SerializeField] private PictorialSurfaceType backgroundType = PictorialSurfaceType.Base;
|
||||
[GroupConfigurations, SerializeField] private PictorialSignalType borderType = PictorialSignalType.Primary;
|
||||
|
||||
[GroupInjections, SerializeField] private CodexColorEffectTargetUI background;
|
||||
[GroupInjections, SerializeField] private CodexColorEffectTargetUI border;
|
||||
|
||||
public PictorialSurfaceType BackgroundType => backgroundType;
|
||||
public PictorialSignalType BorderType => borderType;
|
||||
|
||||
public void SetSurface(PictorialSurfaceType surface)
|
||||
{
|
||||
backgroundType = surface;
|
||||
var ctx = CodexVisualService.Instance.CurrentContext;
|
||||
background?.Apply(ctx.Protocol.GetSurfaceColor(backgroundType));
|
||||
}
|
||||
|
||||
public void SetBorder(PictorialSignalType signal)
|
||||
{
|
||||
borderType = signal;
|
||||
var ctx = CodexVisualService.Instance.CurrentContext;
|
||||
border?.Apply(ctx.Protocol.GetSignalColor(borderType));
|
||||
}
|
||||
|
||||
public override void ApplyCodexVisuals(CodexVisualContext ctx)
|
||||
{
|
||||
background?.Apply(ctx.Protocol.GetSurfaceColor(backgroundType));
|
||||
border?.Apply(ctx.Protocol.GetSignalColor(borderType));
|
||||
}
|
||||
|
||||
public override void BeforeClose()
|
||||
{
|
||||
base.BeforeClose();
|
||||
background?.Stop();
|
||||
border?.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d3124472724d4e3c84499514f80267f6
|
||||
timeCreated: 1783331219
|
||||
@ -0,0 +1,35 @@
|
||||
using Intrepid.Gameplay.Codex.Visual;
|
||||
using Intrepid.Utilities;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Intrepid.Gameplay.Codex.UI.Components
|
||||
{
|
||||
public class CodexSurfaceComponentUI : CodexComponentUI
|
||||
{
|
||||
[GroupConfigurations, SerializeField] private PictorialSurfaceType backgroundType = PictorialSurfaceType.Base;
|
||||
[GroupConfigurations, SerializeField] private bool replaceAlpha;
|
||||
[GroupConfigurations, SerializeField, Range(0, 1), ShowIf("replaceAlpha")] private float alpha = .5f;
|
||||
|
||||
[GroupInjections, SerializeField] private CodexColorEffectTargetUI background;
|
||||
|
||||
public PictorialSurfaceType BackgroundType
|
||||
{
|
||||
get => backgroundType;
|
||||
set => backgroundType = value;
|
||||
}
|
||||
|
||||
public override void ApplyCodexVisuals(CodexVisualContext ctx)
|
||||
{
|
||||
var sc = ctx.Protocol.GetSurfaceColor(backgroundType);
|
||||
if (replaceAlpha) sc = new Color(sc.r, sc.g, sc.b, alpha);
|
||||
background?.Apply(sc);
|
||||
}
|
||||
|
||||
public override void BeforeClose()
|
||||
{
|
||||
base.BeforeClose();
|
||||
background?.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5f5e340eecbf4357824ae9b6722bd17d
|
||||
timeCreated: 1783329567
|
||||
@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using Intrepid.Gameplay.Codex.Visual;
|
||||
using Intrepid.Utilities;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Intrepid.Gameplay.Codex.UI.Components
|
||||
{
|
||||
public class CodexTextComponentUI : CodexComponentUI
|
||||
{
|
||||
[GroupConfigurations, SerializeField] private PictorialTextType textType = PictorialTextType.Primary;
|
||||
|
||||
[GroupInjections, SerializeField] private TextMeshProUGUI textMesh;
|
||||
|
||||
public string Value
|
||||
{
|
||||
get => textMesh.IsNotNull() ? textMesh.text : string.Empty;
|
||||
set
|
||||
{
|
||||
if (textMesh.IsNull()) return;
|
||||
textMesh.text = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override void ApplyCodexVisuals(CodexVisualContext ctx)
|
||||
{
|
||||
textMesh.color = ctx.Protocol.GetTextColor(textType);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 278969964b614736b3613547c0c4a4aa
|
||||
timeCreated: 1783335743
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fdeeb3bd09f449c7a95b1f188696a428
|
||||
timeCreated: 1783338286
|
||||
@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Intrepid.Gameplay.Codex.UI.Components;
|
||||
using Intrepid.Gameplay.Codex.Visual;
|
||||
using Intrepid.SimpleEvents;
|
||||
using Intrepid.Utilities;
|
||||
|
||||
namespace Intrepid.Gameplay.Codex.UI.Controllers
|
||||
{
|
||||
public abstract class CodexControllerUI : Identification, IWindowLifecycle
|
||||
{
|
||||
private List<CodexComponentUI> Components { get; set; }
|
||||
private bool IsOpenSubscribed { get; set; }
|
||||
private bool IsInputSubscribed { get; set; }
|
||||
private CodexWindowContext WindowContext { get; set; }
|
||||
private EventBus LocalBus => WindowContext?.LocalBus;
|
||||
|
||||
protected string OpenSubscriptionId => $"codex.ui.open.{GetType().Name}.{Id}";
|
||||
protected string InputSubscriptionId => $"codex.ui.input.{GetType().Name}.{Id}";
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
Components = GetComponentsInChildren<CodexComponentUI>(true)
|
||||
.Where(component =>
|
||||
{
|
||||
var owner = component.GetComponentInParent<CodexControllerUI>();
|
||||
return owner == this;
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public void BindToWindow(CodexWindowContext ctx)
|
||||
{
|
||||
WindowContext = ctx;
|
||||
OnBindToWindow();
|
||||
}
|
||||
|
||||
public virtual void BeforeOpen()
|
||||
{
|
||||
if (!IsOpenSubscribed && LocalBus is not null)
|
||||
{
|
||||
OnOpenSubscribe(new CodexSubscriber(LocalBus, OpenSubscriptionId));
|
||||
IsOpenSubscribed = true;
|
||||
}
|
||||
|
||||
foreach (var component in Components)
|
||||
{
|
||||
if (component.IsNull()) continue;
|
||||
component.BeforeOpen();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void AfterOpen()
|
||||
{
|
||||
foreach (var component in Components)
|
||||
{
|
||||
if (component.IsNull()) continue;
|
||||
component.AfterOpen();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void BeforeClose()
|
||||
{
|
||||
foreach (var component in Components)
|
||||
{
|
||||
if (component.IsNull()) continue;
|
||||
component.BeforeClose();
|
||||
}
|
||||
|
||||
if (IsOpenSubscribed && LocalBus is not null)
|
||||
{
|
||||
LocalBus.UnSubscribe(OpenSubscriptionId);
|
||||
IsOpenSubscribed = false;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void AfterClose()
|
||||
{
|
||||
foreach (var component in Components)
|
||||
{
|
||||
if (component.IsNull()) continue;
|
||||
component.AfterClose();
|
||||
}
|
||||
}
|
||||
|
||||
public void EnableInput()
|
||||
{
|
||||
if (!IsInputSubscribed && LocalBus is not null)
|
||||
{
|
||||
OnInputSubscribe(new CodexSubscriber(LocalBus, InputSubscriptionId));
|
||||
IsInputSubscribed = true;
|
||||
}
|
||||
|
||||
foreach (var component in Components)
|
||||
{
|
||||
if (component.IsNull()) continue;
|
||||
component.EnableInput();
|
||||
}
|
||||
}
|
||||
|
||||
public void DisableInput()
|
||||
{
|
||||
foreach (var component in Components)
|
||||
{
|
||||
if (component.IsNull()) continue;
|
||||
component.DisableInput();
|
||||
}
|
||||
|
||||
if (IsInputSubscribed && LocalBus is not null)
|
||||
{
|
||||
LocalBus.UnSubscribe(InputSubscriptionId);
|
||||
IsInputSubscribed = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Raise<T>(T anEvent) where T : IEventBase
|
||||
{
|
||||
LocalBus.Raise(anEvent);
|
||||
}
|
||||
|
||||
public void ApplyCodexVisuals(CodexVisualContext visualContext)
|
||||
{
|
||||
foreach (var component in Components)
|
||||
{
|
||||
if (component.IsNull()) continue;
|
||||
component.ApplyCodexVisuals(visualContext);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void OnBindToWindow()
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OnOpenSubscribe(CodexSubscriber subscriber)
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OnInputSubscribe(CodexSubscriber subscriber)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 532ea2ec06054cc08c6300251deee0a0
|
||||
timeCreated: 1783338297
|
||||
@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using Intrepid.SimpleEvents;
|
||||
|
||||
namespace Intrepid.Gameplay.Codex.UI.Controllers
|
||||
{
|
||||
public readonly struct CodexSubscriber
|
||||
{
|
||||
private EventBus EventBus { get; }
|
||||
private string SubscriptionId { get; }
|
||||
|
||||
public CodexSubscriber(EventBus eventBus, string subscriptionId)
|
||||
{
|
||||
EventBus = eventBus;
|
||||
SubscriptionId = subscriptionId;
|
||||
}
|
||||
|
||||
public void Subscribe<T>(Action<T> action) where T: IEventBase
|
||||
{
|
||||
EventBus.Subscribe(SubscriptionId, action);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5a967f104097492792bff5c3685f921f
|
||||
timeCreated: 1783339757
|
||||
@ -0,0 +1,7 @@
|
||||
namespace Intrepid.Gameplay.Codex.UI.Controllers
|
||||
{
|
||||
public class CodexTestControllerUI : CodexControllerUI
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 968279ca1a7149f7bd4c7122ada8bbd3
|
||||
timeCreated: 1783354853
|
||||
@ -0,0 +1,13 @@
|
||||
namespace Intrepid.Gameplay.Codex.UI
|
||||
{
|
||||
public interface IWindowLifecycle
|
||||
{
|
||||
void BeforeOpen();
|
||||
void AfterOpen();
|
||||
void BeforeClose();
|
||||
void AfterClose();
|
||||
|
||||
void EnableInput();
|
||||
void DisableInput();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 84aed53c63f146b99d29642cbc1aad20
|
||||
timeCreated: 1783327106
|
||||
@ -3,7 +3,7 @@ using Intrepid.Utilities;
|
||||
using Intrepid.Window.Data;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Intrepid.Gameplay.Entities.Player.UI
|
||||
namespace Intrepid.Gameplay.Codex.UI
|
||||
{
|
||||
public abstract class ManagedWindowUI : EventListener
|
||||
{
|
||||
@ -1,10 +0,0 @@
|
||||
namespace Intrepid.Gameplay.Codex.Visual
|
||||
{
|
||||
public enum CodexVisualChangeMode
|
||||
{
|
||||
Instant,
|
||||
Preview,
|
||||
Commit,
|
||||
CancelPreview
|
||||
}
|
||||
}
|
||||
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f5c4907cbeb64120a1e148ea392e38f
|
||||
@ -6,14 +6,12 @@ namespace Intrepid.Gameplay.Codex.Visual
|
||||
public class CodexVisualContext
|
||||
{
|
||||
public PictorialProtocolTag Protocol { get; }
|
||||
public int Version { get; }
|
||||
public bool IsPreview { get; }
|
||||
public long Version { get; }
|
||||
|
||||
public CodexVisualContext(PictorialProtocolTag protocol, int version, bool isPreview = false)
|
||||
public CodexVisualContext(PictorialProtocolTag protocol, long version)
|
||||
{
|
||||
Protocol = protocol;
|
||||
Version = version;
|
||||
IsPreview = isPreview;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using Intrepid.GameManagers;
|
||||
using Intrepid.Gameplay.Codex.Visual.Events;
|
||||
using Intrepid.Utilities;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Intrepid.Gameplay.Codex.Visual
|
||||
@ -13,64 +15,36 @@ namespace Intrepid.Gameplay.Codex.Visual
|
||||
public class CodexVisualService : SingletonMonoBehaviour<CodexVisualService>
|
||||
{
|
||||
[GroupConfigurations, SerializeField] private PictorialProtocolTag defaultProtocol;
|
||||
[GroupDebug, SerializeField] private PictorialProtocolTag currentProtocol;
|
||||
[GroupConfigurations, SerializeField] private PictorialProtocolTag currentProtocol;
|
||||
|
||||
private int version;
|
||||
private PictorialProtocolTag committedProtocol;
|
||||
private CodexVisualContext currentContext;
|
||||
private long Version { get; set; }
|
||||
private CodexVisualContext _currentContext;
|
||||
|
||||
public PictorialProtocolTag CurrentPictorialProtocol => currentProtocol ?? defaultProtocol;
|
||||
public PictorialProtocolTag CurrentPictorialProtocol => currentProtocol.IsNull() ? defaultProtocol : currentProtocol;
|
||||
public CodexVisualContext CurrentContext
|
||||
{
|
||||
get
|
||||
{
|
||||
currentContext ??= new CodexVisualContext(CurrentPictorialProtocol, version);
|
||||
return currentContext;
|
||||
_currentContext ??= new CodexVisualContext(CurrentPictorialProtocol, Version);
|
||||
return _currentContext;
|
||||
}
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
SingletonInstantiation(false, _ => { });
|
||||
committedProtocol = CurrentPictorialProtocol;
|
||||
currentContext = new CodexVisualContext(CurrentPictorialProtocol, version);
|
||||
_currentContext = new CodexVisualContext(CurrentPictorialProtocol, Version);
|
||||
}
|
||||
|
||||
public void ApplyTheme(PictorialProtocolTag protocol, CodexVisualChangeMode mode = CodexVisualChangeMode.Commit)
|
||||
{
|
||||
var nextProtocol = protocol ?? defaultProtocol;
|
||||
var previousProtocol = CurrentPictorialProtocol;
|
||||
|
||||
if (previousProtocol == nextProtocol && mode != CodexVisualChangeMode.CancelPreview) return;
|
||||
|
||||
currentProtocol = nextProtocol;
|
||||
if (CodexVisualChangeMode.Preview != mode)
|
||||
{
|
||||
committedProtocol = nextProtocol;
|
||||
}
|
||||
|
||||
currentContext = new CodexVisualContext(CurrentPictorialProtocol, ++version, mode == CodexVisualChangeMode.Preview);
|
||||
RaiseChanged(previousProtocol, CurrentPictorialProtocol, mode);
|
||||
}
|
||||
|
||||
public void PreviewTheme(PictorialProtocolTag protocol)
|
||||
{
|
||||
ApplyTheme(protocol, CodexVisualChangeMode.Preview);
|
||||
}
|
||||
|
||||
public void CancelPreview()
|
||||
{
|
||||
ApplyTheme(committedProtocol, CodexVisualChangeMode.CancelPreview);
|
||||
}
|
||||
|
||||
private void RaiseChanged(PictorialProtocolTag previousProtocol, PictorialProtocolTag nextProtocol, CodexVisualChangeMode mode)
|
||||
[GroupDebug, Button(ButtonSizes.Medium, ButtonStyle.FoldoutButton)]
|
||||
public void ApplyTheme(PictorialProtocolTag protocol)
|
||||
{
|
||||
if (CurrentPictorialProtocol == protocol) return;
|
||||
currentProtocol = protocol;
|
||||
_currentContext = new CodexVisualContext(CurrentPictorialProtocol, ++Version);
|
||||
Proxy.Instance.EventBus.Raise(new CodexVisualChangedEvent
|
||||
{
|
||||
PreviousProtocol = previousProtocol,
|
||||
CurrentProtocol = nextProtocol,
|
||||
Context = CurrentContext,
|
||||
Mode = mode
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +1,9 @@
|
||||
using Intrepid.Gameplay.Codex.Knowledge;
|
||||
using Intrepid.SimpleEvents;
|
||||
|
||||
namespace Intrepid.Gameplay.Codex.Visual.Events
|
||||
{
|
||||
public class CodexVisualChangedEvent : IEventBase
|
||||
{
|
||||
public PictorialProtocolTag PreviousProtocol { get; set; }
|
||||
public PictorialProtocolTag CurrentProtocol { get; set; }
|
||||
public CodexVisualContext Context { get; set; }
|
||||
public CodexVisualChangeMode Mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
namespace Intrepid.Gameplay.Codex.Visual
|
||||
{
|
||||
public enum PictorialGaugeType
|
||||
{
|
||||
Life,
|
||||
Shield,
|
||||
Cadence,
|
||||
Progress
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b6432d0026b34b31942c8db1e3937f9f
|
||||
timeCreated: 1783330707
|
||||
@ -0,0 +1,9 @@
|
||||
namespace Intrepid.Gameplay.Codex.Visual
|
||||
{
|
||||
public enum PictorialLineType
|
||||
{
|
||||
Subtle,
|
||||
Active,
|
||||
Critical
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f3469c37f5084d599afa1262da269b47
|
||||
timeCreated: 1783330731
|
||||
@ -22,6 +22,69 @@ namespace Intrepid.Gameplay.Codex.Visual
|
||||
|
||||
// katakana
|
||||
// kanji
|
||||
|
||||
public Color GetSurfaceColor(PictorialSurfaceType surfaceType)
|
||||
{
|
||||
return surfaceType switch
|
||||
{
|
||||
PictorialSurfaceType.Base => InterfaceStyle.SurfaceBase,
|
||||
PictorialSurfaceType.Raised => InterfaceStyle.SurfaceRaised,
|
||||
PictorialSurfaceType.Deep => InterfaceStyle.SurfaceDeep,
|
||||
PictorialSurfaceType.Overlay => InterfaceStyle.SurfaceOverlay,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(surfaceType), surfaceType, null)
|
||||
};
|
||||
}
|
||||
|
||||
public Color GetTextColor(PictorialTextType textType)
|
||||
{
|
||||
return textType switch
|
||||
{
|
||||
PictorialTextType.Primary => InterfaceStyle.TextPrimary,
|
||||
PictorialTextType.Secondary => InterfaceStyle.TextSecondary,
|
||||
PictorialTextType.Muted => InterfaceStyle.TextMuted,
|
||||
PictorialTextType.Disabled => InterfaceStyle.TextDisabled,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(textType), textType, null)
|
||||
};
|
||||
}
|
||||
|
||||
public Color GetSignalColor(PictorialSignalType signalType)
|
||||
{
|
||||
return signalType switch
|
||||
{
|
||||
PictorialSignalType.Primary => InterfaceStyle.SignalPrimary,
|
||||
PictorialSignalType.Secondary => InterfaceStyle.SignalSecondary,
|
||||
PictorialSignalType.Focus => InterfaceStyle.SignalFocus,
|
||||
PictorialSignalType.Selected => InterfaceStyle.SignalSelected,
|
||||
PictorialSignalType.Disabled => InterfaceStyle.SignalDisabled,
|
||||
PictorialSignalType.Denied => InterfaceStyle.SignalDenied,
|
||||
PictorialSignalType.Warning => InterfaceStyle.SignalWarning,
|
||||
PictorialSignalType.Corruption => InterfaceStyle.SignalCorruption,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(signalType), signalType, null)
|
||||
};
|
||||
}
|
||||
|
||||
public Color GetGaugeColor(PictorialGaugeType gaugeType)
|
||||
{
|
||||
return gaugeType switch
|
||||
{
|
||||
PictorialGaugeType.Life => InterfaceStyle.GaugeLife,
|
||||
PictorialGaugeType.Shield => InterfaceStyle.GaugeShield,
|
||||
PictorialGaugeType.Cadence => InterfaceStyle.GaugeCadence,
|
||||
PictorialGaugeType.Progress => InterfaceStyle.GaugeProgress,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(gaugeType), gaugeType, null)
|
||||
};
|
||||
}
|
||||
|
||||
public Color GetLineColor(PictorialLineType lineType)
|
||||
{
|
||||
return lineType switch
|
||||
{
|
||||
PictorialLineType.Subtle => InterfaceStyle.LineSubtle,
|
||||
PictorialLineType.Active => InterfaceStyle.LineActive,
|
||||
PictorialLineType.Critical => InterfaceStyle.LineCritical,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(lineType), lineType, null)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
@ -32,23 +95,24 @@ namespace Intrepid.Gameplay.Codex.Visual
|
||||
[GroupConfigurations("Surfaces"), SerializeField] private Color surfaceDeep = Color.black;
|
||||
[GroupConfigurations("Surfaces"), SerializeField] private Color surfaceOverlay = Color.black;
|
||||
|
||||
[GroupConfigurations("Text"), SerializeField] private Color textPrimary = Color.white;
|
||||
[GroupConfigurations("Text"), SerializeField] private Color textSecondary = Color.gray;
|
||||
[GroupConfigurations("Text"), SerializeField] private Color textMuted = Color.gray;
|
||||
[GroupConfigurations("Text"), SerializeField] private Color textDisabled = Color.gray;
|
||||
[GroupConfigurations("Texts"), SerializeField] private Color textPrimary = Color.white;
|
||||
[GroupConfigurations("Texts"), SerializeField] private Color textSecondary = Color.gray;
|
||||
[GroupConfigurations("Texts"), SerializeField] private Color textMuted = Color.gray;
|
||||
[GroupConfigurations("Texts"), SerializeField] private Color textDisabled = Color.gray;
|
||||
|
||||
[GroupConfigurations("Signals"), SerializeField] private Color focus = Color.white;
|
||||
[GroupConfigurations("Signals"), SerializeField] private Color selected = Color.white;
|
||||
[GroupConfigurations("Signals"), SerializeField] private Color disabled = Color.gray;
|
||||
[GroupConfigurations("Signals"), SerializeField] private Color denied = Color.red;
|
||||
[GroupConfigurations("Signals"), SerializeField] private Color warning = Color.yellow;
|
||||
[GroupConfigurations("Signals"), SerializeField] private Color danger = Color.red;
|
||||
[GroupConfigurations("Signals"), SerializeField] private Color corruption = Color.magenta;
|
||||
[GroupConfigurations("Signals"), SerializeField] private Color signalPrimary = Color.cornflowerBlue;
|
||||
[GroupConfigurations("Signals"), SerializeField] private Color signalSecondary = Color.lightSeaGreen;
|
||||
[GroupConfigurations("Signals"), SerializeField] private Color signalFocus = Color.white;
|
||||
[GroupConfigurations("Signals"), SerializeField] private Color signalSelected = Color.yellow;
|
||||
[GroupConfigurations("Signals"), SerializeField] private Color signalDisabled = Color.gray;
|
||||
[GroupConfigurations("Signals"), SerializeField] private Color signalDenied = Color.darkRed;
|
||||
[GroupConfigurations("Signals"), SerializeField] private Color signalWarning = Color.orange;
|
||||
[GroupConfigurations("Signals"), SerializeField] private Color signalCorruption = Color.magenta;
|
||||
|
||||
[GroupConfigurations("Resources"), SerializeField] private Color life = Color.red;
|
||||
[GroupConfigurations("Resources"), SerializeField] private Color shield = Color.cyan;
|
||||
[GroupConfigurations("Resources"), SerializeField] private Color cadence = Color.white;
|
||||
[GroupConfigurations("Resources"), SerializeField] private Color progress = Color.white;
|
||||
[GroupConfigurations("Gauges"), SerializeField] private Color gaugeLife = Color.red;
|
||||
[GroupConfigurations("Gauges"), SerializeField] private Color gaugeShield = Color.cyan;
|
||||
[GroupConfigurations("Gauges"), SerializeField] private Color gaugeCadence = Color.white;
|
||||
[GroupConfigurations("Gauges"), SerializeField] private Color gaugeProgress = Color.white;
|
||||
|
||||
[GroupConfigurations("Lines"), SerializeField] private Color lineSubtle = Color.gray;
|
||||
[GroupConfigurations("Lines"), SerializeField] private Color lineActive = Color.white;
|
||||
@ -64,18 +128,19 @@ namespace Intrepid.Gameplay.Codex.Visual
|
||||
public Color TextMuted => textMuted;
|
||||
public Color TextDisabled => textDisabled;
|
||||
|
||||
public Color Focus => focus;
|
||||
public Color Selected => selected;
|
||||
public Color Disabled => disabled;
|
||||
public Color Denied => denied;
|
||||
public Color Warning => warning;
|
||||
public Color Danger => danger;
|
||||
public Color Corruption => corruption;
|
||||
public Color SignalPrimary => signalPrimary;
|
||||
public Color SignalSecondary => signalSecondary;
|
||||
public Color SignalFocus => signalFocus;
|
||||
public Color SignalSelected => signalSelected;
|
||||
public Color SignalDisabled => signalDisabled;
|
||||
public Color SignalDenied => signalDenied;
|
||||
public Color SignalWarning => signalWarning;
|
||||
public Color SignalCorruption => signalCorruption;
|
||||
|
||||
public Color Life => life;
|
||||
public Color Shield => shield;
|
||||
public Color Cadence => cadence;
|
||||
public Color Progress => progress;
|
||||
public Color GaugeLife => gaugeLife;
|
||||
public Color GaugeShield => gaugeShield;
|
||||
public Color GaugeCadence => gaugeCadence;
|
||||
public Color GaugeProgress => gaugeProgress;
|
||||
|
||||
public Color LineSubtle => lineSubtle;
|
||||
public Color LineActive => lineActive;
|
||||
@ -140,15 +205,16 @@ namespace Intrepid.Gameplay.Codex.Visual
|
||||
[GroupDebug, Button(ButtonSizes.Medium, ButtonStyle.FoldoutButton)]
|
||||
private void SetSignalsColorSchema(string colorSchema)
|
||||
{
|
||||
if (TryParseColor(colorSchema, 7, out var colors))
|
||||
if (TryParseColor(colorSchema, 8, out var colors))
|
||||
{
|
||||
focus = colors[0];
|
||||
selected = colors[1];
|
||||
disabled = colors[2];
|
||||
denied = colors[3];
|
||||
warning = colors[4];
|
||||
danger = colors[5];
|
||||
corruption = colors[6];
|
||||
signalPrimary = colors[0];
|
||||
signalSecondary = colors[1];
|
||||
signalFocus = colors[2];
|
||||
signalSelected = colors[3];
|
||||
signalDisabled = colors[4];
|
||||
signalDenied = colors[5];
|
||||
signalWarning = colors[6];
|
||||
signalCorruption = colors[7];
|
||||
}
|
||||
}
|
||||
|
||||
@ -157,10 +223,10 @@ namespace Intrepid.Gameplay.Codex.Visual
|
||||
{
|
||||
if (TryParseColor(colorSchema, 4, out var colors))
|
||||
{
|
||||
life = colors[0];
|
||||
shield = colors[1];
|
||||
cadence = colors[2];
|
||||
progress = colors[3];
|
||||
gaugeLife = colors[0];
|
||||
gaugeShield = colors[1];
|
||||
gaugeCadence = colors[2];
|
||||
gaugeProgress = colors[3];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
namespace Intrepid.Gameplay.Codex.Visual
|
||||
{
|
||||
public enum PictorialSignalType
|
||||
{
|
||||
Primary,
|
||||
Secondary,
|
||||
Focus,
|
||||
Selected,
|
||||
Disabled,
|
||||
Denied,
|
||||
Warning,
|
||||
Corruption
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a33b9764b6344dfea8a61451b1237203
|
||||
timeCreated: 1783330446
|
||||
@ -0,0 +1,10 @@
|
||||
namespace Intrepid.Gameplay.Codex.Visual
|
||||
{
|
||||
public enum PictorialSurfaceType
|
||||
{
|
||||
Base,
|
||||
Raised,
|
||||
Deep,
|
||||
Overlay
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 33da9927cec845f5aeb51cb7330f5005
|
||||
timeCreated: 1783329900
|
||||
@ -0,0 +1,10 @@
|
||||
namespace Intrepid.Gameplay.Codex.Visual
|
||||
{
|
||||
public enum PictorialTextType
|
||||
{
|
||||
Primary,
|
||||
Secondary,
|
||||
Muted,
|
||||
Disabled
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 13e783a5e25c45c685ffa4eb5867a41a
|
||||
timeCreated: 1783330383
|
||||
@ -1,295 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Intrepid.Core.UI;
|
||||
using Intrepid.Core.UI.Dialog;
|
||||
using Intrepid.Diagnostics;
|
||||
using Intrepid.GameManagers;
|
||||
using Intrepid.Gameplay.Entities.Player.ActionBelt.Events;
|
||||
using Intrepid.Gameplay.Entities.Player.UI;
|
||||
using Intrepid.Gameplay.Themes;
|
||||
using Intrepid.Utilities;
|
||||
using Intrepid.Utilities.Sprite;
|
||||
using Sirenix.OdinInspector;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Intrepid.Gameplay.Entities.Player.ActionBelt.UI
|
||||
{
|
||||
public class ActionBeltUI : ManagedWindowUI
|
||||
{
|
||||
[GroupInjections, SerializeField] private ActionBeltManager actionBeltManager;
|
||||
[GroupInjections, SerializeField, PropertySpace] private DialogMinimalUI left;
|
||||
[GroupInjections, SerializeField] private DialogMinimalUI right;
|
||||
[GroupInjections, SerializeField] private DialogMinimalUI center;
|
||||
[GroupInjections, SerializeField] private DialogMinimalUI local;
|
||||
[GroupInjections, SerializeField, PropertySpace] private SpriteAnimationController leftIconAnimation;
|
||||
[GroupInjections, SerializeField] private SpriteAnimationController rightIconAnimation;
|
||||
[GroupInjections, SerializeField] private SpriteAnimationController contentIconAnimation;
|
||||
[GroupInjections, SerializeField, PropertySpace] private TextMeshProUGUI actionTextMeshPro;
|
||||
[GroupInjections, SerializeField] private NewsTickerUI localNewsTicker;
|
||||
[GroupInjections, SerializeField] private Slider activationProgressSlider;
|
||||
[GroupConfigurations, SerializeField, Range(0.01f, 1f)] private float activationCancelReturnDuration = .5f;
|
||||
|
||||
private UIActionBeltTheme CurrentTheme { get; set; }
|
||||
private Func<ActionEnvelope> GetFocus { get; set; }
|
||||
private Func<ActionEnvelope> SneakPeekRight { get; set; }
|
||||
private Func<ActionEnvelope> SneakPeekLeft { get; set; }
|
||||
private Func<int> GetNumberOfActionsInBelt { get; set; } = () => 0;
|
||||
private bool IsOptionActive => GetNumberOfActionsInBelt() > 1;
|
||||
private Coroutine ActivationCancelReturnCoroutine { get; set; }
|
||||
|
||||
protected override void InitializeVariables()
|
||||
{
|
||||
GetFocus = () => actionBeltManager.Focus;
|
||||
SneakPeekRight = () => actionBeltManager.PeekRight;
|
||||
SneakPeekLeft = () => actionBeltManager.PeekLeft;
|
||||
GetNumberOfActionsInBelt = () => actionBeltManager.Count;
|
||||
ResetActivationProgress();
|
||||
activationProgressSlider.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
protected override void OnBootstrap()
|
||||
{
|
||||
UpdateTheme();
|
||||
ResetActivationProgress();
|
||||
activationProgressSlider.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
private void UpdateTheme()
|
||||
{
|
||||
var theme = ThemeManager.Instance.CurrentTheme.ActionBeltTheme;
|
||||
if (CurrentTheme == theme) return;
|
||||
CurrentTheme = theme;
|
||||
left.Theme = theme.Option;
|
||||
right.Theme = theme.Option;
|
||||
center.Theme = theme.Main;
|
||||
local.Theme = theme.Local;
|
||||
actionTextMeshPro.color = theme.TextColor;
|
||||
localNewsTicker.TextMesh.color = theme.TextColor;
|
||||
activationProgressSlider.colors = theme.Main.Button.AsColorBlock();
|
||||
}
|
||||
|
||||
protected override void Subscriptions()
|
||||
{
|
||||
Subscribe<ActionBeltShowEvent>(_ => ManagedWindow.Show());
|
||||
Subscribe<ActionBeltHideEvent>(_ => ManagedWindow.Hide());
|
||||
|
||||
Subscribe<ActionBeltActivationStartedEvent>(WhenActionBeltActivationStarted);
|
||||
Subscribe<ActionBeltActivationProgressEvent>(WhenActionBeltActivationProgress);
|
||||
Subscribe<ActionBeltActivationCanceledEvent>(WhenActionBeltActivationCanceled);
|
||||
|
||||
Subscribe<ActionBeltUIToRightEvent>(WhenActionBeltNextRight);
|
||||
Subscribe<ActionBeltUIToLeftEvent>(WhenActionBeltNextLeft);
|
||||
|
||||
Subscribe<ActionBeltUITakeActionEvent>(WhenActionBeltUITakeAction);
|
||||
Subscribe<ActionBeltUIDropEvent>(WhenActionBeltUIDrop);
|
||||
}
|
||||
|
||||
private void WhenActionBeltActivationStarted(ActionBeltActivationStartedEvent e)
|
||||
{
|
||||
DLogger.LogDebug("activation started");
|
||||
}
|
||||
|
||||
private void WhenActionBeltActivationProgress(ActionBeltActivationProgressEvent e)
|
||||
{
|
||||
StopActivationCancelReturn();
|
||||
activationProgressSlider.value = Mathf.Clamp01(e.Progress);
|
||||
}
|
||||
|
||||
private void WhenActionBeltActivationCanceled(ActionBeltActivationCanceledEvent e)
|
||||
{
|
||||
StartActivationCancelReturn();
|
||||
}
|
||||
|
||||
private void StartActivationCancelReturn()
|
||||
{
|
||||
StopActivationCancelReturn();
|
||||
ActivationCancelReturnCoroutine = StartCoroutine(ReturnActivationProgressToZero());
|
||||
}
|
||||
|
||||
private void StopActivationCancelReturn()
|
||||
{
|
||||
if (ActivationCancelReturnCoroutine == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
StopCoroutine(ActivationCancelReturnCoroutine);
|
||||
ActivationCancelReturnCoroutine = null;
|
||||
}
|
||||
|
||||
private IEnumerator ReturnActivationProgressToZero()
|
||||
{
|
||||
var startValue = activationProgressSlider.value;
|
||||
var elapsedTime = 0f;
|
||||
|
||||
while (elapsedTime < activationCancelReturnDuration)
|
||||
{
|
||||
elapsedTime += Time.deltaTime;
|
||||
|
||||
var time = Mathf.Clamp01(elapsedTime / activationCancelReturnDuration);
|
||||
var easedTime = 1f - Mathf.Pow(1f - time, 3f);
|
||||
|
||||
activationProgressSlider.value = Mathf.Lerp(startValue, 0f, easedTime);
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
activationProgressSlider.value = 0f;
|
||||
ActivationCancelReturnCoroutine = null;
|
||||
}
|
||||
|
||||
private void WhenActionBeltUIDrop(ActionBeltUIDropEvent e)
|
||||
{
|
||||
if (!actionBeltManager.IsOperational) return;
|
||||
|
||||
center.BlinkBorderDropped();
|
||||
if (local.gameObject.activeSelf) local.BlinkBorderDropped();
|
||||
}
|
||||
|
||||
private IEnumerator UpdateContentNextFrame()
|
||||
{
|
||||
yield return null;
|
||||
UpdateTheme();
|
||||
UpdateContent();
|
||||
}
|
||||
|
||||
public void BeforeOpen()
|
||||
{
|
||||
StartCoroutine(UpdateContentNextFrame());
|
||||
}
|
||||
|
||||
private void WhenActionBeltNextRight(ActionBeltUIToRightEvent e)
|
||||
{
|
||||
if (!actionBeltManager.IsOperational) return;
|
||||
if (!IsOptionActive) return;
|
||||
SwitchRight();
|
||||
contentIconAnimation.SpriteAnimation.Reset();
|
||||
StartCoroutine(UpdateContentNextFrame());
|
||||
}
|
||||
|
||||
private void WhenActionBeltNextLeft(ActionBeltUIToLeftEvent e)
|
||||
{
|
||||
if (!actionBeltManager.IsOperational) return;
|
||||
if (!IsOptionActive) return;
|
||||
SwitchLeft();
|
||||
contentIconAnimation.SpriteAnimation.Reset();
|
||||
StartCoroutine(UpdateContentNextFrame());
|
||||
}
|
||||
|
||||
private void WhenActionBeltUITakeAction(ActionBeltUITakeActionEvent e)
|
||||
{
|
||||
if (!actionBeltManager.IsOperational) return;
|
||||
|
||||
ResetActivationProgress();
|
||||
|
||||
center.BlinkBorderActionTaken();
|
||||
if (local.gameObject.activeSelf) local.BlinkBorderActionTaken();
|
||||
}
|
||||
|
||||
private void UpdateContent()
|
||||
{
|
||||
var focus = GetFocus();
|
||||
if (focus.ActivationMode == ActionActivationMode.Instant)
|
||||
{
|
||||
ResetActivationProgress();
|
||||
activationProgressSlider.gameObject.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
activationProgressSlider.gameObject.SetActive(true);
|
||||
}
|
||||
contentIconAnimation.SpriteAnimation.ChangeAnimation(MapActionCategoryRUNNING(focus.ActionCategory));
|
||||
actionTextMeshPro.text = Proxy.Instance.I18N.Localise(focus.ActionLocalization);
|
||||
if (focus.DescriptionLocalization.IsNull())
|
||||
{
|
||||
local.gameObject.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
local.gameObject.SetActive(true);
|
||||
var message = Proxy.Instance.I18N.Localise(focus.DescriptionLocalization, focus.DescriptionParams);
|
||||
localNewsTicker.Operational(message);
|
||||
}
|
||||
}
|
||||
|
||||
private void ResetActivationProgress()
|
||||
{
|
||||
StopActivationCancelReturn();
|
||||
if (activationProgressSlider.IsNull())
|
||||
{
|
||||
return;
|
||||
}
|
||||
activationProgressSlider.value = 0f;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
UpdateTheme();
|
||||
|
||||
if (!actionBeltManager.IsOperational)
|
||||
{
|
||||
ResetActivationProgress();
|
||||
Proxy.Instance.EventBus.Raise(new ActionBeltUICloseEvent());
|
||||
return;
|
||||
}
|
||||
|
||||
switch (GetNumberOfActionsInBelt())
|
||||
{
|
||||
case 0:
|
||||
ResetActivationProgress();
|
||||
Proxy.Instance.EventBus.Raise(new ActionBeltUICloseEvent());
|
||||
return;
|
||||
case 1:
|
||||
left.gameObject.SetActive(false);
|
||||
right.gameObject.SetActive(false);
|
||||
break;
|
||||
case > 1:
|
||||
left.gameObject.SetActive(true);
|
||||
right.gameObject.SetActive(true);
|
||||
rightIconAnimation.SpriteAnimation.ChangeAnimation(MapActionCategoryIDLE(SneakPeekRight().ActionCategory));
|
||||
leftIconAnimation.SpriteAnimation.ChangeAnimation(MapActionCategoryIDLE(SneakPeekLeft().ActionCategory));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private static string MapActionCategoryIDLE(ActionCategory actionCategory)
|
||||
{
|
||||
return actionCategory switch
|
||||
{
|
||||
ActionCategory.General => "General IDLE",
|
||||
ActionCategory.Terminal => "Terminal IDLE",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(actionCategory), actionCategory, null)
|
||||
};
|
||||
}
|
||||
|
||||
private static string MapActionCategoryRUNNING(ActionCategory actionCategory)
|
||||
{
|
||||
return actionCategory switch
|
||||
{
|
||||
ActionCategory.General => "General RUNNING",
|
||||
ActionCategory.Terminal => "Terminal RUNNING",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(actionCategory), actionCategory, null)
|
||||
};
|
||||
}
|
||||
|
||||
[GroupDebug, Button]
|
||||
private void SwitchLeft()
|
||||
{
|
||||
left.Righty();
|
||||
right.Lefty();
|
||||
center.BlinkBorderSelected();
|
||||
if (local.gameObject.activeSelf) local.BlinkBorderSelected();
|
||||
}
|
||||
|
||||
[GroupDebug, Button]
|
||||
private void SwitchRight()
|
||||
{
|
||||
left.Righty();
|
||||
right.Lefty();
|
||||
center.BlinkBorderSelected();
|
||||
if (local.gameObject.activeSelf) local.BlinkBorderSelected();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b925ea9b2014d7dbf49b1feccc31cb5
|
||||
timeCreated: 1744378127
|
||||
@ -0,0 +1,104 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Intrepid.Gameplay.Codex.UI.Controllers;
|
||||
using Intrepid.Utilities;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Intrepid.Gameplay.Entities.Player.ActionBelt.UI
|
||||
{
|
||||
public class CodexActionBeltActivationProgressControllerUI : CodexControllerUI
|
||||
{
|
||||
[GroupInjections, SerializeField] private Slider progressSlider;
|
||||
|
||||
[GroupConfigurations, SerializeField, Range(0.01f, 1f)]
|
||||
private float cancelReturnDuration = .5f;
|
||||
|
||||
private Coroutine returnRoutine;
|
||||
|
||||
private void Show()
|
||||
{
|
||||
if (progressSlider.IsNull()) return;
|
||||
progressSlider.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
private void Hide()
|
||||
{
|
||||
ResetProgress();
|
||||
if (progressSlider.IsNull()) return;
|
||||
progressSlider.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public void SetProgress(float progress)
|
||||
{
|
||||
StopReturn();
|
||||
if (progressSlider.IsNull()) return;
|
||||
|
||||
progressSlider.value = Mathf.Clamp01(progress);
|
||||
}
|
||||
|
||||
public void ResetProgress()
|
||||
{
|
||||
StopReturn();
|
||||
if (progressSlider.IsNull()) return;
|
||||
|
||||
progressSlider.value = 0f;
|
||||
}
|
||||
|
||||
public void CancelAndReturnToZero()
|
||||
{
|
||||
StopReturn();
|
||||
|
||||
if (progressSlider.IsNull()) return;
|
||||
|
||||
returnRoutine = StartCoroutine(ReturnToZeroRoutine());
|
||||
}
|
||||
|
||||
public override void BeforeClose()
|
||||
{
|
||||
base.BeforeClose();
|
||||
Hide();
|
||||
}
|
||||
|
||||
private void StopReturn()
|
||||
{
|
||||
if (returnRoutine == null) return;
|
||||
|
||||
StopCoroutine(returnRoutine);
|
||||
returnRoutine = null;
|
||||
}
|
||||
|
||||
private IEnumerator ReturnToZeroRoutine()
|
||||
{
|
||||
var startValue = progressSlider.value;
|
||||
var elapsed = 0f;
|
||||
|
||||
while (elapsed < cancelReturnDuration)
|
||||
{
|
||||
elapsed += Timer.UnscaledTime;
|
||||
|
||||
var time = Mathf.Clamp01(elapsed / cancelReturnDuration);
|
||||
var easedTime = 1f - Mathf.Pow(1f - time, 3f);
|
||||
|
||||
progressSlider.value = Mathf.Lerp(startValue, 0f, easedTime);
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
progressSlider.value = 0f;
|
||||
returnRoutine = null;
|
||||
}
|
||||
|
||||
public void UpdateContent(ActionEnvelope focus)
|
||||
{
|
||||
if (focus.ActivationMode == ActionActivationMode.Instant)
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 884870248c1b4e5e86b4622d9bf365f8
|
||||
timeCreated: 1783359281
|
||||
@ -0,0 +1,116 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Intrepid.GameManagers;
|
||||
using Intrepid.Gameplay.Codex.UI.Components;
|
||||
using Intrepid.Gameplay.Codex.UI.Controllers;
|
||||
using Intrepid.Gameplay.Codex.Visual;
|
||||
using Intrepid.Utilities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Intrepid.Gameplay.Entities.Player.ActionBelt.UI
|
||||
{
|
||||
public class CodexActionBeltControllerUI : CodexControllerUI
|
||||
{
|
||||
[GroupConfigurations, SerializeField] private float animationDuration = 0.5f;
|
||||
[GroupConfigurations, SerializeField] private float animationSpeed = 4.5f;
|
||||
|
||||
[GroupInjections, SerializeField] private CodexPanelComponentUI panel;
|
||||
[GroupInjections, SerializeField] private CodexIconComponentUI icon;
|
||||
[GroupInjections, SerializeField] private CodexTextComponentUI text;
|
||||
|
||||
private Coroutine BlinkRoutine { get; set; }
|
||||
|
||||
private static string MapActionCategoryRUNNING(ActionCategory actionCategory)
|
||||
{
|
||||
return actionCategory switch
|
||||
{
|
||||
ActionCategory.General => "General RUNNING",
|
||||
ActionCategory.Terminal => "Terminal RUNNING",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(actionCategory), actionCategory, null)
|
||||
};
|
||||
}
|
||||
|
||||
public void BlinkBorderActionTaken()
|
||||
{
|
||||
if (BlinkRoutine is not null)
|
||||
{
|
||||
StopCoroutine(BlinkRoutine);
|
||||
}
|
||||
BlinkRoutine = StartCoroutine(BlinkBorderCoroutine(PictorialSignalType.Focus));
|
||||
}
|
||||
|
||||
private void BlinkBorderSelected()
|
||||
{
|
||||
if (BlinkRoutine is not null)
|
||||
{
|
||||
StopCoroutine(BlinkRoutine);
|
||||
}
|
||||
BlinkRoutine = StartCoroutine(BlinkBorderCoroutine(PictorialSignalType.Selected));
|
||||
}
|
||||
|
||||
private void BlinkBorderDropped()
|
||||
{
|
||||
if (BlinkRoutine is not null)
|
||||
{
|
||||
StopCoroutine(BlinkRoutine);
|
||||
}
|
||||
BlinkRoutine = StartCoroutine(BlinkBorderCoroutine(PictorialSignalType.Denied));
|
||||
}
|
||||
|
||||
private IEnumerator BlinkBorderCoroutine(PictorialSignalType target)
|
||||
{
|
||||
var previous = panel.BorderType;
|
||||
panel.SetBorder(target);
|
||||
|
||||
float time = 0;
|
||||
while (time < animationDuration)
|
||||
{
|
||||
yield return null;
|
||||
time += Timer.UnscaledTime * animationSpeed;
|
||||
}
|
||||
|
||||
panel.SetBorder(previous);
|
||||
BlinkRoutine = null;
|
||||
}
|
||||
|
||||
public void UpdateContent(ActionEnvelope envelope)
|
||||
{
|
||||
icon.ChangeAnimation(MapActionCategoryRUNNING(envelope.ActionCategory));
|
||||
text.Value = Proxy.Instance.I18N.Localise(envelope.ActionLocalization);
|
||||
// if (envelope.DescriptionLocalization.IsNull())
|
||||
// {
|
||||
// local.gameObject.SetActive(false);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// local.gameObject.SetActive(true);
|
||||
// var message = Proxy.Instance.I18N.Localise(envelope.DescriptionLocalization, envelope.DescriptionParams);
|
||||
// localNewsTicker.Operational(message);
|
||||
// }
|
||||
}
|
||||
|
||||
public void ActionTaken()
|
||||
{
|
||||
BlinkBorderActionTaken();
|
||||
// if (local.gameObject.activeSelf) local.BlinkBorderActionTaken();
|
||||
}
|
||||
|
||||
public void Selected()
|
||||
{
|
||||
BlinkBorderSelected();
|
||||
// if (local.gameObject.activeSelf) local.BlinkBorderSelected();
|
||||
|
||||
}
|
||||
|
||||
public void Drop()
|
||||
{
|
||||
BlinkBorderDropped();
|
||||
// if (local.gameObject.activeSelf) local.BlinkBorderDropped();
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
icon.AnimationReset();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f13d296666ef470abe4137d65b5a7ee1
|
||||
timeCreated: 1783361831
|
||||
@ -0,0 +1,152 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Intrepid.Gameplay.Codex.UI.Components;
|
||||
using Intrepid.Gameplay.Codex.UI.Controllers;
|
||||
using Intrepid.Utilities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Intrepid.Gameplay.Entities.Player.ActionBelt.UI
|
||||
{
|
||||
public class CodexActionBeltSlotControllerUI : CodexControllerUI
|
||||
{
|
||||
[GroupConfigurations, SerializeField] private float animationDuration = 0.5f;
|
||||
[GroupConfigurations, SerializeField] private float animationSpeed = 4.5f;
|
||||
[GroupConfigurations, SerializeField] private float scaleEmphasis = 0.90f;
|
||||
[GroupConfigurations, SerializeField] private float moveIntensity = 25f;
|
||||
|
||||
[GroupInjections, SerializeField] private CodexPanelComponentUI panel;
|
||||
[GroupInjections, SerializeField] private CodexIconComponentUI icon;
|
||||
|
||||
private RectTransform RectTransform { get; set; }
|
||||
private Vector2 MainPosition { get; set; }
|
||||
private Vector3 MainLocalScale { get; set; }
|
||||
|
||||
private Coroutine EmphasisRoutine { get; set; }
|
||||
private Coroutine BumpRoutine { get; set; }
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
RectTransform = GetComponent<RectTransform>();
|
||||
MainPosition = RectTransform.anchoredPosition;
|
||||
MainLocalScale = transform.localScale;
|
||||
}
|
||||
|
||||
private static string MapActionCategoryIDLE(ActionCategory actionCategory)
|
||||
{
|
||||
return actionCategory switch
|
||||
{
|
||||
ActionCategory.General => "General IDLE",
|
||||
ActionCategory.Terminal => "Terminal IDLE",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(actionCategory), actionCategory, null)
|
||||
};
|
||||
}
|
||||
|
||||
public void Activate(ActionCategory actionCategory)
|
||||
{
|
||||
panel.gameObject.SetActive(true);
|
||||
icon.gameObject.SetActive(true);
|
||||
icon.ChangeAnimation(MapActionCategoryIDLE(actionCategory));
|
||||
}
|
||||
|
||||
public void Deactivate()
|
||||
{
|
||||
panel.gameObject.SetActive(false);
|
||||
icon.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public void Emphasis()
|
||||
{
|
||||
if (EmphasisRoutine is not null)
|
||||
{
|
||||
StopCoroutine(EmphasisRoutine);
|
||||
}
|
||||
EmphasisRoutine = StartCoroutine(EmphasisCoroutine());
|
||||
}
|
||||
|
||||
public void Bump(Vector2 direction)
|
||||
{
|
||||
if (BumpRoutine is not null)
|
||||
{
|
||||
StopCoroutine(BumpRoutine);
|
||||
}
|
||||
BumpRoutine = StartCoroutine(BumpCoroutine(direction));
|
||||
}
|
||||
|
||||
private IEnumerator EmphasisCoroutine()
|
||||
{
|
||||
transform.localScale = MainLocalScale * scaleEmphasis;
|
||||
|
||||
float elapsed = 0;
|
||||
while (elapsed < animationDuration)
|
||||
{
|
||||
var t = Mathf.Clamp01(elapsed / animationDuration);
|
||||
transform.localScale = Vector3.Lerp(MainLocalScale * scaleEmphasis, MainLocalScale, t);
|
||||
yield return null;
|
||||
elapsed += Timer.UnscaledTime * animationSpeed;
|
||||
}
|
||||
|
||||
transform.localScale = MainLocalScale;
|
||||
EmphasisRoutine = null;
|
||||
}
|
||||
|
||||
private IEnumerator BumpCoroutine(Vector2 direction)
|
||||
{
|
||||
var start = MainPosition;
|
||||
var end = MainPosition + direction * moveIntensity;
|
||||
|
||||
var elapsed = 0f;
|
||||
|
||||
while (elapsed < animationDuration)
|
||||
{
|
||||
var t = Mathf.Clamp01(elapsed / animationDuration);
|
||||
var eased = 1f - Mathf.Pow(1f - t, 3f);
|
||||
|
||||
RectTransform.anchoredPosition = Vector2.Lerp(start, end, eased);
|
||||
|
||||
yield return null;
|
||||
elapsed += Time.unscaledDeltaTime * animationSpeed;
|
||||
}
|
||||
|
||||
elapsed = 0f;
|
||||
|
||||
while (elapsed < animationDuration)
|
||||
{
|
||||
var t = Mathf.Clamp01(elapsed / animationDuration);
|
||||
var eased = 1f - Mathf.Pow(1f - t, 3f);
|
||||
|
||||
RectTransform.anchoredPosition = Vector2.Lerp(end, start, eased);
|
||||
|
||||
yield return null;
|
||||
elapsed += Time.unscaledDeltaTime * animationSpeed;
|
||||
}
|
||||
|
||||
RectTransform.anchoredPosition = MainPosition;
|
||||
BumpRoutine = null;
|
||||
}
|
||||
|
||||
public void BumpUp()
|
||||
{
|
||||
Emphasis();
|
||||
Bump(Vector2.up);
|
||||
}
|
||||
|
||||
public void BumpDown()
|
||||
{
|
||||
Emphasis();
|
||||
Bump(Vector2.down);
|
||||
}
|
||||
|
||||
public void BumpLeft()
|
||||
{
|
||||
Emphasis();
|
||||
Bump(Vector2.left);
|
||||
}
|
||||
|
||||
public void BumpRight()
|
||||
{
|
||||
Emphasis();
|
||||
Bump(Vector2.right);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 76358e82974044a4aa3daf15276b2a1a
|
||||
timeCreated: 1783360456
|
||||
@ -0,0 +1,161 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Intrepid.Diagnostics;
|
||||
using Intrepid.GameManagers;
|
||||
using Intrepid.Gameplay.Codex.UI;
|
||||
using Intrepid.Gameplay.Entities.Player.ActionBelt.Events;
|
||||
using Intrepid.Utilities;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Intrepid.Gameplay.Entities.Player.ActionBelt.UI
|
||||
{
|
||||
public class CodexActionBeltUI : CodexWindowUI
|
||||
{
|
||||
[GroupInjections, SerializeField] private ActionBeltManager actionBeltManager;
|
||||
[GroupInjections, SerializeField] private CodexActionBeltSlotControllerUI left;
|
||||
[GroupInjections, SerializeField] private CodexActionBeltSlotControllerUI right;
|
||||
[GroupInjections, SerializeField] private CodexActionBeltControllerUI center;
|
||||
[GroupInjections, SerializeField] private CodexActionBeltActivationProgressControllerUI activationProgress;
|
||||
|
||||
private Func<ActionEnvelope> GetFocus { get; set; }
|
||||
private Func<ActionEnvelope> SneakPeekRight { get; set; }
|
||||
private Func<ActionEnvelope> SneakPeekLeft { get; set; }
|
||||
private Func<int> GetNumberOfActionsInBelt { get; set; } = () => 0;
|
||||
private bool IsOptionActive => GetNumberOfActionsInBelt() > 1;
|
||||
|
||||
protected override void InitializeVariables()
|
||||
{
|
||||
base.InitializeVariables();
|
||||
GetFocus = () => actionBeltManager.Focus;
|
||||
SneakPeekRight = () => actionBeltManager.PeekRight;
|
||||
SneakPeekLeft = () => actionBeltManager.PeekLeft;
|
||||
GetNumberOfActionsInBelt = () => actionBeltManager.Count;
|
||||
}
|
||||
|
||||
protected override void Subscriptions()
|
||||
{
|
||||
base.Subscriptions();
|
||||
Subscribe<ActionBeltShowEvent>(_ => ManagedWindow.Show());
|
||||
Subscribe<ActionBeltHideEvent>(_ => ManagedWindow.Hide());
|
||||
|
||||
Subscribe<ActionBeltActivationStartedEvent>(WhenActionBeltActivationStarted);
|
||||
Subscribe<ActionBeltActivationProgressEvent>(WhenActionBeltActivationProgress);
|
||||
Subscribe<ActionBeltActivationCanceledEvent>(WhenActionBeltActivationCanceled);
|
||||
|
||||
Subscribe<ActionBeltUIToRightEvent>(WhenActionBeltNextRight);
|
||||
Subscribe<ActionBeltUIToLeftEvent>(WhenActionBeltNextLeft);
|
||||
|
||||
Subscribe<ActionBeltUITakeActionEvent>(WhenActionBeltUITakeAction);
|
||||
Subscribe<ActionBeltUIDropEvent>(WhenActionBeltUIDrop);
|
||||
}
|
||||
|
||||
private void WhenActionBeltActivationStarted(ActionBeltActivationStartedEvent e)
|
||||
{
|
||||
DLogger.LogDebug("activation started");
|
||||
}
|
||||
|
||||
private void WhenActionBeltActivationProgress(ActionBeltActivationProgressEvent e)
|
||||
{
|
||||
activationProgress.SetProgress(e.Progress);
|
||||
}
|
||||
|
||||
private void WhenActionBeltActivationCanceled(ActionBeltActivationCanceledEvent e)
|
||||
{
|
||||
StartActivationCancelReturn();
|
||||
}
|
||||
|
||||
private void StartActivationCancelReturn()
|
||||
{
|
||||
activationProgress.CancelAndReturnToZero();
|
||||
}
|
||||
|
||||
private void WhenActionBeltUIDrop(ActionBeltUIDropEvent e)
|
||||
{
|
||||
if (!actionBeltManager.IsOperational) return;
|
||||
center.Drop();
|
||||
}
|
||||
|
||||
private IEnumerator UpdateContentNextFrame()
|
||||
{
|
||||
yield return null;
|
||||
var focus = GetFocus();
|
||||
activationProgress.UpdateContent(focus);
|
||||
center.UpdateContent(focus);
|
||||
}
|
||||
|
||||
public override void BeforeOpen()
|
||||
{
|
||||
base.BeforeOpen();
|
||||
StartCoroutine(UpdateContentNextFrame());
|
||||
}
|
||||
|
||||
private void WhenActionBeltNextRight(ActionBeltUIToRightEvent e)
|
||||
{
|
||||
if (!actionBeltManager.IsOperational) return;
|
||||
if (!IsOptionActive) return;
|
||||
SwitchRight();
|
||||
center.Reset();
|
||||
StartCoroutine(UpdateContentNextFrame());
|
||||
}
|
||||
|
||||
private void WhenActionBeltNextLeft(ActionBeltUIToLeftEvent e)
|
||||
{
|
||||
if (!actionBeltManager.IsOperational) return;
|
||||
if (!IsOptionActive) return;
|
||||
SwitchLeft();
|
||||
center.Reset();
|
||||
StartCoroutine(UpdateContentNextFrame());
|
||||
}
|
||||
|
||||
private void WhenActionBeltUITakeAction(ActionBeltUITakeActionEvent e)
|
||||
{
|
||||
if (!actionBeltManager.IsOperational) return;
|
||||
activationProgress.ResetProgress();
|
||||
center.ActionTaken();
|
||||
StartCoroutine(UpdateContentNextFrame());
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!actionBeltManager.IsOperational)
|
||||
{
|
||||
activationProgress.ResetProgress();
|
||||
Proxy.Instance.EventBus.Raise(new ActionBeltUICloseEvent());
|
||||
return;
|
||||
}
|
||||
|
||||
switch (GetNumberOfActionsInBelt())
|
||||
{
|
||||
case 0:
|
||||
activationProgress.ResetProgress();
|
||||
Proxy.Instance.EventBus.Raise(new ActionBeltUICloseEvent());
|
||||
return;
|
||||
case 1:
|
||||
left.Deactivate();
|
||||
right.Deactivate();
|
||||
break;
|
||||
case > 1:
|
||||
left.Activate(SneakPeekLeft().ActionCategory);
|
||||
right.Activate(SneakPeekRight().ActionCategory);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[GroupDebug, Button]
|
||||
private void SwitchLeft()
|
||||
{
|
||||
left.BumpRight();
|
||||
right.BumpLeft();
|
||||
center.Selected();
|
||||
}
|
||||
|
||||
[GroupDebug, Button]
|
||||
private void SwitchRight()
|
||||
{
|
||||
left.BumpRight();
|
||||
right.BumpLeft();
|
||||
center.Selected();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 471fceec10f34c21821d9bbe7b3ef01f
|
||||
timeCreated: 1783358926
|
||||
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using Intrepid.GameManagers;
|
||||
using Intrepid.Gameplay.Codex.UI;
|
||||
using Intrepid.Gameplay.Entities.Player.PDA.Events;
|
||||
using Intrepid.Gameplay.Entities.Player.UI;
|
||||
using Intrepid.Utilities;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
using Intrepid.Gameplay.Codex.UI;
|
||||
using Intrepid.Gameplay.Entities.Player.UI;
|
||||
|
||||
namespace Intrepid.Gameplay.Entities.Player.Sentinel.Cadence.UI
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
using Intrepid.Gameplay.Codex.UI;
|
||||
|
||||
namespace Intrepid.Gameplay.Entities.Player.UI
|
||||
{
|
||||
public class GadgetsUI : ManagedWindowUI
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user