From 81ef58415ab26db45623b04b07c3f80aff5dd878 Mon Sep 17 00:00:00 2001 From: Novvator Date: Mon, 1 Mar 2021 18:09:21 +0000 Subject: [PATCH 1/7] artefactUI test --- game/Assets/Scenes/Main.unity | 403 ++++++++++++++++++ .../Scripts/Artefacts/ArtefactControl.cs | 2 +- game/Assets/Scripts/Artefacts/EventHandler.cs | 7 + .../Assets/Scripts/Artefacts/PickUpDisplay.cs | 31 ++ .../Scripts/Artefacts/PickUpDisplay.cs.meta | 11 + 5 files changed, 453 insertions(+), 1 deletion(-) create mode 100644 game/Assets/Scripts/Artefacts/PickUpDisplay.cs create mode 100644 game/Assets/Scripts/Artefacts/PickUpDisplay.cs.meta diff --git a/game/Assets/Scenes/Main.unity b/game/Assets/Scenes/Main.unity index 890e31f..a5f292a 100644 --- a/game/Assets/Scenes/Main.unity +++ b/game/Assets/Scenes/Main.unity @@ -418,6 +418,85 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7d3ed39e75807bc4d865f39b2ef9ea69, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &990822312 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 990822313} + - component: {fileID: 990822315} + - component: {fileID: 990822314} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &990822313 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 990822312} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2072374864} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &990822314 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 990822312} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 20 + m_FontStyle: 1 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: "\u039F\u039A" +--- !u!222 &990822315 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 990822312} + m_CullTransparentMesh: 1 --- !u!1 &1148358018 GameObject: m_ObjectHideFlags: 0 @@ -561,6 +640,121 @@ Transform: m_Father: {fileID: 1509348081} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1486070833 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1486070837} + - component: {fileID: 1486070836} + - component: {fileID: 1486070835} + - component: {fileID: 1486070834} + - component: {fileID: 1486070838} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1486070834 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1486070833} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1486070835 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1486070833} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &1486070836 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1486070833} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &1486070837 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1486070833} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1805781312} + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!114 &1486070838 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1486070833} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3a23aff835e2352469e34bfc2c4b683c, type: 3} + m_Name: + m_EditorClassIdentifier: + artefactUI: {fileID: 1805781311} + nearbyArtefactID: {fileID: 11400000, guid: caba70196fbb1c549a934f7566f7a247, type: 2} --- !u!1 &1509348080 GameObject: m_ObjectHideFlags: 0 @@ -748,6 +942,82 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1805781311 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1805781312} + - component: {fileID: 1805781314} + - component: {fileID: 1805781313} + m_Layer: 5 + m_Name: artefactUI + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1805781312 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1805781311} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 2072374864} + m_Father: {fileID: 1486070837} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1805781313 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1805781311} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.392} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1805781314 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1805781311} + m_CullTransparentMesh: 1 --- !u!1001 &1814555656 PrefabInstance: m_ObjectHideFlags: 0 @@ -908,6 +1178,139 @@ Transform: m_Father: {fileID: 1509348081} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2072374863 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2072374864} + - component: {fileID: 2072374867} + - component: {fileID: 2072374866} + - component: {fileID: 2072374865} + m_Layer: 5 + m_Name: OK + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2072374864 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2072374863} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 990822313} + m_Father: {fileID: 1805781312} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 252, y: -102} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2072374865 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2072374863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 1, g: 0.6761006, b: 0.6761006, a: 1} + m_PressedColor: {r: 1, g: 0.28930813, b: 0.28930813, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 2072374866} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1486070838} + m_TargetAssemblyTypeName: PickUpDisplay, Assembly-CSharp + m_MethodName: PopUpOff + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &2072374866 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2072374863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &2072374867 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2072374863} + m_CullTransparentMesh: 1 --- !u!1001 &2138848574 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/game/Assets/Scripts/Artefacts/ArtefactControl.cs b/game/Assets/Scripts/Artefacts/ArtefactControl.cs index 67f47cd..a1a3583 100644 --- a/game/Assets/Scripts/Artefacts/ArtefactControl.cs +++ b/game/Assets/Scripts/Artefacts/ArtefactControl.cs @@ -69,7 +69,7 @@ public class ArtefactControl : MonoBehaviour data.PowerUnlock(); _nearbyArtefactID.Value = -1; _canInteract = false; - //_show = false; + EventHandler.current.ArtefactUI(); Destroy(this.gameObject); } diff --git a/game/Assets/Scripts/Artefacts/EventHandler.cs b/game/Assets/Scripts/Artefacts/EventHandler.cs index 5fdf33c..dba71a1 100644 --- a/game/Assets/Scripts/Artefacts/EventHandler.cs +++ b/game/Assets/Scripts/Artefacts/EventHandler.cs @@ -46,4 +46,11 @@ public class EventHandler : MonoBehaviour } } + public event Action onArtefactUI; + + public void ArtefactUI() + { + onArtefactUI(); + } + } diff --git a/game/Assets/Scripts/Artefacts/PickUpDisplay.cs b/game/Assets/Scripts/Artefacts/PickUpDisplay.cs new file mode 100644 index 0000000..0930cb2 --- /dev/null +++ b/game/Assets/Scripts/Artefacts/PickUpDisplay.cs @@ -0,0 +1,31 @@ +using Ktyl.Util; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class PickUpDisplay : MonoBehaviour +{ + public bool paused => _paused; + [SerializeField] private static bool _paused; + + [SerializeField] private GameObject artefactUI; + [SerializeField] private SerialInt nearbyArtefactID; + + private void Start() + { + EventHandler.current.onArtefactUI += PopUpOn; + } + public void PopUpOn() + { + _paused = true; + artefactUI.SetActive(true); + Time.timeScale = 0.0f; + } + + public void PopUpOff() + { + _paused = false; + artefactUI.SetActive(false); + Time.timeScale = 1.0f; + } +} diff --git a/game/Assets/Scripts/Artefacts/PickUpDisplay.cs.meta b/game/Assets/Scripts/Artefacts/PickUpDisplay.cs.meta new file mode 100644 index 0000000..8d2029e --- /dev/null +++ b/game/Assets/Scripts/Artefacts/PickUpDisplay.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3a23aff835e2352469e34bfc2c4b683c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From cc28ee3c2f1f0aac5064055906c7c08abaaa7782 Mon Sep 17 00:00:00 2001 From: Cat Flynn Date: Tue, 2 Mar 2021 13:24:18 +0000 Subject: [PATCH 2/7] add prefab for scripted dialogue trigger zone --- game/Assets/Prefabs/Dialogue.meta | 8 +++ .../Dialogue/Dialogue Trigger Zone.prefab | 61 +++++++++++++++++ .../Dialogue Trigger Zone.prefab.meta | 7 ++ .../Prefabs/{ => Dialogue}/Dialogue UI.prefab | 0 .../{ => Dialogue}/Dialogue UI.prefab.meta | 0 game/Assets/Scenes/Dialogue.unity | 65 +++++++++++++++++++ .../Assets/Scripts/Dialogue/DialogueSystem.cs | 15 ++++- .../Dialogue/ScriptedDialogueTrigger.cs | 16 +++++ .../Dialogue/ScriptedDialogueTrigger.cs.meta | 11 ++++ 9 files changed, 182 insertions(+), 1 deletion(-) create mode 100644 game/Assets/Prefabs/Dialogue.meta create mode 100644 game/Assets/Prefabs/Dialogue/Dialogue Trigger Zone.prefab create mode 100644 game/Assets/Prefabs/Dialogue/Dialogue Trigger Zone.prefab.meta rename game/Assets/Prefabs/{ => Dialogue}/Dialogue UI.prefab (100%) rename game/Assets/Prefabs/{ => Dialogue}/Dialogue UI.prefab.meta (100%) create mode 100644 game/Assets/Scripts/Dialogue/ScriptedDialogueTrigger.cs create mode 100644 game/Assets/Scripts/Dialogue/ScriptedDialogueTrigger.cs.meta diff --git a/game/Assets/Prefabs/Dialogue.meta b/game/Assets/Prefabs/Dialogue.meta new file mode 100644 index 0000000..969b702 --- /dev/null +++ b/game/Assets/Prefabs/Dialogue.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1b481c80f856b7c41a1157a5d66f53ef +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/game/Assets/Prefabs/Dialogue/Dialogue Trigger Zone.prefab b/game/Assets/Prefabs/Dialogue/Dialogue Trigger Zone.prefab new file mode 100644 index 0000000..8d4195d --- /dev/null +++ b/game/Assets/Prefabs/Dialogue/Dialogue Trigger Zone.prefab @@ -0,0 +1,61 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &592757652223086935 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 592757652223086933} + - component: {fileID: 592757652223086934} + - component: {fileID: 592757652223086932} + m_Layer: 0 + m_Name: Dialogue Trigger Zone + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &592757652223086933 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 592757652223086935} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &592757652223086934 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 592757652223086935} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bf23d7e814442a54888e34f51cbf3cc3, type: 3} + m_Name: + m_EditorClassIdentifier: + _dialogue: {fileID: 11400000, guid: 56369c4e83cc59e44bf55cd16fafc4e8, type: 2} + _key: SD_APPROACH +--- !u!65 &592757652223086932 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 592757652223086935} + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 10, y: 10, z: 1} + m_Center: {x: 0, y: 0, z: 0} diff --git a/game/Assets/Prefabs/Dialogue/Dialogue Trigger Zone.prefab.meta b/game/Assets/Prefabs/Dialogue/Dialogue Trigger Zone.prefab.meta new file mode 100644 index 0000000..7640507 --- /dev/null +++ b/game/Assets/Prefabs/Dialogue/Dialogue Trigger Zone.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b4c7a4f0875ec844a9abeec0c86084cf +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/game/Assets/Prefabs/Dialogue UI.prefab b/game/Assets/Prefabs/Dialogue/Dialogue UI.prefab similarity index 100% rename from game/Assets/Prefabs/Dialogue UI.prefab rename to game/Assets/Prefabs/Dialogue/Dialogue UI.prefab diff --git a/game/Assets/Prefabs/Dialogue UI.prefab.meta b/game/Assets/Prefabs/Dialogue/Dialogue UI.prefab.meta similarity index 100% rename from game/Assets/Prefabs/Dialogue UI.prefab.meta rename to game/Assets/Prefabs/Dialogue/Dialogue UI.prefab.meta diff --git a/game/Assets/Scenes/Dialogue.unity b/game/Assets/Scenes/Dialogue.unity index d88c1af..ce2b5e2 100644 --- a/game/Assets/Scenes/Dialogue.unity +++ b/game/Assets/Scenes/Dialogue.unity @@ -123,6 +123,63 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1001 &466003104 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 592757652223086933, guid: b4c7a4f0875ec844a9abeec0c86084cf, type: 3} + propertyPath: m_RootOrder + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 592757652223086933, guid: b4c7a4f0875ec844a9abeec0c86084cf, type: 3} + propertyPath: m_LocalPosition.x + value: 6.99 + objectReference: {fileID: 0} + - target: {fileID: 592757652223086933, guid: b4c7a4f0875ec844a9abeec0c86084cf, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 592757652223086933, guid: b4c7a4f0875ec844a9abeec0c86084cf, type: 3} + propertyPath: m_LocalPosition.z + value: 5.77 + objectReference: {fileID: 0} + - target: {fileID: 592757652223086933, guid: b4c7a4f0875ec844a9abeec0c86084cf, type: 3} + propertyPath: m_LocalRotation.w + value: -0.49999666 + objectReference: {fileID: 0} + - target: {fileID: 592757652223086933, guid: b4c7a4f0875ec844a9abeec0c86084cf, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 592757652223086933, guid: b4c7a4f0875ec844a9abeec0c86084cf, type: 3} + propertyPath: m_LocalRotation.y + value: 0.8660274 + objectReference: {fileID: 0} + - target: {fileID: 592757652223086933, guid: b4c7a4f0875ec844a9abeec0c86084cf, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 592757652223086933, guid: b4c7a4f0875ec844a9abeec0c86084cf, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 592757652223086933, guid: b4c7a4f0875ec844a9abeec0c86084cf, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 240 + objectReference: {fileID: 0} + - target: {fileID: 592757652223086933, guid: b4c7a4f0875ec844a9abeec0c86084cf, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 592757652223086935, guid: b4c7a4f0875ec844a9abeec0c86084cf, type: 3} + propertyPath: m_Name + value: Dialogue Trigger Zone + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: b4c7a4f0875ec844a9abeec0c86084cf, type: 3} --- !u!1001 &671236672 PrefabInstance: m_ObjectHideFlags: 0 @@ -964,6 +1021,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 8626562367081348111, guid: 2dae894ec500e524a88f985657f9682d, type: 3} + propertyPath: data + value: + objectReference: {fileID: 11400000, guid: 8882f0bc24a2179459b1e851f8645241, type: 2} - target: {fileID: 8781564213167799763, guid: 2dae894ec500e524a88f985657f9682d, type: 3} propertyPath: m_Name value: Artefact 1 @@ -1132,6 +1193,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 8626562367081348111, guid: 2dae894ec500e524a88f985657f9682d, type: 3} + propertyPath: data + value: + objectReference: {fileID: 11400000, guid: a071ae87c1fc7554db6ae524b4a6d115, type: 2} - target: {fileID: 8781564213167799763, guid: 2dae894ec500e524a88f985657f9682d, type: 3} propertyPath: m_Name value: Artefact 2 diff --git a/game/Assets/Scripts/Dialogue/DialogueSystem.cs b/game/Assets/Scripts/Dialogue/DialogueSystem.cs index 57105ea..5d6f3df 100644 --- a/game/Assets/Scripts/Dialogue/DialogueSystem.cs +++ b/game/Assets/Scripts/Dialogue/DialogueSystem.cs @@ -16,9 +16,14 @@ public partial class DialogueSystem : ScriptableObject public event EventHandler onDialogueLine; private readonly Dictionary _fmodKeyCache = new Dictionary(); + // a list of dialogue keys that have already been spoken + private readonly List _usedKeys = new List(); private void OnEnable() { + _fmodKeyCache.Clear(); + _usedKeys.Clear(); + // cache all dialogue keys for FMOD at start to avoid allocations later foreach (var key in DialogueDatabase.Keys) { @@ -26,8 +31,16 @@ public partial class DialogueSystem : ScriptableObject } } - public void PlayLine(string key) + // noRepeat locks this key off from further use. further attempts to use the key will be discarded + public void PlayLine(string key, bool noRepeat = true) { + if (noRepeat) + { + if (_usedKeys.Contains(key)) return; + + _usedKeys.Add(key); + } + // retrieve cached key var fmodKey = _fmodKeyCache[key]; diff --git a/game/Assets/Scripts/Dialogue/ScriptedDialogueTrigger.cs b/game/Assets/Scripts/Dialogue/ScriptedDialogueTrigger.cs new file mode 100644 index 0000000..c3adecf --- /dev/null +++ b/game/Assets/Scripts/Dialogue/ScriptedDialogueTrigger.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Serialization; + +public class ScriptedDialogueTrigger : MonoBehaviour +{ + [SerializeField] private DialogueSystem _dialogue; + [SerializeField] private string _key; + + private void OnTriggerEnter(Collider other) + { + _dialogue.PlayLine(_key); + } +} diff --git a/game/Assets/Scripts/Dialogue/ScriptedDialogueTrigger.cs.meta b/game/Assets/Scripts/Dialogue/ScriptedDialogueTrigger.cs.meta new file mode 100644 index 0000000..7ab11dd --- /dev/null +++ b/game/Assets/Scripts/Dialogue/ScriptedDialogueTrigger.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bf23d7e814442a54888e34f51cbf3cc3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From af34631ed858ba229afe9f45fb93bc6c0bcea7f1 Mon Sep 17 00:00:00 2001 From: Novvator Date: Tue, 2 Mar 2021 16:33:31 +0000 Subject: [PATCH 3/7] artefactUI now works --- game/Assets/Scenes/Main.unity | 790 +++++++++++------- game/Assets/Scripts/Artefacts/Artefact.cs | 3 + .../Scripts/Artefacts/ArtefactControl.cs | 27 +- .../Scripts/Artefacts/ArtefactInventory.cs | 1 + .../Power/{Power1.asset => PowerBlink.asset} | 3 +- ...ower1.asset.meta => PowerBlink.asset.meta} | 0 .../Power/{Power2.asset => PowerBoost.asset} | 3 +- ...ower2.asset.meta => PowerBoost.asset.meta} | 0 .../Assets/Scripts/Artefacts/PickUpDisplay.cs | 34 +- 9 files changed, 554 insertions(+), 307 deletions(-) rename game/Assets/Scripts/Artefacts/Objects/Power/{Power1.asset => PowerBlink.asset} (93%) rename game/Assets/Scripts/Artefacts/Objects/Power/{Power1.asset.meta => PowerBlink.asset.meta} (100%) rename game/Assets/Scripts/Artefacts/Objects/Power/{Power2.asset => PowerBoost.asset} (93%) rename game/Assets/Scripts/Artefacts/Objects/Power/{Power2.asset.meta => PowerBoost.asset.meta} (100%) diff --git a/game/Assets/Scenes/Main.unity b/game/Assets/Scenes/Main.unity index a5f292a..6d39069 100644 --- a/game/Assets/Scenes/Main.unity +++ b/game/Assets/Scenes/Main.unity @@ -123,6 +123,85 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &59318655 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 59318656} + - component: {fileID: 59318658} + - component: {fileID: 59318657} + m_Layer: 5 + m_Name: artefactText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &59318656 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 59318655} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 483749938} + m_RootOrder: 1 + 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: 5.6093, y: 112.2048} + m_SizeDelta: {x: 310.829, y: 52.4374} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &59318657 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 59318655} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 22 + m_FontStyle: 1 + m_BestFit: 0 + m_MinSize: 0 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: You unlocked Blink! +--- !u!222 &59318658 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 59318655} + m_CullTransparentMesh: 1 --- !u!1 &349701919 GameObject: m_ObjectHideFlags: 0 @@ -219,6 +298,11 @@ Transform: m_Father: {fileID: 1509348081} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &429551810 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 13726836969441781, guid: 5efe0b059275dbe48a4108d03ad03fd9, type: 3} + m_PrefabInstance: {fileID: 13726837176080777} + m_PrefabAsset: {fileID: 0} --- !u!1 &470223356 GameObject: m_ObjectHideFlags: 0 @@ -407,18 +491,7 @@ Transform: m_Father: {fileID: 1509348081} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!114 &898399640 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 3201523991801391447, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} - m_PrefabInstance: {fileID: 2138848574} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7d3ed39e75807bc4d865f39b2ef9ea69, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1 &990822312 +--- !u!1 &483749937 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -426,28 +499,30 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 990822313} - - component: {fileID: 990822315} - - component: {fileID: 990822314} + - component: {fileID: 483749938} + - component: {fileID: 483749940} + - component: {fileID: 483749939} m_Layer: 5 - m_Name: Text + m_Name: artefactUI m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &990822313 + m_IsActive: 0 +--- !u!224 &483749938 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 990822312} + m_GameObject: {fileID: 483749937} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 2072374864} + m_Children: + - {fileID: 1361646744} + - {fileID: 59318656} + m_Father: {fileID: 2070784762} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -455,13 +530,88 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &990822314 +--- !u!114 &483749939 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 990822312} + m_GameObject: {fileID: 483749937} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.80784315} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &483749940 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 483749937} + m_CullTransparentMesh: 1 +--- !u!1 &687443206 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 687443207} + - component: {fileID: 687443209} + - component: {fileID: 687443208} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &687443207 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 687443206} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1361646744} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &687443208 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 687443206} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} @@ -489,14 +639,57 @@ MonoBehaviour: m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: "\u039F\u039A" ---- !u!222 &990822315 +--- !u!222 &687443209 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 990822312} + m_GameObject: {fileID: 687443206} m_CullTransparentMesh: 1 +--- !u!114 &898399640 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 3201523991801391447, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} + m_PrefabInstance: {fileID: 2138848574} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7d3ed39e75807bc4d865f39b2ef9ea69, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1112305613 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1112305614} + m_Layer: 0 + m_Name: Artefacts + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1112305614 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1112305613} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 323.23633, y: 139.2844, z: 53.89273} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1662708297} + - {fileID: 1321215423} + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1148358018 GameObject: m_ObjectHideFlags: 0 @@ -640,7 +833,12 @@ Transform: m_Father: {fileID: 1509348081} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1486070833 +--- !u!4 &1321215423 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} + m_PrefabInstance: {fileID: 2138848574} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1361646743 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -648,113 +846,131 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1486070837} - - component: {fileID: 1486070836} - - component: {fileID: 1486070835} - - component: {fileID: 1486070834} - - component: {fileID: 1486070838} + - component: {fileID: 1361646744} + - component: {fileID: 1361646747} + - component: {fileID: 1361646746} + - component: {fileID: 1361646745} m_Layer: 5 - m_Name: Canvas + m_Name: OK m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!114 &1486070834 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1486070833} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &1486070835 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1486070833} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 ---- !u!223 &1486070836 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1486070833} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &1486070837 +--- !u!224 &1361646744 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1486070833} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_GameObject: {fileID: 1361646743} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 1805781312} - m_Father: {fileID: 0} - m_RootOrder: 5 + - {fileID: 687443207} + m_Father: {fileID: 483749938} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} ---- !u!114 &1486070838 + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 252, y: -102} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1361646745 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1486070833} + m_GameObject: {fileID: 1361646743} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3a23aff835e2352469e34bfc2c4b683c, type: 3} + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} m_Name: m_EditorClassIdentifier: - artefactUI: {fileID: 1805781311} - nearbyArtefactID: {fileID: 11400000, guid: caba70196fbb1c549a934f7566f7a247, type: 2} + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.7735849, g: 0.7735849, b: 0.7735849, a: 1} + m_PressedColor: {r: 0.6320754, g: 0.6320754, b: 0.6320754, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1361646746} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 2070784758} + m_TargetAssemblyTypeName: PickUpDisplay, Assembly-CSharp + m_MethodName: PopUpOff + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &1361646746 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1361646743} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.5849056, g: 0.5849056, b: 0.5849056, 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: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1361646747 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1361646743} + m_CullTransparentMesh: 1 --- !u!1 &1509348080 GameObject: m_ObjectHideFlags: 0 @@ -942,7 +1158,7 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1805781311 +--- !u!1 &1611842164 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -950,104 +1166,111 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1805781312} - - component: {fileID: 1805781314} - - component: {fileID: 1805781313} - m_Layer: 5 - m_Name: artefactUI + - component: {fileID: 1611842167} + - component: {fileID: 1611842166} + - component: {fileID: 1611842165} + m_Layer: 0 + m_Name: EventSystem m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!224 &1805781312 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1805781311} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 2072374864} - m_Father: {fileID: 1486070837} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1805781313 + m_IsActive: 1 +--- !u!114 &1611842165 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1805781311} + m_GameObject: {fileID: 1611842164} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Script: {fileID: 11500000, guid: 01614664b831546d2ae94a42149d80ac, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0, g: 0, b: 0, a: 0.392} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &1805781314 -CanvasRenderer: + m_MoveRepeatDelay: 0.5 + m_MoveRepeatRate: 0.1 + m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_PointAction: {fileID: 1054132383583890850, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_MoveAction: {fileID: 3710738434707379630, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_SubmitAction: {fileID: 2064916234097673511, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_CancelAction: {fileID: -1967631576421560919, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_LeftClickAction: {fileID: 8056856818456041789, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_MiddleClickAction: {fileID: 3279352641294131588, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_RightClickAction: {fileID: 3837173908680883260, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_ScrollWheelAction: {fileID: 4502412055082496612, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_TrackedDevicePositionAction: {fileID: 4754684134866288074, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_TrackedDeviceOrientationAction: {fileID: 1025543830046995696, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_DeselectOnBackgroundClick: 1 + m_PointerBehavior: 0 +--- !u!114 &1611842166 +MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1805781311} - m_CullTransparentMesh: 1 + m_GameObject: {fileID: 1611842164} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 10 +--- !u!4 &1611842167 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1611842164} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &1662708297 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} + m_PrefabInstance: {fileID: 1814555656} + m_PrefabAsset: {fileID: 0} --- !u!1001 &1814555656 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 0} + m_TransformParent: {fileID: 1112305614} m_Modifications: - target: {fileID: 3201523991801391447, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: data value: objectReference: {fileID: 11400000, guid: 8882f0bc24a2179459b1e851f8645241, type: 2} + - target: {fileID: 3201523991801391447, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} + propertyPath: _data + value: + objectReference: {fileID: 11400000, guid: 8882f0bc24a2179459b1e851f8645241, type: 2} - target: {fileID: 8781564213167799763, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_Name value: PowerArtefactBlink objectReference: {fileID: 0} - target: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_RootOrder - value: 3 + value: 0 objectReference: {fileID: 0} - target: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_LocalPosition.x - value: -22.3 + value: -345.53632 objectReference: {fileID: 0} - target: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_LocalPosition.y - value: 0.5 + value: -138.7844 objectReference: {fileID: 0} - target: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_LocalPosition.z - value: 38.53155 + value: -15.361179 objectReference: {fileID: 0} - target: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_LocalRotation.w @@ -1055,15 +1278,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_LocalRotation.x - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_LocalRotation.y - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_LocalRotation.z - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -1178,7 +1401,7 @@ Transform: m_Father: {fileID: 1509348081} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &2072374863 +--- !u!1 &2070784757 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1186,161 +1409,150 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 2072374864} - - component: {fileID: 2072374867} - - component: {fileID: 2072374866} - - component: {fileID: 2072374865} + - component: {fileID: 2070784762} + - component: {fileID: 2070784761} + - component: {fileID: 2070784760} + - component: {fileID: 2070784759} + - component: {fileID: 2070784758} m_Layer: 5 - m_Name: OK + m_Name: Canvas m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &2072374864 +--- !u!114 &2070784758 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2070784757} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3a23aff835e2352469e34bfc2c4b683c, type: 3} + m_Name: + m_EditorClassIdentifier: + artefactUI: {fileID: 483749937} + nearbyArtefactID: {fileID: 11400000, guid: caba70196fbb1c549a934f7566f7a247, type: 2} + Player: {fileID: 429551810} + artefactText: {fileID: 59318657} + Artefacts: {fileID: 1112305613} +--- !u!114 &2070784759 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2070784757} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &2070784760 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2070784757} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &2070784761 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2070784757} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 1 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &2070784762 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2072374863} + m_GameObject: {fileID: 2070784757} 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_LocalScale: {x: 0, y: 0, z: 0} m_Children: - - {fileID: 990822313} - m_Father: {fileID: 1805781312} - m_RootOrder: 0 + - {fileID: 483749938} + m_Father: {fileID: 0} + m_RootOrder: 3 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: 252, y: -102} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &2072374865 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2072374863} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 1, g: 0.6761006, b: 0.6761006, a: 1} - m_PressedColor: {r: 1, g: 0.28930813, b: 0.28930813, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 2072374866} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 1486070838} - m_TargetAssemblyTypeName: PickUpDisplay, Assembly-CSharp - m_MethodName: PopUpOff - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 ---- !u!114 &2072374866 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2072374863} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &2072374867 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2072374863} - m_CullTransparentMesh: 1 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} --- !u!1001 &2138848574 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 0} + m_TransformParent: {fileID: 1112305614} m_Modifications: - target: {fileID: 3201523991801391447, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: data value: objectReference: {fileID: 11400000, guid: a071ae87c1fc7554db6ae524b4a6d115, type: 2} + - target: {fileID: 3201523991801391447, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} + propertyPath: _data + value: + objectReference: {fileID: 11400000, guid: a071ae87c1fc7554db6ae524b4a6d115, type: 2} - target: {fileID: 8781564213167799763, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_Name value: PowerArtefactBoost objectReference: {fileID: 0} - target: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_RootOrder - value: 4 + value: 1 objectReference: {fileID: 0} - target: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_LocalPosition.x - value: -3.4 + value: -326.63632 objectReference: {fileID: 0} - target: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_LocalPosition.y - value: 0.5 + value: -138.7844 objectReference: {fileID: 0} - target: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_LocalPosition.z - value: 38.53155 + value: -15.361179 objectReference: {fileID: 0} - target: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_LocalRotation.w @@ -1348,15 +1560,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_LocalRotation.x - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_LocalRotation.y - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_LocalRotation.z - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: 8781564213167799764, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: m_LocalEulerAnglesHint.x diff --git a/game/Assets/Scripts/Artefacts/Artefact.cs b/game/Assets/Scripts/Artefacts/Artefact.cs index 1045c1c..0aaf749 100644 --- a/game/Assets/Scripts/Artefacts/Artefact.cs +++ b/game/Assets/Scripts/Artefacts/Artefact.cs @@ -11,6 +11,9 @@ public class Artefact : ScriptableObject public string artefactDialogue => _artefactDialogue; [SerializeField] private string _artefactDialogue; + public string Name => _name; + [SerializeField] private string _name; + public bool show => _show; private bool _show = false; public bool canInteract => _canInteract; diff --git a/game/Assets/Scripts/Artefacts/ArtefactControl.cs b/game/Assets/Scripts/Artefacts/ArtefactControl.cs index a1a3583..8bc87d9 100644 --- a/game/Assets/Scripts/Artefacts/ArtefactControl.cs +++ b/game/Assets/Scripts/Artefacts/ArtefactControl.cs @@ -10,19 +10,19 @@ public class ArtefactControl : MonoBehaviour private bool _show; protected bool _canInteract; - [SerializeField] - private Artefact data; + public Artefact data => _data; + [SerializeField] private Artefact _data; public int artefactID => _artefactID; private int _artefactID; private string _artefactDialogue; [SerializeField] private SerialInt _nearbyArtefactID; - protected virtual void Start() + protected virtual void Awake() { - _artefactID = data.artefactID; - _artefactDialogue = data.artefactDialogue; - _show = data.show; - _canInteract = data.canInteract; + _artefactID = _data.artefactID; + _artefactDialogue = _data.artefactDialogue; + _show = _data.show; + _canInteract = _data.canInteract; EventHandler.current.onArtefactTriggerEnter += NearArtefact; EventHandler.current.onArtefactTriggerExit += AwayArtefact; @@ -56,17 +56,18 @@ public class ArtefactControl : MonoBehaviour { if (_canInteract == true) { - ArtefactInventory.addA(data); - foreach (var x in ArtefactInventory.artefactList) - { - Debug.Log(x.ToString()); - } + ArtefactInventory.addA(_data); + //debug ArtefactInventory + //foreach (var x in ArtefactInventory.artefactList) + //{ + // Debug.Log(x.ToString()); + //} } //here put 'show artifact dialogue' if (this.gameObject != null) { - data.PowerUnlock(); + _data.PowerUnlock(); _nearbyArtefactID.Value = -1; _canInteract = false; EventHandler.current.ArtefactUI(); diff --git a/game/Assets/Scripts/Artefacts/ArtefactInventory.cs b/game/Assets/Scripts/Artefacts/ArtefactInventory.cs index 6c64d57..a078eed 100644 --- a/game/Assets/Scripts/Artefacts/ArtefactInventory.cs +++ b/game/Assets/Scripts/Artefacts/ArtefactInventory.cs @@ -7,6 +7,7 @@ public class ArtefactInventory : ScriptableObject { public static List artefactList = new List(); private static bool exists = false; + public static void addA(Artefact a) { diff --git a/game/Assets/Scripts/Artefacts/Objects/Power/Power1.asset b/game/Assets/Scripts/Artefacts/Objects/Power/PowerBlink.asset similarity index 93% rename from game/Assets/Scripts/Artefacts/Objects/Power/Power1.asset rename to game/Assets/Scripts/Artefacts/Objects/Power/PowerBlink.asset index 8cbe811..bb7e223 100644 --- a/game/Assets/Scripts/Artefacts/Objects/Power/Power1.asset +++ b/game/Assets/Scripts/Artefacts/Objects/Power/PowerBlink.asset @@ -10,8 +10,9 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 0228856d50ce2a845abd7b3eda114390, type: 3} - m_Name: Power1 + m_Name: PowerBlink m_EditorClassIdentifier: _power: {fileID: 11400000, guid: b47ea197a7cc2ed4eb15271cef672997, type: 2} _artefactID: 1 _artefactDialogue: + _name: Blink diff --git a/game/Assets/Scripts/Artefacts/Objects/Power/Power1.asset.meta b/game/Assets/Scripts/Artefacts/Objects/Power/PowerBlink.asset.meta similarity index 100% rename from game/Assets/Scripts/Artefacts/Objects/Power/Power1.asset.meta rename to game/Assets/Scripts/Artefacts/Objects/Power/PowerBlink.asset.meta diff --git a/game/Assets/Scripts/Artefacts/Objects/Power/Power2.asset b/game/Assets/Scripts/Artefacts/Objects/Power/PowerBoost.asset similarity index 93% rename from game/Assets/Scripts/Artefacts/Objects/Power/Power2.asset rename to game/Assets/Scripts/Artefacts/Objects/Power/PowerBoost.asset index b6ac8df..8e2eb66 100644 --- a/game/Assets/Scripts/Artefacts/Objects/Power/Power2.asset +++ b/game/Assets/Scripts/Artefacts/Objects/Power/PowerBoost.asset @@ -10,8 +10,9 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 0228856d50ce2a845abd7b3eda114390, type: 3} - m_Name: Power2 + m_Name: PowerBoost m_EditorClassIdentifier: _power: {fileID: 11400000, guid: d5ed942937d8cca478f3ec97f6b9c8a2, type: 2} _artefactID: 2 _artefactDialogue: + _name: Boost diff --git a/game/Assets/Scripts/Artefacts/Objects/Power/Power2.asset.meta b/game/Assets/Scripts/Artefacts/Objects/Power/PowerBoost.asset.meta similarity index 100% rename from game/Assets/Scripts/Artefacts/Objects/Power/Power2.asset.meta rename to game/Assets/Scripts/Artefacts/Objects/Power/PowerBoost.asset.meta diff --git a/game/Assets/Scripts/Artefacts/PickUpDisplay.cs b/game/Assets/Scripts/Artefacts/PickUpDisplay.cs index 0930cb2..cd8368b 100644 --- a/game/Assets/Scripts/Artefacts/PickUpDisplay.cs +++ b/game/Assets/Scripts/Artefacts/PickUpDisplay.cs @@ -2,6 +2,8 @@ using Ktyl.Util; using System.Collections; using System.Collections.Generic; using UnityEngine; +using UnityEngine.InputSystem; +using UnityEngine.UI; public class PickUpDisplay : MonoBehaviour { @@ -10,22 +12,48 @@ public class PickUpDisplay : MonoBehaviour [SerializeField] private GameObject artefactUI; [SerializeField] private SerialInt nearbyArtefactID; + [SerializeField] private GameObject Player; + [SerializeField] private Text artefactText; + [SerializeField] private GameObject Artefacts; - private void Start() + private Artefact chosenArtefact; + private static List completeList = new List(); + + private void Awake() { EventHandler.current.onArtefactUI += PopUpOn; + int i; + + for(i=0; i().data); + + } } + + private void FixedUpdate() + { + foreach(Artefact arte in completeList) + { + if (nearbyArtefactID != -1 && arte.artefactID == nearbyArtefactID) + chosenArtefact = arte; + } + } + public void PopUpOn() { _paused = true; artefactUI.SetActive(true); - Time.timeScale = 0.0f; + Player.GetComponent().enabled = false; + artefactText.text = "You have unlocked " + chosenArtefact.Name + "!"; + //Time.timeScale = 0f; } public void PopUpOff() { _paused = false; artefactUI.SetActive(false); - Time.timeScale = 1.0f; + Player.GetComponent().enabled = true; + //Time.timeScale = 1.0f; } } From f58f89a9ee26f08c503c7a1c342aaf6fe04fc2b8 Mon Sep 17 00:00:00 2001 From: Novvator Date: Tue, 2 Mar 2021 17:10:12 +0000 Subject: [PATCH 4/7] fixed bug when timeScale = 0 --- game/Assets/InputSystem.inputsettings.asset | 2 +- game/Assets/Scripts/Artefacts/PickUpDisplay.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/game/Assets/InputSystem.inputsettings.asset b/game/Assets/InputSystem.inputsettings.asset index e28f30f..aa712f1 100644 --- a/game/Assets/InputSystem.inputsettings.asset +++ b/game/Assets/InputSystem.inputsettings.asset @@ -16,7 +16,7 @@ MonoBehaviour: - Gamepad - Keyboard - Mouse - m_UpdateMode: 2 + m_UpdateMode: 1 m_CompensateForScreenOrientation: 1 m_FilterNoiseOnCurrent: 0 m_DefaultDeadzoneMin: 0.125 diff --git a/game/Assets/Scripts/Artefacts/PickUpDisplay.cs b/game/Assets/Scripts/Artefacts/PickUpDisplay.cs index cd8368b..636574c 100644 --- a/game/Assets/Scripts/Artefacts/PickUpDisplay.cs +++ b/game/Assets/Scripts/Artefacts/PickUpDisplay.cs @@ -46,7 +46,7 @@ public class PickUpDisplay : MonoBehaviour artefactUI.SetActive(true); Player.GetComponent().enabled = false; artefactText.text = "You have unlocked " + chosenArtefact.Name + "!"; - //Time.timeScale = 0f; + Time.timeScale = 0f; } public void PopUpOff() @@ -54,6 +54,6 @@ public class PickUpDisplay : MonoBehaviour _paused = false; artefactUI.SetActive(false); Player.GetComponent().enabled = true; - //Time.timeScale = 1.0f; + Time.timeScale = 1.0f; } } From e79053ebb5379ba54fb3ab518ac705498d2358ab Mon Sep 17 00:00:00 2001 From: Novvator Date: Tue, 2 Mar 2021 17:50:27 +0000 Subject: [PATCH 5/7] bug fix in InputSettings UpdateMode --- game/Assets/InputSystem.inputsettings.asset | 2 +- game/Assets/Scenes/Main.unity | 1 + game/Assets/Scripts/Artefacts/PickUpDisplay.cs | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/game/Assets/InputSystem.inputsettings.asset b/game/Assets/InputSystem.inputsettings.asset index aa712f1..e28f30f 100644 --- a/game/Assets/InputSystem.inputsettings.asset +++ b/game/Assets/InputSystem.inputsettings.asset @@ -16,7 +16,7 @@ MonoBehaviour: - Gamepad - Keyboard - Mouse - m_UpdateMode: 1 + m_UpdateMode: 2 m_CompensateForScreenOrientation: 1 m_FilterNoiseOnCurrent: 0 m_DefaultDeadzoneMin: 0.125 diff --git a/game/Assets/Scenes/Main.unity b/game/Assets/Scenes/Main.unity index 6d39069..aeaf18b 100644 --- a/game/Assets/Scenes/Main.unity +++ b/game/Assets/Scenes/Main.unity @@ -1438,6 +1438,7 @@ MonoBehaviour: Player: {fileID: 429551810} artefactText: {fileID: 59318657} Artefacts: {fileID: 1112305613} + inputSettings: {fileID: 11400000, guid: 87faf39b6f22e524984c1680a88045ac, type: 2} --- !u!114 &2070784759 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/game/Assets/Scripts/Artefacts/PickUpDisplay.cs b/game/Assets/Scripts/Artefacts/PickUpDisplay.cs index 636574c..3766c0a 100644 --- a/game/Assets/Scripts/Artefacts/PickUpDisplay.cs +++ b/game/Assets/Scripts/Artefacts/PickUpDisplay.cs @@ -15,6 +15,7 @@ public class PickUpDisplay : MonoBehaviour [SerializeField] private GameObject Player; [SerializeField] private Text artefactText; [SerializeField] private GameObject Artefacts; + [SerializeField] private InputSettings inputSettings; private Artefact chosenArtefact; private static List completeList = new List(); @@ -42,10 +43,12 @@ public class PickUpDisplay : MonoBehaviour public void PopUpOn() { + ; _paused = true; artefactUI.SetActive(true); Player.GetComponent().enabled = false; artefactText.text = "You have unlocked " + chosenArtefact.Name + "!"; + inputSettings.updateMode = (InputSettings.UpdateMode)1; Time.timeScale = 0f; } @@ -53,6 +56,7 @@ public class PickUpDisplay : MonoBehaviour { _paused = false; artefactUI.SetActive(false); + inputSettings.updateMode = (InputSettings.UpdateMode)2; Player.GetComponent().enabled = true; Time.timeScale = 1.0f; } From bdbbaa32a8d90d9c55df39b83fe76769df6e2874 Mon Sep 17 00:00:00 2001 From: Cat Flynn Date: Tue, 2 Mar 2021 18:27:51 +0000 Subject: [PATCH 6/7] trigger dialogue after artefact ui is dismissed --- game/Assets/Scenes/Main.unity | 106 +++++++++++++++++- .../Scripts/Artefacts/ArtefactSystem.cs | 2 +- .../Assets/Scripts/Artefacts/PickUpDisplay.cs | 6 +- 3 files changed, 111 insertions(+), 3 deletions(-) diff --git a/game/Assets/Scenes/Main.unity b/game/Assets/Scenes/Main.unity index 85e96cd..7fe964b 100644 --- a/game/Assets/Scenes/Main.unity +++ b/game/Assets/Scenes/Main.unity @@ -658,6 +658,108 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7d3ed39e75807bc4d865f39b2ef9ea69, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1001 &982982465 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 2070784762} + m_Modifications: + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5119468870989674484, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + propertyPath: m_Name + value: Dialogue UI + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} +--- !u!224 &982982466 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 5119468870989674483, guid: fde30a46065b3b144ac612ec0b3e484a, type: 3} + m_PrefabInstance: {fileID: 982982465} + m_PrefabAsset: {fileID: 0} --- !u!1 &1112305613 GameObject: m_ObjectHideFlags: 0 @@ -1439,6 +1541,7 @@ MonoBehaviour: artefactText: {fileID: 59318657} Artefacts: {fileID: 1112305613} inputSettings: {fileID: 11400000, guid: 87faf39b6f22e524984c1680a88045ac, type: 2} + dialogue: {fileID: 11400000, guid: 56369c4e83cc59e44bf55cd16fafc4e8, type: 2} --- !u!114 &2070784759 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1496,7 +1599,7 @@ Canvas: m_OverrideSorting: 0 m_OverridePixelPerfect: 0 m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 + m_AdditionalShaderChannelsFlag: 25 m_SortingLayerID: 0 m_SortingOrder: 0 m_TargetDisplay: 0 @@ -1512,6 +1615,7 @@ RectTransform: m_LocalScale: {x: 0, y: 0, z: 0} m_Children: - {fileID: 483749938} + - {fileID: 982982466} m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/game/Assets/Scripts/Artefacts/ArtefactSystem.cs b/game/Assets/Scripts/Artefacts/ArtefactSystem.cs index d9c2cc6..860534e 100644 --- a/game/Assets/Scripts/Artefacts/ArtefactSystem.cs +++ b/game/Assets/Scripts/Artefacts/ArtefactSystem.cs @@ -12,6 +12,6 @@ public class ArtefactSystem : ScriptableObject { _inventory.addA(artefact); - _dialogue.PlayLine(artefact.dialogueKey); + // _dialogue.PlayLine(artefact.dialogueKey); } } diff --git a/game/Assets/Scripts/Artefacts/PickUpDisplay.cs b/game/Assets/Scripts/Artefacts/PickUpDisplay.cs index 3766c0a..c52610b 100644 --- a/game/Assets/Scripts/Artefacts/PickUpDisplay.cs +++ b/game/Assets/Scripts/Artefacts/PickUpDisplay.cs @@ -1,5 +1,5 @@ +using System; using Ktyl.Util; -using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.InputSystem; @@ -16,6 +16,7 @@ public class PickUpDisplay : MonoBehaviour [SerializeField] private Text artefactText; [SerializeField] private GameObject Artefacts; [SerializeField] private InputSettings inputSettings; + [SerializeField] private DialogueSystem dialogue; private Artefact chosenArtefact; private static List completeList = new List(); @@ -59,5 +60,8 @@ public class PickUpDisplay : MonoBehaviour inputSettings.updateMode = (InputSettings.UpdateMode)2; Player.GetComponent().enabled = true; Time.timeScale = 1.0f; + + dialogue.PlayLine(chosenArtefact.dialogueKey); + chosenArtefact = null; } } From f28e4e27facfee027091a0142c5d259a88358db2 Mon Sep 17 00:00:00 2001 From: Cat Flynn Date: Tue, 2 Mar 2021 18:44:59 +0000 Subject: [PATCH 7/7] bump wait time in build --- ci/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/build.sh b/ci/build.sh index 4fa8851..4ceffc0 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -22,7 +22,7 @@ open -g $editorpath --args \ -projectPath "$(pwd)/game" # wait for editor log to exist -tries=30 +tries=60 count=0 while [ ! -f $editorlogpath ] do @@ -32,8 +32,8 @@ do count=`expr $count + 1` if [ $count -eq $tries ] ; then - exit "early timeout - $tries seconds elapsed since launch attempt" - return 1 + echo "early timeout - $tries seconds elapsed since launch attempt" + exit 1 fi done