Skip to content

Commit 1c6deb7

Browse files
committed
Code clean-up
1 parent 5882b17 commit 1c6deb7

File tree

4 files changed

+2
-12
lines changed

4 files changed

+2
-12
lines changed

Scripts/Audio/Components/StartStopBackgroundMusic.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
//----------------------------------------------
55

66
using FlipWebApps.GameFramework.Scripts.GameStructure;
7-
using Mono.Cecil;
87
using UnityEngine;
98
using UnityEngine.Assertions;
109

Scripts/GameStructure/GameManager.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
using FlipWebApps.GameFramework.Scripts.GameStructure.Players.ObjectModel;
1515
using FlipWebApps.GameFramework.Scripts.GameStructure.Worlds.ObjectModel;
1616
using FlipWebApps.GameFramework.Scripts.Localisation;
17-
using Mono.Cecil;
1817
using UnityEngine;
19-
using UnityEngine.Assertions;
2018

2119
namespace FlipWebApps.GameFramework.Scripts.GameStructure
2220
{

Scripts/UI/Dialogs/Components/DialogManager.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ public class DialogManager : Singleton<DialogManager>
2828
new DialogPrefabOverride { Path = "GameFeedbackDialog"}
2929
};
3030

31-
public DialogPrefabOverride[] DialogContentPrefabOverrides =
32-
{
33-
new DialogPrefabOverride { Path = "UnlockLevelPlaceHolder"}
34-
};
35-
3631
public DialogInstance ShowOnce(string dialogKey, string prefab = null, string title = null, string titleKey = null, string text = null, string textKey = null, string text2 = null, string text2Key = null, Sprite sprite = null, System.Action<DialogInstance> doneCallback = null, DialogInstance.DialogButtonsType dialogButtons = DialogInstance.DialogButtonsType.Ok)
3732
{
3833
// show hint panel first time only
@@ -142,8 +137,6 @@ GameObject GetPrefab(string prefab)
142137
{
143138
foreach (var dialogOverride in DialogPrefabOverrides.Where(dialogOverride => dialogOverride.Path == prefab && dialogOverride.Prefab != null))
144139
return dialogOverride.Prefab;
145-
foreach (var dialogOverride in DialogContentPrefabOverrides.Where(dialogOverride => ("Content/" + dialogOverride.Path) == prefab && dialogOverride.Prefab != null))
146-
return dialogOverride.Prefab;
147140

148141
return GameManager.LoadResource<GameObject>("Dialog/" + prefab);
149142
}

Scripts/UI/Dialogs/Components/ShowDialogOnce.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace FlipWebApps.GameFramework.Scripts.UI.Dialogs.Components
1414
public class ShowDialogOnce : MonoBehaviour
1515
{
1616
public string DialogKey;
17-
public string Prefab;
17+
public string PrefabName;
1818
public string TitleKey;
1919
public string TextKey;
2020
public string Text2Key;
@@ -24,7 +24,7 @@ void Start()
2424
{
2525
Assert.IsTrue(DialogManager.IsActive, "To use the ShowDialogOnce component, you must have a DialogManager added to your scene.");
2626

27-
DialogManager.Instance.ShowOnce(DialogKey, Prefab, titleKey: TitleKey, textKey: TextKey, text2Key: Text2Key,
27+
DialogManager.Instance.ShowOnce(DialogKey, PrefabName, titleKey: TitleKey, textKey: TextKey, text2Key: Text2Key,
2828
sprite: Sprite);
2929
}
3030
}

0 commit comments

Comments
 (0)