|
@@ -19,8 +19,11 @@ namespace GFGGame
|
|
|
public override void Dispose()
|
|
|
{
|
|
|
base.Dispose();
|
|
|
- _valueBarController.Dispose();
|
|
|
- _valueBarController = null;
|
|
|
+ if (_valueBarController != null)
|
|
|
+ {
|
|
|
+ _valueBarController.Dispose();
|
|
|
+ _valueBarController = null;
|
|
|
+ }
|
|
|
if (_ui != null)
|
|
|
{
|
|
|
_ui.Dispose();
|
|
@@ -43,8 +46,6 @@ namespace GFGGame
|
|
|
_ui.m_c1.onChanged.Add(OnDifficultyChange);
|
|
|
_valueBarController = new ValueBarController(_ui.m_comValueBar);
|
|
|
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
protected override void AddEventListener()
|
|
|
{
|