diff --git a/Assets/Scripts/BackgroundSetter.cs b/Assets/Scripts/BackgroundSetter.cs index 3bdd0ce..e26bca7 100644 --- a/Assets/Scripts/BackgroundSetter.cs +++ b/Assets/Scripts/BackgroundSetter.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using System.Linq; using UnityEngine; using UnityEngine.UI; diff --git a/Assets/Scripts/Board/BoardSolver.cs b/Assets/Scripts/Board/BoardSolver.cs index 5afd030..489b19f 100644 --- a/Assets/Scripts/Board/BoardSolver.cs +++ b/Assets/Scripts/Board/BoardSolver.cs @@ -3,14 +3,14 @@ public class BoardSolver { - private BoostExicuter _boostExicuter; + private IBoostExicuter _boostExicuter; private SequenceSolver _sequenceSolver; private ISwapSolwer _regularSwapSolver; private ISwapSolwer _boostSwapSolver; public event UnityAction CountedSwapMaked; - public BoardSolver(Workers workers, ItemSwaper itemSwaper, BoostExicuter boostExicuter) + public BoardSolver(Workers workers, ItemSwaper itemSwaper, IBoostExicuter boostExicuter) { _boostExicuter = boostExicuter; _sequenceSolver = new(workers); diff --git a/Assets/Scripts/Board/BoostSwapSolver.cs b/Assets/Scripts/Board/BoostSwapSolver.cs index 1fdda21..d88db90 100644 --- a/Assets/Scripts/Board/BoostSwapSolver.cs +++ b/Assets/Scripts/Board/BoostSwapSolver.cs @@ -3,10 +3,10 @@ public class BoostSwapSolver : ISwapSolwer { - private BoostExicuter _boostExicuter; + private IBoostExicuter _boostExicuter; private UnityAction _swapCallback; - public BoostSwapSolver(BoostExicuter boostExicuter, UnityAction swapCallback) + public BoostSwapSolver(IBoostExicuter boostExicuter, UnityAction swapCallback) { _boostExicuter = boostExicuter; _swapCallback = swapCallback; diff --git a/Assets/Scripts/Board/DiagonalBoardFaller.cs b/Assets/Scripts/Board/DiagonalBoardFaller.cs index cedf69c..8db4cb5 100644 --- a/Assets/Scripts/Board/DiagonalBoardFaller.cs +++ b/Assets/Scripts/Board/DiagonalBoardFaller.cs @@ -1,6 +1,4 @@ using Cysharp.Threading.Tasks; -using System.Collections.Generic; -using UnityEngine; public class DiagonalBoardFaller : IBoardFaller { diff --git a/Assets/Scripts/Board/ISwapSolwer.cs b/Assets/Scripts/Board/ISwapSolwer.cs index 911c446..dbe9569 100644 --- a/Assets/Scripts/Board/ISwapSolwer.cs +++ b/Assets/Scripts/Board/ISwapSolwer.cs @@ -1,5 +1,4 @@ using Cysharp.Threading.Tasks; -using UnityEngine.Events; public interface ISwapSolwer { diff --git a/Assets/Scripts/Board/MidleCellFinder.cs b/Assets/Scripts/Board/MidleCellFinder.cs index 6b86806..641c148 100644 --- a/Assets/Scripts/Board/MidleCellFinder.cs +++ b/Assets/Scripts/Board/MidleCellFinder.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using UnityEngine; public class MidleCellFinder diff --git a/Assets/Scripts/Boost/BombBoostAction.cs b/Assets/Scripts/Boost/BombBoostAction.cs index 093d41b..54cb169 100644 --- a/Assets/Scripts/Boost/BombBoostAction.cs +++ b/Assets/Scripts/Boost/BombBoostAction.cs @@ -8,13 +8,13 @@ public class BombBoostAction : IBoostAction private const float BombRadius = 2f; private Board _board; private ItemNextStateMover _itemRemover; - private BoostExicuter _boostExicuter; + private IBoostExicuter _boostExicuter; private BoardClearer _boardClearer; - public BombBoostAction(Board board, ItemNextStateMover itemRemover, BoostExicuter boostExicuter) + public BombBoostAction(Board board, IBoostExicuter boostExicuter) { _board = board; - _itemRemover = itemRemover; + _itemRemover = new(); _boostExicuter = boostExicuter; _boardClearer = new(board); } diff --git a/Assets/Scripts/Boost/BoostExicuter.cs b/Assets/Scripts/Boost/BoostExicuter.cs index 35a8008..d3b944e 100644 --- a/Assets/Scripts/Boost/BoostExicuter.cs +++ b/Assets/Scripts/Boost/BoostExicuter.cs @@ -1,8 +1,14 @@ using Cysharp.Threading.Tasks; +public interface IBoostExicuter +{ + UniTask Execute(IBoostItem boostItem); + UniTask Execute(IItem item, ToolTypes toolTypes); +} + -public class BoostExicuter +public class BoostExicuter : IBoostExicuter { private IBoostAction _horisontal; private IBoostAction _vertical; @@ -13,44 +19,46 @@ public class BoostExicuter private BoardClearer _boardClearer; - public BoostExicuter(ItemNextStateMover itemRemover, Board board, GoalCellOnBoardFinder goalItemFinder) + public BoostExicuter(Board board, GoalCellOnBoardFinder goalItemFinder) { - _horisontal = new HorizontalLineRemover(board, itemRemover, this); - _vertical = new VerticalLineRemover(board, itemRemover, this); - _bomb = new BombBoostAction(board, itemRemover, this); - _rainbow = new RainbowBoostAction(board, itemRemover, this); - _rocket = new RocketBoostAction(board, goalItemFinder, itemRemover, this); - _xlines = new XLineRemover(board, itemRemover, this); + _horisontal = new HorizontalLineRemover(board, this); + _vertical = new VerticalLineRemover(board, this); + _bomb = new BombBoostAction(board, this); + _rainbow = new RainbowBoostAction(board, this); + _rocket = new RocketBoostAction(board, goalItemFinder, this); + _xlines = new XLineRemover(board, this); _boardClearer = new(board); } - public async UniTask Execute(IItem item) + public async UniTask Execute(IBoostItem boostItem) { - if (item is IBoostItem boostItem) + if (boostItem.IsUsed == true) + { + return; + } + + boostItem.IsUsed = true; + + switch (boostItem.GetBoostType()) { - switch (boostItem.GetBoostType()) - { - case BoostTypes.None: - break; - case BoostTypes.Bomb: - await _bomb.Execute(boostItem); - break; - case BoostTypes.Horizontal: - await _horisontal.Execute(boostItem); - break; - case BoostTypes.Vertical: - await _vertical.Execute(boostItem); - break; - case BoostTypes.Rainbow: - await _rainbow.Execute(boostItem); - break; - case BoostTypes.Rocket: - await _rocket.Execute(boostItem); - break; - default: - break; - } + case BoostTypes.None: + break; + case BoostTypes.Bomb: + await _bomb.Execute(boostItem); + break; + case BoostTypes.Horizontal: + await _horisontal.Execute(boostItem); + break; + case BoostTypes.Vertical: + await _vertical.Execute(boostItem); + break; + case BoostTypes.Rainbow: + await _rainbow.Execute(boostItem); + break; + case BoostTypes.Rocket: + await _rocket.Execute(boostItem); + break; } _boardClearer.ClearBordFromDeadItems(); diff --git a/Assets/Scripts/Boost/BoostInjector.cs b/Assets/Scripts/Boost/BoostInjector.cs index bd294ed..3c3fa98 100644 --- a/Assets/Scripts/Boost/BoostInjector.cs +++ b/Assets/Scripts/Boost/BoostInjector.cs @@ -1,6 +1,5 @@ using UnityEngine; using Zenject; -using Cysharp.Threading.Tasks; public class BoostInjector : MonoBehaviour diff --git a/Assets/Scripts/Boost/BoostItem.cs b/Assets/Scripts/Boost/BoostItem.cs index 984000c..094d8ce 100644 --- a/Assets/Scripts/Boost/BoostItem.cs +++ b/Assets/Scripts/Boost/BoostItem.cs @@ -4,17 +4,20 @@ public class BoostItem : Item, IBoostItem { private BoostTypes _type; - public IItem SwapWith { get; set; } + public bool IsUsed { get; set; } public event UnityAction SetedType; public event UnityAction LeavedBoostState; - public void SetBoostType(BoostTypes value) + public void Init(BoostTypes value) { + IsUsed = false; _type = value; SetedType?.Invoke(value); } + + public BoostTypes GetBoostType() => _type; protected override void OnStateChanged(ItemStateTypes old, ItemStateTypes @new) diff --git a/Assets/Scripts/Boost/BoostLineRemoverBase.cs b/Assets/Scripts/Boost/BoostLineRemoverBase.cs index 265d06e..84358d9 100644 --- a/Assets/Scripts/Boost/BoostLineRemoverBase.cs +++ b/Assets/Scripts/Boost/BoostLineRemoverBase.cs @@ -8,10 +8,10 @@ public abstract class BoostLineRemoverBase : IBoostAction private ItemNextStateMover _itemNextStateMover; private BoardClearer _boardClearer; - protected BoostLineRemoverBase(Board board, ItemNextStateMover itemRemover) + protected BoostLineRemoverBase(Board board) { _board = board; - _itemNextStateMover = itemRemover; + _itemNextStateMover = new(); _boardClearer = new(board); } diff --git a/Assets/Scripts/Boost/BoostSelector.cs b/Assets/Scripts/Boost/BoostSelector.cs index 020e052..f563c4d 100644 --- a/Assets/Scripts/Boost/BoostSelector.cs +++ b/Assets/Scripts/Boost/BoostSelector.cs @@ -1,9 +1,6 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; using TMPro; using UnityEngine.Events; -using System; public class BoostSelector : MonoBehaviour { diff --git a/Assets/Scripts/Boost/RainbowBoostAction.cs b/Assets/Scripts/Boost/RainbowBoostAction.cs index f338572..99fe339 100644 --- a/Assets/Scripts/Boost/RainbowBoostAction.cs +++ b/Assets/Scripts/Boost/RainbowBoostAction.cs @@ -6,16 +6,15 @@ public class RainbowBoostAction : IBoostAction { private Board _board; private ItemNextStateMover _itemRemover; - private BoostExicuter _boostExicuter; + private IBoostExicuter _boostExicuter; private BoardClearer _boardClearer; - public RainbowBoostAction(Board board, ItemNextStateMover itemRemover, BoostExicuter boostExicuter) + public RainbowBoostAction(Board board, IBoostExicuter boostExicuter) { _board = board; - _itemRemover = itemRemover; + _itemRemover = new(); _boostExicuter = boostExicuter; _boardClearer = new(board); - } public async UniTask Execute(IItem item) diff --git a/Assets/Scripts/Boost/RocketBoostAction.cs b/Assets/Scripts/Boost/RocketBoostAction.cs index d9cba8d..e0be568 100644 --- a/Assets/Scripts/Boost/RocketBoostAction.cs +++ b/Assets/Scripts/Boost/RocketBoostAction.cs @@ -5,18 +5,19 @@ public class RocketBoostAction : IBoostAction private Board _board; private GoalCellOnBoardFinder _goalItemFinder; private ItemNextStateMover _itemRemover; - private BoostExicuter _boostExicuter; + private IBoostExicuter _boostExicuter; private BoardClearer _boardClearer; private NeighbourRemover _neighbourRemover; private ICell _executedOnCell; + public RocketBoostAction(Board board, GoalCellOnBoardFinder goalItemFinder, - ItemNextStateMover itemRemover, BoostExicuter boostExicuter) + IBoostExicuter boostExicuter) { _goalItemFinder = goalItemFinder; - _itemRemover = itemRemover; + _itemRemover = new(); _boostExicuter = boostExicuter; _board = board; _boardClearer = new(board); diff --git a/Assets/Scripts/Boost/XLineRemover.cs b/Assets/Scripts/Boost/XLineRemover.cs index a3c8d52..b8b5153 100644 --- a/Assets/Scripts/Boost/XLineRemover.cs +++ b/Assets/Scripts/Boost/XLineRemover.cs @@ -2,9 +2,9 @@ public class XLineRemover : BoostLineRemoverBase { - private BoostExicuter _boostExicuter; + private IBoostExicuter _boostExicuter; - public XLineRemover(Board board, ItemNextStateMover itemRemover, BoostExicuter boostExicuter) : base(board, itemRemover) + public XLineRemover(Board board, IBoostExicuter boostExicuter) : base(board) { Directons = new GridPosition[] { GridPosition.Left, GridPosition.Right, GridPosition.Up, GridPosition.Down }; _boostExicuter = boostExicuter; diff --git a/Assets/Scripts/CameraPositioner.cs b/Assets/Scripts/CameraPositioner.cs index 2f130a7..5ff3df4 100644 --- a/Assets/Scripts/CameraPositioner.cs +++ b/Assets/Scripts/CameraPositioner.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; using Zenject; diff --git a/Assets/Scripts/Cell/Cell.cs b/Assets/Scripts/Cell/Cell.cs index dade16d..3b09106 100644 --- a/Assets/Scripts/Cell/Cell.cs +++ b/Assets/Scripts/Cell/Cell.cs @@ -1,5 +1,4 @@ -using System; -using UnityEngine; +using UnityEngine; public class Cell : MonoBehaviour, ICell { diff --git a/Assets/Scripts/CellSelector.cs b/Assets/Scripts/CellSelector.cs index c4e05e8..f4d2a0d 100644 --- a/Assets/Scripts/CellSelector.cs +++ b/Assets/Scripts/CellSelector.cs @@ -1,6 +1,4 @@ -using Cysharp.Threading.Tasks; -using System; -using UnityEngine; +using UnityEngine; using UnityEngine.Events; public class CellSelector diff --git a/Assets/Scripts/Code/BackToMainMenu.cs b/Assets/Scripts/Code/BackToMainMenu.cs index a5bb45b..05f4b0a 100644 --- a/Assets/Scripts/Code/BackToMainMenu.cs +++ b/Assets/Scripts/Code/BackToMainMenu.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; public class BackToMainMenu : MonoBehaviour diff --git a/Assets/Scripts/Code/Bank/BankDefault.cs b/Assets/Scripts/Code/Bank/BankDefault.cs index 45fd603..729f0ac 100644 --- a/Assets/Scripts/Code/Bank/BankDefault.cs +++ b/Assets/Scripts/Code/Bank/BankDefault.cs @@ -1,6 +1,4 @@ using System; -using System.Collections; -using System.Collections.Generic; using UnityEngine; namespace Assets.Scripts.Code.Bank diff --git a/Assets/Scripts/Code/Bank/Coins.cs b/Assets/Scripts/Code/Bank/Coins.cs index 3a4fa3c..c070c67 100644 --- a/Assets/Scripts/Code/Bank/Coins.cs +++ b/Assets/Scripts/Code/Bank/Coins.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using TMPro; using UnityEngine; diff --git a/Assets/Scripts/Code/Bank/Hearts.cs b/Assets/Scripts/Code/Bank/Hearts.cs index b122f15..6754268 100644 --- a/Assets/Scripts/Code/Bank/Hearts.cs +++ b/Assets/Scripts/Code/Bank/Hearts.cs @@ -1,8 +1,6 @@ using System; using System.Collections; -using System.Collections.Generic; using TMPro; -using Unity.VisualScripting; using UnityEngine; namespace Assets.Scripts.Code.Bank diff --git a/Assets/Scripts/Code/Bank/Stars.cs b/Assets/Scripts/Code/Bank/Stars.cs index 79941dc..57618e7 100644 --- a/Assets/Scripts/Code/Bank/Stars.cs +++ b/Assets/Scripts/Code/Bank/Stars.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using TMPro; using UnityEngine; diff --git a/Assets/Scripts/Code/Camera/CameraStopZone.cs b/Assets/Scripts/Code/Camera/CameraStopZone.cs index 591f351..c35c613 100644 --- a/Assets/Scripts/Code/Camera/CameraStopZone.cs +++ b/Assets/Scripts/Code/Camera/CameraStopZone.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; public class CameraStopZone : MonoBehaviour diff --git a/Assets/Scripts/Code/Camera/CameraZone.cs b/Assets/Scripts/Code/Camera/CameraZone.cs index 80947ec..f7a747a 100644 --- a/Assets/Scripts/Code/Camera/CameraZone.cs +++ b/Assets/Scripts/Code/Camera/CameraZone.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; public class CameraZone : MonoBehaviour diff --git a/Assets/Scripts/Code/Cells/CellProfile.cs b/Assets/Scripts/Code/Cells/CellProfile.cs index 85d1b2b..ce98108 100644 --- a/Assets/Scripts/Code/Cells/CellProfile.cs +++ b/Assets/Scripts/Code/Cells/CellProfile.cs @@ -1,7 +1,4 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; -using UnityEngine.Profiling; using UnityEngine.UI; public delegate void SwitchProfileCell(CellProfile cell); diff --git a/Assets/Scripts/Code/Cells/CellsProfileController.cs b/Assets/Scripts/Code/Cells/CellsProfileController.cs index 028481c..e1a7e05 100644 --- a/Assets/Scripts/Code/Cells/CellsProfileController.cs +++ b/Assets/Scripts/Code/Cells/CellsProfileController.cs @@ -1,8 +1,5 @@ using System; -using System.Collections; -using System.Collections.Generic; using UnityEngine; -using UnityEngine.UI; public class CellsProfileController : MonoBehaviour { diff --git a/Assets/Scripts/Code/DynamicMessage.cs b/Assets/Scripts/Code/DynamicMessage.cs index cc3487b..998c0ca 100644 --- a/Assets/Scripts/Code/DynamicMessage.cs +++ b/Assets/Scripts/Code/DynamicMessage.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using TMPro; using UnityEngine; diff --git a/Assets/Scripts/Code/History.cs b/Assets/Scripts/Code/History.cs index c7f6bde..431a364 100644 --- a/Assets/Scripts/Code/History.cs +++ b/Assets/Scripts/Code/History.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.SceneManagement; diff --git a/Assets/Scripts/Code/Player/PlayerBehaviour.cs b/Assets/Scripts/Code/Player/PlayerBehaviour.cs index 427a509..02a1d74 100644 --- a/Assets/Scripts/Code/Player/PlayerBehaviour.cs +++ b/Assets/Scripts/Code/Player/PlayerBehaviour.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; using UnityEngine.AI; diff --git a/Assets/Scripts/Code/Player/PlayerNotificationPlay.cs b/Assets/Scripts/Code/Player/PlayerNotificationPlay.cs index b38b860..f421624 100644 --- a/Assets/Scripts/Code/Player/PlayerNotificationPlay.cs +++ b/Assets/Scripts/Code/Player/PlayerNotificationPlay.cs @@ -1,4 +1,3 @@ -using System.Collections; using System.Collections.Generic; using System.Text; using UnityEngine; diff --git a/Assets/Scripts/Code/Player/PseudorandomPoints.cs b/Assets/Scripts/Code/Player/PseudorandomPoints.cs index 5ff6112..364f791 100644 --- a/Assets/Scripts/Code/Player/PseudorandomPoints.cs +++ b/Assets/Scripts/Code/Player/PseudorandomPoints.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; public class PseudorandomPoints : MonoBehaviour diff --git a/Assets/Scripts/Code/ProfilePanel.cs b/Assets/Scripts/Code/ProfilePanel.cs index 6f9b190..67bec7b 100644 --- a/Assets/Scripts/Code/ProfilePanel.cs +++ b/Assets/Scripts/Code/ProfilePanel.cs @@ -1,9 +1,5 @@ -using Assets.Scripts.Code.UI; -using System.Collections; -using System.Collections.Generic; using TMPro; using UnityEngine; -using UnityEngine.UI; public class ProfilePanel : MonoBehaviour { diff --git a/Assets/Scripts/Code/PurchaseController.cs b/Assets/Scripts/Code/PurchaseController.cs index 5902915..0878b8c 100644 --- a/Assets/Scripts/Code/PurchaseController.cs +++ b/Assets/Scripts/Code/PurchaseController.cs @@ -1,6 +1,4 @@ using Assets.Scripts.Code.Bank; -using System.Collections; -using System.Collections.Generic; using UnityEngine; public class PurchaseController : MonoBehaviour diff --git a/Assets/Scripts/Code/RoomService.cs b/Assets/Scripts/Code/RoomService.cs index f2d5c37..4eabb3c 100644 --- a/Assets/Scripts/Code/RoomService.cs +++ b/Assets/Scripts/Code/RoomService.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; public class RoomService : MonoBehaviour diff --git a/Assets/Scripts/Code/Scene/LoadLevel.cs b/Assets/Scripts/Code/Scene/LoadLevel.cs index b553f75..03d6efe 100644 --- a/Assets/Scripts/Code/Scene/LoadLevel.cs +++ b/Assets/Scripts/Code/Scene/LoadLevel.cs @@ -1,7 +1,5 @@ using DG.Tweening; using System; -using System.Collections; -using System.Collections.Generic; using UnityEngine; public class LoadLevel : MonoBehaviour, ICoroutineRunner, IInit> diff --git a/Assets/Scripts/Code/Scene/SceneLouder.cs b/Assets/Scripts/Code/Scene/SceneLouder.cs index 21a0144..15c24d1 100644 --- a/Assets/Scripts/Code/Scene/SceneLouder.cs +++ b/Assets/Scripts/Code/Scene/SceneLouder.cs @@ -1,4 +1,3 @@ - using Unity.VisualScripting; using UnityEngine.SceneManagement; using UnityEngine; using System.Collections; diff --git a/Assets/Scripts/Code/SoundService.cs b/Assets/Scripts/Code/SoundService.cs index e8ad8cb..aa4423d 100644 --- a/Assets/Scripts/Code/SoundService.cs +++ b/Assets/Scripts/Code/SoundService.cs @@ -1,4 +1,3 @@ -using System; using UnityEngine; using UnityEngine.Audio; diff --git a/Assets/Scripts/Code/StartGame/StartGame.cs b/Assets/Scripts/Code/StartGame/StartGame.cs index 0eea2b4..6d039d9 100644 --- a/Assets/Scripts/Code/StartGame/StartGame.cs +++ b/Assets/Scripts/Code/StartGame/StartGame.cs @@ -1,6 +1,4 @@ using DG.Tweening; -using System.Collections; -using System.Collections.Generic; using UnityEngine; public class StartGame : MonoBehaviour diff --git a/Assets/Scripts/Code/StartGame/StartGameBar.cs b/Assets/Scripts/Code/StartGame/StartGameBar.cs index 6f00dac..964a738 100644 --- a/Assets/Scripts/Code/StartGame/StartGameBar.cs +++ b/Assets/Scripts/Code/StartGame/StartGameBar.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using DG.Tweening; diff --git a/Assets/Scripts/Code/Tasks/Choice/ChoiceScrptableObject.cs b/Assets/Scripts/Code/Tasks/Choice/ChoiceScrptableObject.cs index b7002ba..cd71f1c 100644 --- a/Assets/Scripts/Code/Tasks/Choice/ChoiceScrptableObject.cs +++ b/Assets/Scripts/Code/Tasks/Choice/ChoiceScrptableObject.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; [CreateAssetMenu(fileName = "ChoiceScrptableObject", menuName = "ScriptableObjects/ChoiceScrptableObject")] diff --git a/Assets/Scripts/Code/Tasks/Choice/CustomOject.cs b/Assets/Scripts/Code/Tasks/Choice/CustomOject.cs index bea14f4..74588f7 100644 --- a/Assets/Scripts/Code/Tasks/Choice/CustomOject.cs +++ b/Assets/Scripts/Code/Tasks/Choice/CustomOject.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; diff --git a/Assets/Scripts/Code/Tasks/Choice/TaskChoice.cs b/Assets/Scripts/Code/Tasks/Choice/TaskChoice.cs index c31d815..c9bc08b 100644 --- a/Assets/Scripts/Code/Tasks/Choice/TaskChoice.cs +++ b/Assets/Scripts/Code/Tasks/Choice/TaskChoice.cs @@ -1,9 +1,5 @@ -using Assets.Scripts.Code.Bank; -using System.Collections; -using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; -using Zenject; public class TaskChoice : MonoBehaviour { diff --git a/Assets/Scripts/Code/Tasks/CompleteTask.cs b/Assets/Scripts/Code/Tasks/CompleteTask.cs index 4bb96b8..e24a87d 100644 --- a/Assets/Scripts/Code/Tasks/CompleteTask.cs +++ b/Assets/Scripts/Code/Tasks/CompleteTask.cs @@ -1,9 +1,4 @@ -using DG.Tweening; -using System.Collections; -using System.Collections.Generic; -using System.Threading.Tasks.Sources; using UnityEngine; -using UnityEngine.UI; namespace Assets.Scripts.Code.UI { diff --git a/Assets/Scripts/Code/Tasks/RoomFilling/BrokeItems.cs b/Assets/Scripts/Code/Tasks/RoomFilling/BrokeItems.cs index 374be8a..ede9c95 100644 --- a/Assets/Scripts/Code/Tasks/RoomFilling/BrokeItems.cs +++ b/Assets/Scripts/Code/Tasks/RoomFilling/BrokeItems.cs @@ -1,9 +1,3 @@ -using DG.Tweening; -using System.Collections; -using System.Collections.Generic; -using System.Linq.Expressions; -using UnityEngine; - public class BrokeItems : RoomItems { } diff --git a/Assets/Scripts/Code/Tasks/RoomFilling/FillingItems.cs b/Assets/Scripts/Code/Tasks/RoomFilling/FillingItems.cs index b07b3ae..c43d865 100644 --- a/Assets/Scripts/Code/Tasks/RoomFilling/FillingItems.cs +++ b/Assets/Scripts/Code/Tasks/RoomFilling/FillingItems.cs @@ -1,9 +1,3 @@ -using DG.Tweening; -using System.Collections; -using System.Collections.Generic; -using System.Linq.Expressions; -using UnityEngine; - public class FillingItems : RoomItems { } diff --git a/Assets/Scripts/Code/Tasks/RoomFilling/RoomForFilling.cs b/Assets/Scripts/Code/Tasks/RoomFilling/RoomForFilling.cs index 68062da..21a53a1 100644 --- a/Assets/Scripts/Code/Tasks/RoomFilling/RoomForFilling.cs +++ b/Assets/Scripts/Code/Tasks/RoomFilling/RoomForFilling.cs @@ -1,6 +1,4 @@ using Assets.Scripts.Code.UI; -using System.Collections; -using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; diff --git a/Assets/Scripts/Code/Tasks/TaskScriptableObject.cs b/Assets/Scripts/Code/Tasks/TaskScriptableObject.cs index 5fd2427..fc6236e 100644 --- a/Assets/Scripts/Code/Tasks/TaskScriptableObject.cs +++ b/Assets/Scripts/Code/Tasks/TaskScriptableObject.cs @@ -1,7 +1,4 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; -using UnityEngine.UI; [CreateAssetMenu(fileName = "TaskScriptableObject", menuName = "ScriptableObjects/TaskScriptableObject")] public class TaskScriptableObject : ScriptableObject diff --git a/Assets/Scripts/Code/Tasks/TasksController.cs b/Assets/Scripts/Code/Tasks/TasksController.cs index 30be5e9..b97d030 100644 --- a/Assets/Scripts/Code/Tasks/TasksController.cs +++ b/Assets/Scripts/Code/Tasks/TasksController.cs @@ -1,9 +1,7 @@ using Assets.Scripts.Code.Bank; using Assets.Scripts.Code.UI; using System.Collections; -using System.Collections.Generic; using TMPro; -using Unity.VisualScripting.Antlr3.Runtime.Tree; using UnityEngine; using UnityEngine.UI; diff --git a/Assets/Scripts/Code/TestHeartsPanel.cs b/Assets/Scripts/Code/TestHeartsPanel.cs index 137512d..001d892 100644 --- a/Assets/Scripts/Code/TestHeartsPanel.cs +++ b/Assets/Scripts/Code/TestHeartsPanel.cs @@ -1,6 +1,4 @@ using Assets.Scripts.Code.Bank; -using System.Collections; -using System.Collections.Generic; using UnityEngine; public class TestHeartsPanel : MonoBehaviour diff --git a/Assets/Scripts/Code/UI/BarTask.cs b/Assets/Scripts/Code/UI/BarTask.cs index d5549ef..c105a7d 100644 --- a/Assets/Scripts/Code/UI/BarTask.cs +++ b/Assets/Scripts/Code/UI/BarTask.cs @@ -1,7 +1,5 @@ using Assets.Scripts.Code.Bank; using DG.Tweening; -using System.Collections; -using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; diff --git a/Assets/Scripts/Code/UI/CanvasSetter.cs b/Assets/Scripts/Code/UI/CanvasSetter.cs index 7b3edbd..6b24ba6 100644 --- a/Assets/Scripts/Code/UI/CanvasSetter.cs +++ b/Assets/Scripts/Code/UI/CanvasSetter.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; using DG.Tweening; namespace Assets.Scripts.Code.UI diff --git a/Assets/Scripts/Code/UI/CheatConsole.cs b/Assets/Scripts/Code/UI/CheatConsole.cs index 4ec9e7f..85d8390 100644 --- a/Assets/Scripts/Code/UI/CheatConsole.cs +++ b/Assets/Scripts/Code/UI/CheatConsole.cs @@ -1,7 +1,4 @@ using Assets.Scripts.Code.Bank; -using System.Collections; -using System.Collections.Generic; -using Unity.VisualScripting; using UnityEngine; namespace Assets.Scripts.Code.UI diff --git a/Assets/Scripts/Code/UI/CommonUI/CustomFont.cs b/Assets/Scripts/Code/UI/CommonUI/CustomFont.cs index 97c26b0..6ca6cc8 100644 --- a/Assets/Scripts/Code/UI/CommonUI/CustomFont.cs +++ b/Assets/Scripts/Code/UI/CommonUI/CustomFont.cs @@ -1,4 +1,3 @@ -using System.Collections; using System.Collections.Generic; using UnityEngine; diff --git a/Assets/Scripts/Code/UI/CommonUI/OpenKeyboard.cs b/Assets/Scripts/Code/UI/CommonUI/OpenKeyboard.cs index e87b5be..748fdea 100644 --- a/Assets/Scripts/Code/UI/CommonUI/OpenKeyboard.cs +++ b/Assets/Scripts/Code/UI/CommonUI/OpenKeyboard.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; public class OpenKeyboard : MonoBehaviour diff --git a/Assets/Scripts/Code/UI/Decrease.cs b/Assets/Scripts/Code/UI/Decrease.cs index 0781a73..29c94ce 100644 --- a/Assets/Scripts/Code/UI/Decrease.cs +++ b/Assets/Scripts/Code/UI/Decrease.cs @@ -1,10 +1,5 @@ using DG.Tweening; -using System; -using System.Collections; -using System.Collections.Generic; using UnityEngine; -using UnityEngine.Events; -using static Assets.Scripts.Code.UI.Decrease; namespace Assets.Scripts.Code.UI { diff --git a/Assets/Scripts/Code/UI/Glare.cs b/Assets/Scripts/Code/UI/Glare.cs index eabbb28..dd512fc 100644 --- a/Assets/Scripts/Code/UI/Glare.cs +++ b/Assets/Scripts/Code/UI/Glare.cs @@ -1,6 +1,4 @@ using DG.Tweening; -using System.Collections; -using System.Collections.Generic; using UnityEngine; public class Glare : MonoBehaviour diff --git a/Assets/Scripts/Code/UI/HeartsAmount.cs b/Assets/Scripts/Code/UI/HeartsAmount.cs index f9630b6..27d2a60 100644 --- a/Assets/Scripts/Code/UI/HeartsAmount.cs +++ b/Assets/Scripts/Code/UI/HeartsAmount.cs @@ -1,6 +1,4 @@ using Assets.Scripts.Code.Bank; -using System.Collections; -using System.Collections.Generic; using TMPro; using UnityEngine; diff --git a/Assets/Scripts/Code/UI/Increase.cs b/Assets/Scripts/Code/UI/Increase.cs index 1ec6301..b3ae851 100644 --- a/Assets/Scripts/Code/UI/Increase.cs +++ b/Assets/Scripts/Code/UI/Increase.cs @@ -1,7 +1,4 @@ -using Assets.Scripts.Code.UI; using DG.Tweening; -using System.Collections; -using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; diff --git a/Assets/Scripts/Code/UI/PlayPanel.cs b/Assets/Scripts/Code/UI/PlayPanel.cs index 2c6e758..0a943f4 100644 --- a/Assets/Scripts/Code/UI/PlayPanel.cs +++ b/Assets/Scripts/Code/UI/PlayPanel.cs @@ -1,6 +1,4 @@ -using System.Collections; using System.Collections.Generic; -using UnityEditor; using UnityEngine; public class PlayPanel : MonoBehaviour diff --git a/Assets/Scripts/Code/UI/SettingsPanel.cs b/Assets/Scripts/Code/UI/SettingsPanel.cs index f6ee994..85e3a11 100644 --- a/Assets/Scripts/Code/UI/SettingsPanel.cs +++ b/Assets/Scripts/Code/UI/SettingsPanel.cs @@ -1,9 +1,5 @@ using Assets.Scripts.Code; -using System.Collections; -using System.Collections.Generic; -using Unity.VisualScripting; using UnityEngine; -using UnityEngine.Audio; using UnityEngine.UI; public class SettingsPanel : MonoBehaviour diff --git a/Assets/Scripts/Code/UI/UIGoals/AwardsScriptableObject.cs b/Assets/Scripts/Code/UI/UIGoals/AwardsScriptableObject.cs index ad2d84f..ed3e1df 100644 --- a/Assets/Scripts/Code/UI/UIGoals/AwardsScriptableObject.cs +++ b/Assets/Scripts/Code/UI/UIGoals/AwardsScriptableObject.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; [CreateAssetMenu(fileName = "AwardsScriptableObject", menuName = "ScriptableObjects/AwardsScriptableObject")] diff --git a/Assets/Scripts/Code/UI/UIGoals/PlayGoal.cs b/Assets/Scripts/Code/UI/UIGoals/PlayGoal.cs index e6d643e..21571e2 100644 --- a/Assets/Scripts/Code/UI/UIGoals/PlayGoal.cs +++ b/Assets/Scripts/Code/UI/UIGoals/PlayGoal.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; diff --git a/Assets/Scripts/Code/UI/UIGoals/UIGoal.cs b/Assets/Scripts/Code/UI/UIGoals/UIGoal.cs index 36fcdd2..0299312 100644 --- a/Assets/Scripts/Code/UI/UIGoals/UIGoal.cs +++ b/Assets/Scripts/Code/UI/UIGoals/UIGoal.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; diff --git a/Assets/Scripts/Code/UI/UIGoals/UIGoals.cs b/Assets/Scripts/Code/UI/UIGoals/UIGoals.cs index 4a3573c..c00a48a 100644 --- a/Assets/Scripts/Code/UI/UIGoals/UIGoals.cs +++ b/Assets/Scripts/Code/UI/UIGoals/UIGoals.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Linq; using UnityEngine; -using UnityEngine.UI; public class UIGoals : MonoBehaviour { diff --git a/Assets/Scripts/Code/UI/UIGoals/UIMoves.cs b/Assets/Scripts/Code/UI/UIGoals/UIMoves.cs index d0d6b93..aea2bdd 100644 --- a/Assets/Scripts/Code/UI/UIGoals/UIMoves.cs +++ b/Assets/Scripts/Code/UI/UIGoals/UIMoves.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using TMPro; using UnityEngine; diff --git a/Assets/Scripts/Code/UI/UILose.cs b/Assets/Scripts/Code/UI/UILose.cs index 8b1cae2..21438b6 100644 --- a/Assets/Scripts/Code/UI/UILose.cs +++ b/Assets/Scripts/Code/UI/UILose.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; public class UILose : MonoBehaviour diff --git a/Assets/Scripts/Code/UI/UIMenuWin.cs b/Assets/Scripts/Code/UI/UIMenuWin.cs index 174ad15..3227b60 100644 --- a/Assets/Scripts/Code/UI/UIMenuWin.cs +++ b/Assets/Scripts/Code/UI/UIMenuWin.cs @@ -1,4 +1,3 @@ -using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; diff --git a/Assets/Scripts/Code/UI/UISettings.cs b/Assets/Scripts/Code/UI/UISettings.cs index ed0b381..3b7799b 100644 --- a/Assets/Scripts/Code/UI/UISettings.cs +++ b/Assets/Scripts/Code/UI/UISettings.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; public class UISettings : MonoBehaviour diff --git a/Assets/Scripts/Code/UI/UITools/ToolBank.cs b/Assets/Scripts/Code/UI/UITools/ToolBank.cs index 8f62a3e..d879b22 100644 --- a/Assets/Scripts/Code/UI/UITools/ToolBank.cs +++ b/Assets/Scripts/Code/UI/UITools/ToolBank.cs @@ -1,5 +1,4 @@ using Assets.Scripts.Code.Bank; -using UnityEditor; using UnityEngine; using UnityEngine.UI; diff --git a/Assets/Scripts/Code/UI/UITools/UITool.cs b/Assets/Scripts/Code/UI/UITools/UITool.cs index 09507cc..ea73f5e 100644 --- a/Assets/Scripts/Code/UI/UITools/UITool.cs +++ b/Assets/Scripts/Code/UI/UITools/UITool.cs @@ -1,6 +1,3 @@ -using System.Collections; -using System.Collections.Generic; -using TMPro; using UnityEngine; public class UITool : MonoBehaviour diff --git a/Assets/Scripts/Code/VisualNovelElements/Characters/Character.cs b/Assets/Scripts/Code/VisualNovelElements/Characters/Character.cs index 6c764a3..406e5f5 100644 --- a/Assets/Scripts/Code/VisualNovelElements/Characters/Character.cs +++ b/Assets/Scripts/Code/VisualNovelElements/Characters/Character.cs @@ -1,5 +1,3 @@ -using DG.Tweening; -using System.Collections; using System.Collections.Generic; using UnityEngine; diff --git a/Assets/Scripts/Code/VisualNovelElements/FileService.cs b/Assets/Scripts/Code/VisualNovelElements/FileService.cs index 5ac2523..79ff3eb 100644 --- a/Assets/Scripts/Code/VisualNovelElements/FileService.cs +++ b/Assets/Scripts/Code/VisualNovelElements/FileService.cs @@ -1,9 +1,5 @@ -using System; -using System.Collections; using System.Collections.Generic; -using System.IO; using UnityEngine; -using UnityEngine.UIElements; using System.Text; public class FileService : MonoBehaviour diff --git a/Assets/Scripts/Code/VisualNovelElements/NovelController.cs b/Assets/Scripts/Code/VisualNovelElements/NovelController.cs index 5b274dc..7862275 100644 --- a/Assets/Scripts/Code/VisualNovelElements/NovelController.cs +++ b/Assets/Scripts/Code/VisualNovelElements/NovelController.cs @@ -1,7 +1,4 @@ using Assets.Scripts.Code.Bank; -using Assets.Scripts.Code.UI; -using System.Collections; -using System.Collections.Generic; using UnityEngine; public class NovelController : MonoBehaviour, IInit diff --git a/Assets/Scripts/ConfigFactory.cs b/Assets/Scripts/ConfigFactory.cs index eeefc37..e98611e 100644 --- a/Assets/Scripts/ConfigFactory.cs +++ b/Assets/Scripts/ConfigFactory.cs @@ -1,5 +1,4 @@ using UnityEngine; -using UnityEngine.Events; public abstract class ConfigFactory : ScriptableObject { diff --git a/Assets/Scripts/Firebase/FireBaseInit.cs b/Assets/Scripts/Firebase/FireBaseInit.cs index 78b7dde..2d033fe 100644 --- a/Assets/Scripts/Firebase/FireBaseInit.cs +++ b/Assets/Scripts/Firebase/FireBaseInit.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; diff --git a/Assets/Scripts/HorizontalLineRemover.cs b/Assets/Scripts/HorizontalLineRemover.cs index f63634c..ca4ef20 100644 --- a/Assets/Scripts/HorizontalLineRemover.cs +++ b/Assets/Scripts/HorizontalLineRemover.cs @@ -3,11 +3,11 @@ public class HorizontalLineRemover : BoostLineRemoverBase { - private BoostExicuter _boostExicuter; + private IBoostExicuter _boostExicuter; private BoostTypes _boostType = BoostTypes.Horizontal; - public HorizontalLineRemover(Board board, ItemNextStateMover itemRemover, BoostExicuter boostExicuter) : base(board, itemRemover) + public HorizontalLineRemover(Board board, IBoostExicuter boostExicuter) : base(board) { Directons = new GridPosition[] { GridPosition.Left,GridPosition.Right}; _boostExicuter = boostExicuter; @@ -17,7 +17,7 @@ protected override async UniTask ExequteAnotherBoost(IBoostItem boost) { if (boost.GetBoostType() == _boostType) { - boost.SetBoostType(BoostTypes.Vertical); + boost.Init(BoostTypes.Vertical); } await _boostExicuter.Execute(boost); } diff --git a/Assets/Scripts/ISequenceDetector.cs b/Assets/Scripts/ISequenceDetector.cs index a33c5eb..a0e7e36 100644 --- a/Assets/Scripts/ISequenceDetector.cs +++ b/Assets/Scripts/ISequenceDetector.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using System.Runtime.CompilerServices; +using System.Runtime.CompilerServices; public interface ISequenceDetector { diff --git a/Assets/Scripts/Installers/BoardSolverInstaller.cs b/Assets/Scripts/Installers/BoardSolverInstaller.cs index 5ce551c..36843ca 100644 --- a/Assets/Scripts/Installers/BoardSolverInstaller.cs +++ b/Assets/Scripts/Installers/BoardSolverInstaller.cs @@ -3,22 +3,21 @@ public class BoardSolverInstaller : MonoInstaller { - private BoardSolver _boardSolver; public override void InstallBindings() { var board = Container.Resolve(); var itemSwaper = Container.Resolve(); var boardFiller = Container.Resolve(); var sequenceDetectors = Container.Resolve>(); - var boostExecuter = Container.Resolve(); + var boostExecuter = Container.Resolve(); SolveSlotsDetecor solveSlotsDetecor = new(sequenceDetectors, board); Workers workers = new(solveSlotsDetecor, board, boardFiller); - _boardSolver = new(workers, itemSwaper, boostExecuter); + BoardSolver boardSolver = new(workers, itemSwaper, boostExecuter); - Container.Bind().FromInstance(_boardSolver).AsSingle().NonLazy(); + Container.Bind().FromInstance(boardSolver).AsSingle().NonLazy(); } } diff --git a/Assets/Scripts/Installers/BoostExicuterInstaller.cs b/Assets/Scripts/Installers/BoostExicuterInstaller.cs index b7923bb..d0ab1da 100644 --- a/Assets/Scripts/Installers/BoostExicuterInstaller.cs +++ b/Assets/Scripts/Installers/BoostExicuterInstaller.cs @@ -4,15 +4,13 @@ public class BoostExicuterInstaller : MonoInstaller { [SerializeField] private GoalCellOnBoardFinder _cellOnBoardFinder; - private BoostExicuter _boostExicuter; public override void InstallBindings() { var board = Container.Resolve(); - var _itemStateMover = new ItemNextStateMover(); - _boostExicuter = new(_itemStateMover, board, _cellOnBoardFinder); + BoostExicuter boostExicuter = new(board, _cellOnBoardFinder); - Container.Bind().FromInstance(_boostExicuter).AsSingle().NonLazy(); + Container.Bind().FromInstance(boostExicuter).AsSingle().NonLazy(); } } diff --git a/Assets/Scripts/Item/Factoryes/BoostItemFactory.cs b/Assets/Scripts/Item/Factoryes/BoostItemFactory.cs index 4ca48a7..70e488b 100644 --- a/Assets/Scripts/Item/Factoryes/BoostItemFactory.cs +++ b/Assets/Scripts/Item/Factoryes/BoostItemFactory.cs @@ -25,7 +25,7 @@ public override IBoostItem Get(BoostTypes type) private void InitBoost(IBoostItem boostItem, BoostTypes type) { boostItem.SetId((int)type); - boostItem.SetBoostType(type); + boostItem.Init(type); boostItem.SetState(ItemStateTypes.Boost); boostItem.SetStateObserver(_itemStateObserver); } diff --git a/Assets/Scripts/Item/IBoostItem.cs b/Assets/Scripts/Item/IBoostItem.cs index 2c27221..638d8d0 100644 --- a/Assets/Scripts/Item/IBoostItem.cs +++ b/Assets/Scripts/Item/IBoostItem.cs @@ -1,9 +1,6 @@ -using UnityEngine; - -public interface IBoostItem : IItem +public interface IBoostItem : IItem { BoostTypes GetBoostType(); - void SetBoostType(BoostTypes value); - - + void Init(BoostTypes value); + bool IsUsed { get; set; } } diff --git a/Assets/Scripts/Item/IItem.cs b/Assets/Scripts/Item/IItem.cs index 8b8041b..dd38a69 100644 --- a/Assets/Scripts/Item/IItem.cs +++ b/Assets/Scripts/Item/IItem.cs @@ -1,5 +1,4 @@ using Cysharp.Threading.Tasks; -using UnityEngine.Events; public interface IItem { diff --git a/Assets/Scripts/Item/Item.cs b/Assets/Scripts/Item/Item.cs index b780887..f50d590 100644 --- a/Assets/Scripts/Item/Item.cs +++ b/Assets/Scripts/Item/Item.cs @@ -1,7 +1,6 @@ using Cysharp.Threading.Tasks; using UnityEngine; using UnityEngine.Events; -using Zenject; public class Item : MonoBehaviour, IItem, IPooleable { diff --git a/Assets/Scripts/Item/ItemView.cs b/Assets/Scripts/Item/ItemView.cs index 4ca0e92..4ffc2c1 100644 --- a/Assets/Scripts/Item/ItemView.cs +++ b/Assets/Scripts/Item/ItemView.cs @@ -24,15 +24,15 @@ private void Awake() public async UniTask MoveOn(float moveDuration,params Vector3[] path) { - for (int pintIndex = 0; pintIndex < path.Length; pintIndex++) + for (int pointIndex = 0; pointIndex < path.Length; pointIndex++) { - bool isLastPoint = pintIndex == path.Length - 1; + bool isLastPoint = pointIndex == path.Length - 1; if (isLastPoint) { - await NormalMove(path[pintIndex], moveDuration * 2).SetEase(Ease.OutBack).AsyncWaitForCompletion(); + await NormalMove(path[pointIndex], moveDuration * 2).SetEase(Ease.OutBack).AsyncWaitForCompletion(); break; } - await NormalMove(path[pintIndex], moveDuration).SetEase(Ease.Linear).AsyncWaitForCompletion(); + await NormalMove(path[pointIndex], moveDuration).SetEase(Ease.Linear).AsyncWaitForCompletion(); } } diff --git a/Assets/Scripts/Item/LevelGoalsReachCounter.cs b/Assets/Scripts/Item/LevelGoalsReachCounter.cs index e9c80a1..a48e748 100644 --- a/Assets/Scripts/Item/LevelGoalsReachCounter.cs +++ b/Assets/Scripts/Item/LevelGoalsReachCounter.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using UnityEngine.Events; -using System; using UnityEngine; using System.Linq; diff --git a/Assets/Scripts/Item/States/BoostState.cs b/Assets/Scripts/Item/States/BoostState.cs index 98e53d3..e91c8d2 100644 --- a/Assets/Scripts/Item/States/BoostState.cs +++ b/Assets/Scripts/Item/States/BoostState.cs @@ -1,6 +1,5 @@ using Cysharp.Threading.Tasks; using System; -using UnityEngine.Events; public class BoostState : ItemState { diff --git a/Assets/Scripts/Item/States/ItemNextStateMover.cs b/Assets/Scripts/Item/States/ItemNextStateMover.cs index bbfba88..31d9258 100644 --- a/Assets/Scripts/Item/States/ItemNextStateMover.cs +++ b/Assets/Scripts/Item/States/ItemNextStateMover.cs @@ -1,7 +1,6 @@ using Cysharp.Threading.Tasks; using UnityEngine; using System.Linq; -using System.Threading.Tasks; public class ItemNextStateMover { diff --git a/Assets/Scripts/Item/States/ItemStateTypesSpriteBinds.cs b/Assets/Scripts/Item/States/ItemStateTypesSpriteBinds.cs index 7b180e3..1c7f982 100644 --- a/Assets/Scripts/Item/States/ItemStateTypesSpriteBinds.cs +++ b/Assets/Scripts/Item/States/ItemStateTypesSpriteBinds.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; -using System.Linq; -using UnityEngine; +using UnityEngine; [CreateAssetMenu(fileName = nameof(ItemStateTypesSpriteBinds), menuName = "ScriptableObjects/" + nameof(ItemStateTypesSpriteBinds), order = 1)] public class ItemStateTypesSpriteBinds : ScriptableObject diff --git a/Assets/Scripts/Matcher.cs b/Assets/Scripts/Matcher.cs index eaa2f87..23c4e7e 100644 --- a/Assets/Scripts/Matcher.cs +++ b/Assets/Scripts/Matcher.cs @@ -1,5 +1,4 @@ using Cysharp.Threading.Tasks; -using System.Threading.Tasks; using UnityEngine; using UnityEngine.Events; using Zenject; diff --git a/Assets/Scripts/PositionMemory.cs b/Assets/Scripts/PositionMemory.cs index cdd071b..cac308f 100644 --- a/Assets/Scripts/PositionMemory.cs +++ b/Assets/Scripts/PositionMemory.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Linq; public class PositionMemory { diff --git a/Assets/Scripts/Sequence/SequenceThreeDetector.cs b/Assets/Scripts/Sequence/SequenceThreeDetector.cs index 58b91a3..a10c86a 100644 --- a/Assets/Scripts/Sequence/SequenceThreeDetector.cs +++ b/Assets/Scripts/Sequence/SequenceThreeDetector.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; - -public class SequenceThreeDetector : BaseSequenceDetector +public class SequenceThreeDetector : BaseSequenceDetector { diff --git a/Assets/Scripts/Tools/ITool.cs b/Assets/Scripts/Tools/ITool.cs index 0820a97..d4c1f17 100644 --- a/Assets/Scripts/Tools/ITool.cs +++ b/Assets/Scripts/Tools/ITool.cs @@ -1,5 +1,4 @@ using Cysharp.Threading.Tasks; -using System.Threading; using UnityEngine.Events; public interface ITool diff --git a/Assets/Scripts/Tools/ToolsExecutor.cs b/Assets/Scripts/Tools/ToolsExecutor.cs index ef6b340..e5ca142 100644 --- a/Assets/Scripts/Tools/ToolsExecutor.cs +++ b/Assets/Scripts/Tools/ToolsExecutor.cs @@ -14,7 +14,6 @@ public class ToolsExecutor : MonoBehaviour private SwaperTool _swaperTool; private XLinerTool xLinerTool; - private ITool _selectedTool; [Inject] @@ -22,7 +21,7 @@ public class ToolsExecutor : MonoBehaviour [Inject] private ItemSwaper _itemSwaper; [Inject] - private BoostExicuter _boostExicuter; + private IBoostExicuter _boostExicuter; private bool _isInputActive = true; diff --git a/Assets/Scripts/Tools/XLinerTool.cs b/Assets/Scripts/Tools/XLinerTool.cs index f23d00d..a1c943c 100644 --- a/Assets/Scripts/Tools/XLinerTool.cs +++ b/Assets/Scripts/Tools/XLinerTool.cs @@ -1,15 +1,11 @@ -using System; -using System.Threading; -using Cysharp.Threading.Tasks; -using UnityEngine; -using UnityEngine.Events; +using Cysharp.Threading.Tasks; public class XLinerTool : SingleCellTool { - private BoostExicuter _boostExicuter; + private IBoostExicuter _boostExicuter; - public XLinerTool(CellSelector cellSelector, BoardSolver boardSolver, BoostExicuter boostExicuter) : base(cellSelector, boardSolver) + public XLinerTool(CellSelector cellSelector, BoardSolver boardSolver, IBoostExicuter boostExicuter) : base(cellSelector, boardSolver) { _boostExicuter = boostExicuter; } diff --git a/Assets/Scripts/VerticalLineRemover.cs b/Assets/Scripts/VerticalLineRemover.cs index 11d58d3..7dd84a5 100644 --- a/Assets/Scripts/VerticalLineRemover.cs +++ b/Assets/Scripts/VerticalLineRemover.cs @@ -2,11 +2,11 @@ public class VerticalLineRemover : BoostLineRemoverBase { - private BoostExicuter _boostExicuter; + private IBoostExicuter _boostExicuter; private BoostTypes _boostType = BoostTypes.Vertical; - public VerticalLineRemover(Board board, ItemNextStateMover itemRemover, BoostExicuter boostExicuter) : base(board, itemRemover) + public VerticalLineRemover(Board board, IBoostExicuter boostExicuter) : base(board) { Directons = new GridPosition[] { GridPosition.Up, GridPosition.Down }; _boostExicuter = boostExicuter; @@ -16,7 +16,7 @@ protected override async UniTask ExequteAnotherBoost(IBoostItem boost) { if (boost.GetBoostType() == _boostType) { - boost.SetBoostType(BoostTypes.Horizontal); + boost.Init(BoostTypes.Horizontal); } await _boostExicuter.Execute(boost); }