Skip to content

Commit b7153a0

Browse files
committed
Deleted unnecessary components
1 parent 57edda3 commit b7153a0

File tree

1,228 files changed

+22
-208598
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,228 files changed

+22
-208598
lines changed

.idea/.idea.Grid_Level_Editor/.idea/.gitignore

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.
File renamed without changes.

.idea/.idea.Inventory_System/.idea/inspectionProfiles/Project_Default.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/.idea.Inventory_System/.idea/projectSettingsUpdater.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.idea/.idea.Inventory_System/.idea/workspace.xml

Lines changed: 0 additions & 624 deletions
This file was deleted.

Assets/Code/Game.asmdef

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
"rootNamespace": "",
44
"references": [
55
"Zenject",
6-
"DOTweenPro.Scripts",
7-
"DOTween.Modules",
8-
"Coffee.UIParticle",
96
"UniTask",
107
"UniTask.DOTween"
118
],

Assets/Code/Infrastructure/BootstrapInstaller.cs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@
22
using Code.Infrastructure.Services.PersistenceProgress;
33
using Code.Infrastructure.Services.SaveLoad;
44
using Code.Infrastructure.Services.StaticData;
5-
using Code.Inventory.Services.InventoryExpand;
6-
using Code.InventoryModel.Items.Factory;
7-
using Code.InventoryModel.Items.Provider;
8-
using Code.InventoryModel.Services.InventoryDataProvider;
9-
using Code.InventoryModel.Services.InventoryPlayer;
10-
using Code.UI.InventoryViewModel.Factory;
11-
using Code.UI.InventoryViewModel.Services.InventoryViewInitializer;
12-
using Services.Factories.Inventory;
135
using Services.PersistenceProgress;
146
using UnityEngine.SceneManagement;
157
using Zenject;
@@ -27,15 +19,12 @@ public override void InstallBindings()
2719
BindFactory();
2820
BindSaveLoad();
2921
BindProgressData();
30-
BindInventoryServices();
3122
BindStaticData();
3223
}
3324

3425
private void BindFactory()
3526
{
36-
Container.BindInterfacesTo<ItemFactory>().AsSingle();
3727
Container.BindInterfacesTo<UIFactory>().AsSingle();
38-
Container.BindInterfacesTo<InventoryUIFactory>().AsSingle();
3928
}
4029

4130
private void BindSaveLoad() =>
@@ -44,29 +33,15 @@ private void BindSaveLoad() =>
4433
private void BindProgressData() =>
4534
Container.Bind<IPersistenceProgressService>().To<PersistenceProgressService>().AsSingle();
4635

47-
private void BindInventoryServices()
48-
{
49-
Container.Bind<IInventoryExpandService>().To<InventoryExpandService>().AsSingle();
50-
Container.Bind<IInventorySaveInitializer>().To<InventorySaveInitializer>().AsSingle();
51-
Container.Bind<IInventoryPlayerSetUper>().To<InventoryPlayerSetUper>().AsSingle();
52-
53-
Container.Bind<IItemDropService>().To<ItemDropService>().AsSingle();
54-
55-
Container.Bind<IInventoryViewInitializer>().To<InventoryViewInitializer>().AsSingle();
56-
}
5736

5837
private void BindStaticData()
5938
{
6039
Container.Bind<IStaticDataService>().To<StaticDataService>().AsSingle();
61-
Container.Bind<IItemDataProvider>().To<ItemDataProvider>().AsSingle();
62-
Container.Bind<IInventoryDataProvider>().To<InventoryDataProvider>().AsSingle();
6340
}
6441

6542
public void Initialize()
6643
{
6744
Container.Resolve<IStaticDataService>().LoadData();
68-
Container.Resolve<IItemDataProvider>().LoadData();
69-
Container.Resolve<IInventoryDataProvider>().LoadData();
7045

7146
SceneManager.LoadScene(SceneName);
7247
}

Assets/Code/Infrastructure/Services/GameStater/GameStarter.cs

Lines changed: 4 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44
using Code.Infrastructure.Services.PersistenceProgress.Player;
55
using Code.Infrastructure.Services.SaveLoad;
66
using Code.Infrastructure.Services.StaticData;
7-
using Code.Inventory.Services.InventoryExpand;
8-
using Code.InventoryModel;
9-
using Code.InventoryModel.Services.InventoryPlayer;
10-
using Code.UI.InventoryViewModel.Services.InventoryViewInitializer;
11-
using Services.Factories.Inventory;
127
using UnityEngine;
138

