From af34631ed858ba229afe9f45fb93bc6c0bcea7f1 Mon Sep 17 00:00:00 2001 From: Novvator Date: Tue, 2 Mar 2021 16:33:31 +0000 Subject: [PATCH] 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; } }