Skip to content

Commit

Permalink
Dummy level datas created for testing level creating system
Browse files Browse the repository at this point in the history
  • Loading branch information
arifemrebulut committed Sep 21, 2022
1 parent 05f2902 commit fa99fb6
Show file tree
Hide file tree
Showing 17 changed files with 208 additions and 2 deletions.
10 changes: 9 additions & 1 deletion Assets/Scenes/Game.unity
Original file line number Diff line number Diff line change
Expand Up @@ -865,11 +865,19 @@ MonoBehaviour:
- {fileID: 11400000, guid: 938b699d1166c694ca4665cd5259970c, type: 2}
- {fileID: 11400000, guid: be700eb7d62c18c48865f891414a706f, type: 2}
- {fileID: 11400000, guid: 7e795fa0beca4154c8c8d58752842728, type: 2}
- {fileID: 11400000, guid: 2f862abdba44aa74a92212c47c0e78e1, type: 2}
- {fileID: 11400000, guid: 41b93a3e46be4424db34ec06f500de5d, type: 2}
- {fileID: 11400000, guid: 5e6fcd0862e40bc428bad25527fc50e4, type: 2}
- {fileID: 11400000, guid: 980a4aad42168104d827d800c1d0bc20, type: 2}
- {fileID: 11400000, guid: 907736b99b27d3b42bb2e8ed6da0d778, type: 2}
- {fileID: 11400000, guid: e39578be750ffee4c854247327b4841e, type: 2}
- {fileID: 11400000, guid: 7785067c1ce4cd1429145e4a1cf59cc3, type: 2}
colorPrefabPairs: {fileID: 11400000, guid: 3343782cd2c7c464d9bc2e1028adbf1e, type: 2}
levelsParent: {fileID: 820352260}
levelBasePrefab: {fileID: 546593753614098565, guid: 19294428ce35f254fb56b3fdf1fc54ac, type: 3}
nextLevelInstantiatePoint: {fileID: 820352262}
levelDestroyPoint: {fileID: 820352261}
moveDuration: 0.5
--- !u!1 &604123958
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1861,7 +1869,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &1246718367
RectTransform:
m_ObjectHideFlags: 0
Expand Down
16 changes: 16 additions & 0 deletions Assets/Scriptables/LevelData/Level10.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ea8b38accc8592345ba802e92df32984, type: 3}
m_Name: Level10
m_EditorClassIdentifier:
initialPlayerNumber: 16
levelTexture: {fileID: 2800000, guid: 2a4dfc1cfa442d647ac4ba190375ca03, type: 3}
8 changes: 8 additions & 0 deletions Assets/Scriptables/LevelData/Level10.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions Assets/Scriptables/LevelData/Level4.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ea8b38accc8592345ba802e92df32984, type: 3}
m_Name: Level4
m_EditorClassIdentifier:
initialPlayerNumber: 16
levelTexture: {fileID: 2800000, guid: 2a4dfc1cfa442d647ac4ba190375ca03, type: 3}
8 changes: 8 additions & 0 deletions Assets/Scriptables/LevelData/Level4.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions Assets/Scriptables/LevelData/Level5.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ea8b38accc8592345ba802e92df32984, type: 3}
m_Name: Level5
m_EditorClassIdentifier:
initialPlayerNumber: 16
levelTexture: {fileID: 2800000, guid: 2a4dfc1cfa442d647ac4ba190375ca03, type: 3}
8 changes: 8 additions & 0 deletions Assets/Scriptables/LevelData/Level5.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions Assets/Scriptables/LevelData/Level6.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ea8b38accc8592345ba802e92df32984, type: 3}
m_Name: Level6
m_EditorClassIdentifier:
initialPlayerNumber: 16
levelTexture: {fileID: 2800000, guid: 2a4dfc1cfa442d647ac4ba190375ca03, type: 3}
8 changes: 8 additions & 0 deletions Assets/Scriptables/LevelData/Level6.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions Assets/Scriptables/LevelData/Level7.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ea8b38accc8592345ba802e92df32984, type: 3}
m_Name: Level7
m_EditorClassIdentifier:
initialPlayerNumber: 16
levelTexture: {fileID: 2800000, guid: 2a4dfc1cfa442d647ac4ba190375ca03, type: 3}
8 changes: 8 additions & 0 deletions Assets/Scriptables/LevelData/Level7.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions Assets/Scriptables/LevelData/Level8.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ea8b38accc8592345ba802e92df32984, type: 3}
m_Name: Level8
m_EditorClassIdentifier:
initialPlayerNumber: 16
levelTexture: {fileID: 2800000, guid: 2a4dfc1cfa442d647ac4ba190375ca03, type: 3}
8 changes: 8 additions & 0 deletions Assets/Scriptables/LevelData/Level8.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions Assets/Scriptables/LevelData/Level9.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ea8b38accc8592345ba802e92df32984, type: 3}
m_Name: Level9
m_EditorClassIdentifier:
initialPlayerNumber: 16
levelTexture: {fileID: 2800000, guid: 2a4dfc1cfa442d647ac4ba190375ca03, type: 3}
8 changes: 8 additions & 0 deletions Assets/Scriptables/LevelData/Level9.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions Assets/Scripts/GameManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@ private void Awake()
Application.targetFrameRate = 60;
}

private void OnEnable()
{
EventManager.LevelSuccesEvent += IncreaseLevelIndex;
}

private void OnDisable()
{
EventManager.LevelSuccesEvent -= IncreaseLevelIndex;
}

private void IncreaseLevelIndex()
{
CurrentLevelIndex++;
}

public enum GameStatus
{
Playing,
Expand Down
17 changes: 16 additions & 1 deletion Assets/Scripts/UISystem/GameUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,19 @@ public class GameUI : MonoBehaviour, IUIController

[SerializeField] private TextMeshProUGUI levelText;

private void OnEnable()
{
EventManager.LevelSuccesEvent += UpdateLevelText;
}

private void OnDisable()
{
EventManager.LevelSuccesEvent -= UpdateLevelText;
}

private void Start()
{
levelText.text = (GameManager.Instance.CurrentLevelIndex + 1).ToString();
UpdateLevelText();
}

public void Close()
Expand All @@ -21,4 +31,9 @@ public void Open()
{
gameObject.SetActive(true);
}

private void UpdateLevelText()
{
levelText.text = (GameManager.Instance.CurrentLevelIndex + 1).ToString();
}
}

0 comments on commit fa99fb6

Please sign in to comment.