38 lines
No EOL
1.1 KiB
C#
38 lines
No EOL
1.1 KiB
C#
using System;
|
|
using Domain;
|
|
using Presenter;
|
|
using Presenter.SaveSystem;
|
|
using UnityEngine;
|
|
using View.Scene;
|
|
using View.UI;
|
|
|
|
namespace View {
|
|
public class Dependencies : MonoBehaviour {
|
|
public ExpressionClick ExpressionClick { private set; get; }
|
|
public Score Score { private set; get; }
|
|
public CustomInput CustomInput { private set; get; }
|
|
|
|
public SaveGame Saver { private set; get; }
|
|
public LoadGame Loader { private set; get; }
|
|
|
|
private void Awake() {
|
|
Score = new Score(10, 10);
|
|
|
|
IExpressionInput input = FindObjectOfType<ExpressionInput>();
|
|
IExpressionInput visibility = FindObjectOfType<UIVisibility>();
|
|
IExpressionInput inputCollections = new ExpressionInputCollection(new[] { input, visibility });
|
|
|
|
IRoseSpawner spawner = FindObjectOfType<RoseSpawner>();
|
|
|
|
IRoseGrow grow = FindObjectOfType<GrowParticlesSpawner>();
|
|
|
|
ExpressionClick = new ExpressionClick(Score, inputCollections, spawner, grow);
|
|
|
|
CustomInput = new CustomInput();
|
|
|
|
PlayerPrefsRepository repository = new();
|
|
Saver = new SaveGame(repository, Score);
|
|
Loader = new LoadGame(repository, Score, inputCollections, spawner);
|
|
}
|
|
}
|
|
} |