Skip to content

Commit

Permalink
Code clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
FlipWebApps committed Jan 28, 2016
1 parent 5882b17 commit 1c6deb7
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 12 deletions.
1 change: 0 additions & 1 deletion Scripts/Audio/Components/StartStopBackgroundMusic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//----------------------------------------------

using FlipWebApps.GameFramework.Scripts.GameStructure;
using Mono.Cecil;
using UnityEngine;
using UnityEngine.Assertions;

Expand Down
2 changes: 0 additions & 2 deletions Scripts/GameStructure/GameManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
using FlipWebApps.GameFramework.Scripts.GameStructure.Players.ObjectModel;
using FlipWebApps.GameFramework.Scripts.GameStructure.Worlds.ObjectModel;
using FlipWebApps.GameFramework.Scripts.Localisation;
using Mono.Cecil;
using UnityEngine;
using UnityEngine.Assertions;

namespace FlipWebApps.GameFramework.Scripts.GameStructure
{
Expand Down
7 changes: 0 additions & 7 deletions Scripts/UI/Dialogs/Components/DialogManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ public class DialogManager : Singleton<DialogManager>
new DialogPrefabOverride { Path = "GameFeedbackDialog"}
};

public DialogPrefabOverride[] DialogContentPrefabOverrides =
{
new DialogPrefabOverride { Path = "UnlockLevelPlaceHolder"}
};

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)
{
// show hint panel first time only
Expand Down Expand Up @@ -142,8 +137,6 @@ GameObject GetPrefab(string prefab)
{
foreach (var dialogOverride in DialogPrefabOverrides.Where(dialogOverride => dialogOverride.Path == prefab && dialogOverride.Prefab != null))
return dialogOverride.Prefab;
foreach (var dialogOverride in DialogContentPrefabOverrides.Where(dialogOverride => ("Content/" + dialogOverride.Path) == prefab && dialogOverride.Prefab != null))
return dialogOverride.Prefab;

return GameManager.LoadResource<GameObject>("Dialog/" + prefab);
}
Expand Down
4 changes: 2 additions & 2 deletions Scripts/UI/Dialogs/Components/ShowDialogOnce.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace FlipWebApps.GameFramework.Scripts.UI.Dialogs.Components
public class ShowDialogOnce : MonoBehaviour
{
public string DialogKey;
public string Prefab;
public string PrefabName;
public string TitleKey;
public string TextKey;
public string Text2Key;
Expand All @@ -24,7 +24,7 @@ void Start()
{
Assert.IsTrue(DialogManager.IsActive, "To use the ShowDialogOnce component, you must have a DialogManager added to your scene.");

DialogManager.Instance.ShowOnce(DialogKey, Prefab, titleKey: TitleKey, textKey: TextKey, text2Key: Text2Key,
DialogManager.Instance.ShowOnce(DialogKey, PrefabName, titleKey: TitleKey, textKey: TextKey, text2Key: Text2Key,
sprite: Sprite);
}
}
Expand Down

0 comments on commit 1c6deb7

Please sign in to comment.