From faf6c30b3e6de80540126fbd16254253d1f1cb49 Mon Sep 17 00:00:00 2001 From: Novvator Date: Wed, 3 Mar 2021 16:45:09 +0000 Subject: [PATCH] small fixes --- .../ArtefactObjects/Power/PA_Blink.asset | 2 +- .../ArtefactObjects/Power/PA_Boost.asset | 2 +- game/Assets/Scenes/Main.unity | 57 +++++++++++++------ .../Scripts/Artefacts/ArtefactControl.cs | 8 ++- 4 files changed, 48 insertions(+), 21 deletions(-) diff --git a/game/Assets/Data/Artefacts/ArtefactObjects/Power/PA_Blink.asset b/game/Assets/Data/Artefacts/ArtefactObjects/Power/PA_Blink.asset index dd7eac6..5d70fea 100644 --- a/game/Assets/Data/Artefacts/ArtefactObjects/Power/PA_Blink.asset +++ b/game/Assets/Data/Artefacts/ArtefactObjects/Power/PA_Blink.asset @@ -14,5 +14,5 @@ MonoBehaviour: m_EditorClassIdentifier: _artefactID: 1 _dialogueKey: PA_DASH - _name: + _name: Blink _power: {fileID: 11400000, guid: b47ea197a7cc2ed4eb15271cef672997, type: 2} diff --git a/game/Assets/Data/Artefacts/ArtefactObjects/Power/PA_Boost.asset b/game/Assets/Data/Artefacts/ArtefactObjects/Power/PA_Boost.asset index b4ba837..42e44a2 100644 --- a/game/Assets/Data/Artefacts/ArtefactObjects/Power/PA_Boost.asset +++ b/game/Assets/Data/Artefacts/ArtefactObjects/Power/PA_Boost.asset @@ -14,5 +14,5 @@ MonoBehaviour: m_EditorClassIdentifier: _artefactID: 2 _dialogueKey: PA_BOOST - _name: + _name: Boost _power: {fileID: 11400000, guid: d5ed942937d8cca478f3ec97f6b9c8a2, type: 2} diff --git a/game/Assets/Scenes/Main.unity b/game/Assets/Scenes/Main.unity index 9f6f94b..17be023 100644 --- a/game/Assets/Scenes/Main.unity +++ b/game/Assets/Scenes/Main.unity @@ -142,17 +142,21 @@ PrefabInstance: propertyPath: m_LocalRotation.z value: 0.0000000037117205 objectReference: {fileID: 0} + - target: {fileID: 4676633831388223341, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3} + propertyPath: m_LocalRotation.w + value: 0.98992556 + objectReference: {fileID: 0} - target: {fileID: 4676633831388223341, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3} propertyPath: m_LocalRotation.x - value: 0.120697476 + value: 0.12049158 objectReference: {fileID: 0} - target: {fileID: 4676633831388223341, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3} propertyPath: m_LocalRotation.y - value: 0.045786913 + value: 0.07381384 objectReference: {fileID: 0} - target: {fileID: 4676633831388223341, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3} propertyPath: m_LocalRotation.z - value: -0.0055730827 + value: -0.00898446 objectReference: {fileID: 0} - target: {fileID: 4676633831414007564, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3} propertyPath: m_Name @@ -204,27 +208,31 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4676633832789495666, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3} propertyPath: m_LocalRotation.x - value: 0.12082611 + value: 0.12082608 objectReference: {fileID: 0} - target: {fileID: 4676633832789495666, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3} propertyPath: m_LocalRotation.y - value: -3.7677753e-15 + value: 0.000000030494466 objectReference: {fileID: 0} - target: {fileID: 4676633832789495666, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3} propertyPath: m_LocalRotation.z - value: 1.0303356e-15 + value: -0.00000000371172 + objectReference: {fileID: 0} + - target: {fileID: 4676633832928372887, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3} + propertyPath: m_LocalRotation.w + value: 0.98992556 objectReference: {fileID: 0} - target: {fileID: 4676633832928372887, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3} propertyPath: m_LocalRotation.x - value: 0.12069748 + value: 0.120491594 objectReference: {fileID: 0} - target: {fileID: 4676633832928372887, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3} propertyPath: m_LocalRotation.y - value: 0.04578691 + value: 0.07381382 objectReference: {fileID: 0} - target: {fileID: 4676633832928372887, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3} propertyPath: m_LocalRotation.z - value: -0.0055730836 + value: -0.008984459 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3} @@ -260,10 +268,10 @@ RectTransform: 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_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: -30} + m_SizeDelta: {x: 500, y: 52.43741} m_Pivot: {x: 0.5, y: 1} --- !u!114 &59318657 MonoBehaviour: @@ -747,6 +755,11 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 687443206} m_CullTransparentMesh: 1 +--- !u!1 &828755177 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 4676633831945762664, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3} + m_PrefabInstance: {fileID: 58405493} + m_PrefabAsset: {fileID: 0} --- !u!114 &898399640 stripped MonoBehaviour: m_CorrespondingSourceObject: {fileID: 3201523991801391447, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} @@ -1074,11 +1087,11 @@ RectTransform: m_Father: {fileID: 483749938} 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_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: -30, y: 30} m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} + m_Pivot: {x: 1, y: 0} --- !u!114 &1361646745 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1502,6 +1515,10 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 8781564213167799766, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} + propertyPath: m_Enabled + value: 0 + objectReference: {fileID: 0} - target: {fileID: 8781564214893312972, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: _artefact value: @@ -1637,7 +1654,7 @@ MonoBehaviour: m_EditorClassIdentifier: artefactUI: {fileID: 483749937} nearbyArtefactID: {fileID: 11400000, guid: caba70196fbb1c549a934f7566f7a247, type: 2} - Player: {fileID: 0} + Player: {fileID: 828755177} artefactText: {fileID: 59318657} Artefacts: {fileID: 1112305613} inputSettings: {fileID: 11400000, guid: 87faf39b6f22e524984c1680a88045ac, type: 2} @@ -1787,6 +1804,10 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 8781564213167799766, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} + propertyPath: m_Enabled + value: 0 + objectReference: {fileID: 0} - target: {fileID: 8781564214893312972, guid: b3a3678d38e60164dbd4f343e28f69e1, type: 3} propertyPath: _artefact value: diff --git a/game/Assets/Scripts/Artefacts/ArtefactControl.cs b/game/Assets/Scripts/Artefacts/ArtefactControl.cs index 3fbd31f..3a1ec10 100644 --- a/game/Assets/Scripts/Artefacts/ArtefactControl.cs +++ b/game/Assets/Scripts/Artefacts/ArtefactControl.cs @@ -11,6 +11,8 @@ public class ArtefactControl : MonoBehaviour private bool _show; protected bool _canInteract; + private GUIStyle guiS = new GUIStyle(); + public Artefact data => _data; [SerializeField] private Artefact _data; public int artefactID => _artefactID; @@ -28,6 +30,10 @@ public class ArtefactControl : MonoBehaviour EventHandler.current.onArtefactTriggerEnter += NearArtefact; EventHandler.current.onArtefactTriggerExit += AwayArtefact; EventHandler.current.onArtefactPickUp += PickUp; + + guiS.fontSize = 22; + guiS.normal.textColor = Color.white; + guiS.alignment = TextAnchor.MiddleCenter; } private void NearArtefact(int id) @@ -79,7 +85,7 @@ public class ArtefactControl : MonoBehaviour { if (_show) { - GUI.Label(new Rect(Screen.width / 2 - 50, 5, 100, 100), "Press E to pickup"); + GUI.Label(new Rect(Screen.width / 2 - 50, 0, 100, 100), "Press E to pick up",guiS); } } }