diff --git a/Assembly-CSharp.csproj b/Assembly-CSharp.csproj
index 5518c6f9..18b383b8 100644
--- a/Assembly-CSharp.csproj
+++ b/Assembly-CSharp.csproj
@@ -71,6 +71,7 @@
+
@@ -733,94 +734,94 @@
C:/Program Files/Unity/Hub/Editor/2020.3.32f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Xml.Serialization.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Editor.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Editor.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.InternalAPIEngineBridge.001.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.InternalAPIEngineBridge.001.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.VSCode.Editor.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.VSCode.Editor.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.PixelPerfect.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.2D.PixelPerfect.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Tilemap.Editor.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.2D.Tilemap.Editor.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/PsdPlugin.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/PsdPlugin.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.VisualStudio.Editor.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.VisualStudio.Editor.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Timeline.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.Timeline.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.TextMeshPro.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.TextMeshPro.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.IK.Editor.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.2D.IK.Editor.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Sprite.Editor.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.2D.Sprite.Editor.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Psdimporter.Editor.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.2D.Psdimporter.Editor.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Path.Editor.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.2D.Path.Editor.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.InternalAPIEditorBridge.001.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.InternalAPIEditorBridge.001.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/UnityEditor.UI.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/UnityEditor.UI.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.PlasticSCM.Editor.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.PlasticSCM.Editor.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Rider.Editor.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.Rider.Editor.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/UnityEngine.UI.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/UnityEngine.UI.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Mathematics.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.Mathematics.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.IK.Runtime.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.2D.IK.Runtime.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Triangle.Runtime.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Triangle.Runtime.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Runtime.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.2D.Animation.Runtime.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.PixelPerfect.Editor.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.2D.PixelPerfect.Editor.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Timeline.Editor.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.Timeline.Editor.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.Mathematics.Editor.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.Mathematics.Editor.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Common.Runtime.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.2D.Common.Runtime.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.SpriteShape.Editor.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.2D.SpriteShape.Editor.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.Common.Editor.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.2D.Common.Editor.dll
- C:/Users/alicj/OneDrive/Desktop/Scriptum/Library/ScriptAssemblies/Unity.2D.SpriteShape.Runtime.dll
+ C:/Users/alicj/OneDrive/Desktop/x/Scriptum/Library/ScriptAssemblies/Unity.2D.SpriteShape.Runtime.dll
diff --git a/Assets/DisplayLvl.cs b/Assets/DisplayLvl.cs
index b1970623..7e2a1fde 100644
--- a/Assets/DisplayLvl.cs
+++ b/Assets/DisplayLvl.cs
@@ -9,7 +9,7 @@ public class DisplayLvl : MonoBehaviour
public Text displayText;
- void Start()
+ void Update()
{
int lvl;
string lvlString;
diff --git a/Assets/LevelUpPopUp.cs b/Assets/LevelUpPopUp.cs
new file mode 100644
index 00000000..754ec5c8
--- /dev/null
+++ b/Assets/LevelUpPopUp.cs
@@ -0,0 +1,27 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class LevelUpPopUp : MonoBehaviour
+{
+ public int lvlup;
+ public GameObject lvlUpPopUpPanel;
+
+ void Update()
+ {
+ lvlup = PlayerPrefs.GetInt("LvlUpPopUp");
+ if (lvlup == 1)
+ {
+ StartCoroutine(LvlUpTimer());
+ }
+ }
+
+ IEnumerator LvlUpTimer()
+ {
+ lvlUpPopUpPanel.SetActive(true);
+ PlayerPrefs.SetInt("LvlUpPopUp", 0);
+ yield return new WaitForSeconds(5);
+ lvlUpPopUpPanel.SetActive(false);
+ }
+
+}
diff --git a/Assets/LevelUpPopUp.cs.meta b/Assets/LevelUpPopUp.cs.meta
new file mode 100644
index 00000000..369ae8e1
--- /dev/null
+++ b/Assets/LevelUpPopUp.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ccbc16131f03f5a40ab95769e8d494a4
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity
index 742f6de9..fe74d9b2 100644
--- a/Assets/Scenes/SampleScene.unity
+++ b/Assets/Scenes/SampleScene.unity
@@ -202,6 +202,82 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2019941}
m_CullTransparentMesh: 1
+--- !u!1 &3269898
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 3269899}
+ - component: {fileID: 3269901}
+ - component: {fileID: 3269900}
+ m_Layer: 5
+ m_Name: LvlUpPopUpPanel
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 0
+--- !u!224 &3269899
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 3269898}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 0.35, y: 0.2, z: 1}
+ m_Children:
+ - {fileID: 1225012411}
+ m_Father: {fileID: 184083800}
+ m_RootOrder: 14
+ 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: -143}
+ m_SizeDelta: {x: 0, y: -200}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &3269900
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 3269898}
+ 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: 21300000, guid: 3d8241e686411ad46a7e2927a20025e7, type: 3}
+ m_Type: 0
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
+--- !u!222 &3269901
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 3269898}
+ m_CullTransparentMesh: 1
--- !u!1 &8620305
GameObject:
m_ObjectHideFlags: 0
@@ -1090,7 +1166,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 16
+ m_RootOrder: 17
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &148988773
MonoBehaviour:
@@ -1347,7 +1423,7 @@ Transform:
- {fileID: 1143151251}
- {fileID: 1058265262}
m_Father: {fileID: 0}
- m_RootOrder: 5
+ m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &174581753
GameObject:
@@ -1533,8 +1609,9 @@ RectTransform:
- {fileID: 378577487}
- {fileID: 1751060206}
- {fileID: 440573953}
+ - {fileID: 3269899}
m_Father: {fileID: 0}
- m_RootOrder: 3
+ m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -1579,7 +1656,7 @@ Transform:
- {fileID: 2132075799}
- {fileID: 682072030}
m_Father: {fileID: 0}
- m_RootOrder: 7
+ m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &220874724
GameObject:
@@ -2076,7 +2153,7 @@ Transform:
m_LocalScale: {x: 7.1499996, y: 7.1499996, z: 6}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 9
+ m_RootOrder: 10
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
--- !u!199 &259955963
ParticleSystemRenderer:
@@ -7026,7 +7103,7 @@ Transform:
m_Children:
- {fileID: 132185247}
m_Father: {fileID: 0}
- m_RootOrder: 11
+ m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &271856464
GameObject:
@@ -25025,6 +25102,51 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 379044509}
m_CullTransparentMesh: 1
+--- !u!1 &405555967
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 405555969}
+ - component: {fileID: 405555968}
+ m_Layer: 0
+ m_Name: LvlUpPopUpManager
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!114 &405555968
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 405555967}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: ccbc16131f03f5a40ab95769e8d494a4, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ lvlup: 0
+ lvlUpPopUpPanel: {fileID: 3269898}
+--- !u!4 &405555969
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 405555967}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0.54219836, y: -6.3745008, z: -0.053804293}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 22
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &440573952
GameObject:
m_ObjectHideFlags: 0
@@ -25473,7 +25595,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 2
+ m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &562803612
GameObject:
@@ -25593,7 +25715,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 14
+ m_RootOrder: 15
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &564650392
GameObject:
@@ -35351,7 +35473,7 @@ Transform:
- {fileID: 1200894937}
- {fileID: 359978800}
m_Father: {fileID: 0}
- m_RootOrder: 10
+ m_RootOrder: 11
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &721418781
GameObject:
@@ -36675,7 +36797,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 17
+ m_RootOrder: 18
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &880342281
GameObject:
@@ -36705,7 +36827,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 13
+ m_RootOrder: 14
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &887082958
GameObject:
@@ -38386,7 +38508,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 18
+ m_RootOrder: 19
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1081484090
GameObject:
@@ -38914,7 +39036,7 @@ Transform:
- {fileID: 1698721847}
- {fileID: 926459324}
m_Father: {fileID: 0}
- m_RootOrder: 6
+ m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1193056560
GameObject:
@@ -38960,7 +39082,7 @@ Transform:
- {fileID: 311956049}
- {fileID: 683424792}
m_Father: {fileID: 0}
- m_RootOrder: 4
+ m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1200894936
GameObject:
@@ -39545,6 +39667,101 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1221981386}
m_CullTransparentMesh: 1
+--- !u!1 &1225012410
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1225012411}
+ - component: {fileID: 1225012414}
+ - component: {fileID: 1225012413}
+ - component: {fileID: 1225012412}
+ m_Layer: 5
+ m_Name: LvlUpMsg
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &1225012411
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1225012410}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 3, y: 5, z: 1}
+ m_Children: []
+ m_Father: {fileID: 3269899}
+ 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: 2.9102, y: 7.6697}
+ m_SizeDelta: {x: 194.2123, y: 53.068}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &1225012412
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1225012410}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: a7c996be5c675ec4eb062e7ae1509118, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ textEnglish: Level Up!
+ textPolish: Nowy poziom!
+ displayText: {fileID: 1225012413}
+--- !u!114 &1225012413
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1225012410}
+ 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.63529414, g: 0.44705886, b: 0.2901961, 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: 12800000, guid: 6b506a7e42917d6489d0e806d6b4f62d, type: 2}
+ m_FontSize: 0
+ m_FontStyle: 0
+ 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: Level up!
+--- !u!222 &1225012414
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1225012410}
+ m_CullTransparentMesh: 1
--- !u!1 &1230558963
GameObject:
m_ObjectHideFlags: 0
@@ -133106,6 +133323,67 @@ Transform:
m_Father: {fileID: 166697418}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1001 &1948226836
+PrefabInstance:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Modification:
+ m_TransformParent: {fileID: 0}
+ m_Modifications:
+ - target: {fileID: 4126821754175378127, guid: 2e3ad6c46e0901d408ea67ed0c5761cf, type: 3}
+ propertyPath: m_Name
+ value: Basic_Sword
+ objectReference: {fileID: 0}
+ - target: {fileID: 5029889951288834834, guid: 2e3ad6c46e0901d408ea67ed0c5761cf, type: 3}
+ propertyPath: m_RootOrder
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: 5029889951288834834, guid: 2e3ad6c46e0901d408ea67ed0c5761cf, type: 3}
+ propertyPath: m_LocalPosition.x
+ value: -1.1483517
+ objectReference: {fileID: 0}
+ - target: {fileID: 5029889951288834834, guid: 2e3ad6c46e0901d408ea67ed0c5761cf, type: 3}
+ propertyPath: m_LocalPosition.y
+ value: 2.2197802
+ objectReference: {fileID: 0}
+ - target: {fileID: 5029889951288834834, guid: 2e3ad6c46e0901d408ea67ed0c5761cf, type: 3}
+ propertyPath: m_LocalPosition.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 5029889951288834834, guid: 2e3ad6c46e0901d408ea67ed0c5761cf, type: 3}
+ propertyPath: m_LocalRotation.w
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: 5029889951288834834, guid: 2e3ad6c46e0901d408ea67ed0c5761cf, type: 3}
+ propertyPath: m_LocalRotation.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 5029889951288834834, guid: 2e3ad6c46e0901d408ea67ed0c5761cf, type: 3}
+ propertyPath: m_LocalRotation.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 5029889951288834834, guid: 2e3ad6c46e0901d408ea67ed0c5761cf, type: 3}
+ propertyPath: m_LocalRotation.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 5029889951288834834, guid: 2e3ad6c46e0901d408ea67ed0c5761cf, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 5029889951288834834, guid: 2e3ad6c46e0901d408ea67ed0c5761cf, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 5029889951288834834, guid: 2e3ad6c46e0901d408ea67ed0c5761cf, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 8281463047152580519, guid: 2e3ad6c46e0901d408ea67ed0c5761cf, type: 3}
+ propertyPath: triggered
+ value: 1
+ objectReference: {fileID: 0}
+ m_RemovedComponents: []
+ m_SourcePrefab: {fileID: 100100000, guid: 2e3ad6c46e0901d408ea67ed0c5761cf, type: 3}
--- !u!1 &1969780556
GameObject:
m_ObjectHideFlags: 0
@@ -133170,7 +133448,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 15
+ m_RootOrder: 16
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1995903830
GameObject:
@@ -133282,7 +133560,7 @@ Transform:
m_LocalScale: {x: 1.975, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 20
+ m_RootOrder: 21
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2020454682
GameObject:
@@ -133382,7 +133660,7 @@ Transform:
m_LocalScale: {x: 1.975, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 12
+ m_RootOrder: 13
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2020454687
MonoBehaviour:
@@ -133608,7 +133886,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 19
+ m_RootOrder: 20
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2051744379
GameObject:
@@ -133639,7 +133917,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 8
+ m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!60 &2051744381
PolygonCollider2D:
@@ -133803,7 +134081,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 1
+ m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2132075798
GameObject:
diff --git a/Assets/Scripts/Player.cs b/Assets/Scripts/Player.cs
index 442f1d15..ba0f6cef 100644
--- a/Assets/Scripts/Player.cs
+++ b/Assets/Scripts/Player.cs
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using UnityEngine;
using System.Linq;
-public class Player : MonoBehaviour
+public class Player : MonoBehaviour
{
Rigidbody2D rb;
@@ -17,7 +17,7 @@ public class Player : MonoBehaviour
public ParticleSystem dmgParticleSystem;
public FloatValue maxHealth;
- public float currentHealth=10;
+ public float currentHealth = 10;
public HealthBar healthBar;
private static bool attackSword;
@@ -37,22 +37,23 @@ public class Player : MonoBehaviour
private bool canWalk = true;
+
public float exp;
public int lvl;
public float maxExp;
public LevelBar levelBar;
public FloatValue minPlayerExp;
-
+
public static void putPlayerInCollider()
{
playerInCollider = true;
}
-
+
public static void takePlayerFromCollider()
{
playerInCollider = false;
}
-
+
void Start()
{
Panel = GameObject.FindObjectsOfType(true).Where(sr => sr.gameObject.name == "YouDied").ToArray()[0];
@@ -108,7 +109,7 @@ public class Player : MonoBehaviour
maxExp = 100;
}
}
- else if(lvl == 3)
+ else if (lvl == 3)
{
maxExp = 100;
if (exp >= maxExp)
@@ -132,9 +133,9 @@ public class Player : MonoBehaviour
startRegen = false;
if (currentHealth <= 0)
{
- if(isPanelEnabled)
+ if (isPanelEnabled)
{
- Panel.SetActive(true);
+ Panel.SetActive(true);
}
walkSpeed = 0f;
canWalk = false;
@@ -152,9 +153,9 @@ public class Player : MonoBehaviour
{
if (canWalk == true)
{
- if(!EquipmentManager.Instance._weapon)
- return;
-
+ if (!EquipmentManager.Instance._weapon)
+ return;
+
if (EquipmentManager.Instance._weapon.Name.Equals("pickaxe_test") && attackSword)
{
myAnimator.SetTrigger("pickaxe");
@@ -181,7 +182,7 @@ public class Player : MonoBehaviour
{
attackFist = true;
}
- if(Input.GetKeyDown(KeyCode.X))
+ if (Input.GetKeyDown(KeyCode.X))
{
pickaxeInUse = true;
}
@@ -198,6 +199,7 @@ public class Player : MonoBehaviour
{
if (lvlUp == true)
{
+ PlayerPrefs.SetInt("LvlUpPopUp", 1);
exp = 0;
lvlUp = false;
}
@@ -205,53 +207,53 @@ public class Player : MonoBehaviour
if (canWalk == true)
{
- inputHorizontal = Input.GetAxisRaw("Horizontal");
- inputVertical = Input.GetAxisRaw("Vertical");
+ inputHorizontal = Input.GetAxisRaw("Horizontal");
+ inputVertical = Input.GetAxisRaw("Vertical");
- myAnimator.SetFloat("moveX", inputHorizontal * walkSpeed);
- myAnimator.SetFloat("moveY", inputVertical * walkSpeed);
- if (inputHorizontal != 0)
- {
- myAnimator.SetFloat("speed", walkSpeed);
- }
- else if (inputVertical != 0)
- {
- myAnimator.SetFloat("speed", walkSpeed);
- }
- else
- {
- myAnimator.SetFloat("speed", 0);
- }
-
- if (inputHorizontal == 1 || inputHorizontal == -1 || inputVertical == 1 || inputVertical == -1)
- {
- myAnimator.SetFloat("lastMoveX", inputHorizontal);
- myAnimator.SetFloat("lastMoveY", inputVertical);
- }
-
- timerRegen += Time.deltaTime;
- if(timerRegen >= waitRegen)
- {
- startRegen = true;
- }
-
- if (startRegen == true)
- {
- timerTick += Time.deltaTime;
- if(timerTick >= waitTick)
+ myAnimator.SetFloat("moveX", inputHorizontal * walkSpeed);
+ myAnimator.SetFloat("moveY", inputVertical * walkSpeed);
+ if (inputHorizontal != 0)
{
- if(currentHealth < 10)
+ myAnimator.SetFloat("speed", walkSpeed);
+ }
+ else if (inputVertical != 0)
+ {
+ myAnimator.SetFloat("speed", walkSpeed);
+ }
+ else
+ {
+ myAnimator.SetFloat("speed", 0);
+ }
+
+ if (inputHorizontal == 1 || inputHorizontal == -1 || inputVertical == 1 || inputVertical == -1)
+ {
+ myAnimator.SetFloat("lastMoveX", inputHorizontal);
+ myAnimator.SetFloat("lastMoveY", inputVertical);
+ }
+
+ timerRegen += Time.deltaTime;
+ if (timerRegen >= waitRegen)
+ {
+ startRegen = true;
+ }
+
+ if (startRegen == true)
+ {
+ timerTick += Time.deltaTime;
+ if (timerTick >= waitTick)
{
- currentHealth = currentHealth + 1;
- healthBar.SetHealth(currentHealth);
- timerTick = 0f;
+ if (currentHealth < 10)
+ {
+ currentHealth = currentHealth + 1;
+ healthBar.SetHealth(currentHealth);
+ timerTick = 0f;
+ }
}
}
- }
- PlayerPrefs.SetFloat("health", currentHealth);
- PlayerPrefs.SetFloat("exp", exp);
- PlayerPrefs.SetInt("lvl", lvl);
- PlayerPrefs.SetFloat("maxExp", maxExp);
+ PlayerPrefs.SetFloat("health", currentHealth);
+ PlayerPrefs.SetFloat("exp", exp);
+ PlayerPrefs.SetInt("lvl", lvl);
+ PlayerPrefs.SetFloat("maxExp", maxExp);
}
HandleInput();
@@ -259,7 +261,7 @@ public class Player : MonoBehaviour
void FixedUpdate()
{
- if(canWalk == true)
+ if (canWalk == true)
{
if (inputHorizontal != 0 || inputVertical != 0)
{
@@ -286,4 +288,26 @@ public class Player : MonoBehaviour
PlayerPrefs.SetFloat("exp-S", exp);
PlayerPrefs.SetInt("lvl-S", lvl);
}
+
+ public void ManageHealth()
+ {
+
+ }
+
+ public void ManageStrength()
+ {
+
+ }
+
+ public void ManageDefense()
+ {
+
+ }
+
+ public void LevelUpPopUp()
+ {
+
+ }
+
+
}
diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset
index 0cc6fad3..c74da0ec 100644
--- a/UserSettings/EditorUserSettings.asset
+++ b/UserSettings/EditorUserSettings.asset
@@ -24,16 +24,16 @@ EditorUserSettings:
value: 22424703114646680e0b0227036c70050204112e291f2f2a2c3b1920caef212be7a923e7ee2e26
flags: 0
RecentlyUsedScenePath-6:
- value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d
+ value: 22424703114646680e0b0227036c7c1100123d24383a273e2e2c5326ece92021
flags: 0
RecentlyUsedScenePath-7:
value: 22424703114646680e0b0227036c72111f1958072926337e38271427fb
flags: 0
RecentlyUsedScenePath-8:
- value: 22424703114646680e0b0227036c7c1100123d24383a273e2e2c5326ece92021
+ value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d
flags: 0
RecentlyUsedScenePath-9:
- value: 22424703114646680e0b0227036c72111f1958072926337e38271427fb
+ value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d
flags: 0
vcSharedLogLevel:
value: 0d5e400f0650