149
namespace Code.Infrastructure.Services.GameStater
@@ -19,72 +14,32 @@ public class GameStarter : IGameStarter
1914
private readonly IPersistenceProgressService _progressService;
2015
private readonly ISaveLoadService _saveLoadService;
2116
private readonly IUIFactory _uiFactory;
22-
private readonly IInventorySaveInitializer _inventorySaveInitializer;
23-
private readonly IInventoryPlayerSetUper _playerInventory;
24-
private readonly IInventoryExpandService _inventoryExpandService;
17+
2518
public GameStarter(
2619
IPersistenceProgressService progressService,
2720
IStaticDataService staticDataService,
2821
ISaveLoadService saveLoadService,
29-
IUIFactory uiFactory,
30-
IInventorySaveInitializer inventorySaveInitializer,
31-
IInventoryPlayerSetUper playerInventory,
32-
IInventoryExpandService inventoryExpandService)
22+
IUIFactory uiFactory)
3323
{
3424
_progressService = progressService;
3525
_staticDataService = staticDataService;
3626
_saveLoadService = saveLoadService;
3727
_uiFactory = uiFactory;
38-
_inventorySaveInitializer = inventorySaveInitializer;
39-
_playerInventory = playerInventory;
40-
_inventoryExpandService = inventoryExpandService;
4128
}
4229

4330
public void Initialize()
4431
{
4532
Debug.Log("GameStarter.Initialize");
4633

4734
InitProgress();
48-
InitInventoryModel();
49-
DebugInventoryModel();
5035
InitUI();
5136
}
52-
53-
private void InitInventoryModel()
54-
{
55-
TetrisInventoryData inventoryData = _progressService.PlayerData.InventoryData.PlayerInventory;
56-
IInventory inventory = new ExpandableInventory(new TetrisInventory(inventoryData), _inventoryExpandService);
57-
_playerInventory.SetInventory(inventory);
58-
}
5937

6038
private void InitProgress()
6139
{
6240
_progressService.PlayerData = LoadProgress() ?? SetUpBaseProgress();
6341
}
64-
65-
private void DebugInventoryModel()
66-
{
67-
TetrisInventoryData inventory = _progressService.PlayerData.InventoryData.PlayerInventory;
68-
Debug.Log("===== Inventory State =====");
69-
70-
StringBuilder sb = new StringBuilder();
71-
72-
for (int y = 0; y < inventory.Rows; y++)
73-
{
74-
string[] row = new string[inventory.Columns];
75-
76-
for (int x = 0; x < inventory.Columns; x++)
77-
{
78-
GridCell cell = inventory.Cells[y * inventory.Columns + x];
79-
string cellContent = cell.Item != null ? cell.Item.Id : " Empty ";
80-
row[x] = $"({x},{y}) {cellContent}";
81-
}
82-
83-
sb.AppendLine(string.Join(" | ", row));
84-
}
85-
86-
Debug.Log(sb.ToString());
87-
}
42+
8843

8944
private void InitUI()
9045
{
@@ -102,17 +57,8 @@ private PlayerData LoadProgress()
10257
private PlayerData SetUpBaseProgress()
10358
{
10459
Debug.Log("InitializeProgress");
105-
106-
var progress = new PlayerData(
107-
columns: InventorySize.Columns,
108-
rows: InventorySize.Rows);
109-
60+
var progress = new PlayerData();
11061
_progressService.PlayerData = progress;
111-
112-
_inventorySaveInitializer.Initialize(
113-
initialItems: _staticDataService.Balance.Inventory.DefaultItems,
114-
defaultBorders: _staticDataService.Balance.Inventory.DefaultOpenedCells);
115-
11662
return progress;
11763
}
11864
}

Assets/Code/Infrastructure/Services/PersistenceProgress/IPersistenceProgressService.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Code.Infrastructure.Services.PersistenceProgress.Player;
2-
using Services.PersistenceProgress.Player;
32

43
namespace Code.Infrastructure.Services.PersistenceProgress
54
{

0 commit comments

Comments
 (0)