-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
1,730 additions
and
204 deletions.
There are no files selected for viewing
1,413 changes: 1,386 additions & 27 deletions
1,413
Assets/Plugins/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using Cysharp.Threading.Tasks; | ||
using UnityEngine.Events; | ||
|
||
public class BoostSwapSolver : ISwapSolwer | ||
{ | ||
private BoostExicuter _boostExicuter; | ||
private UnityAction _swapCallback; | ||
|
||
public BoostSwapSolver(BoostExicuter boostExicuter, UnityAction swapCallback) | ||
{ | ||
_boostExicuter = boostExicuter; | ||
_swapCallback = swapCallback; | ||
} | ||
|
||
public async UniTask SolveSwap(ICell selectedCell, ICell cell) | ||
{ | ||
_swapCallback?.Invoke(); | ||
|
||
if (selectedCell.Item is IBoostItem selectedBoost) | ||
{ | ||
selectedBoost.SwapWith = cell.Item; | ||
await _boostExicuter.Execute(selectedBoost);//ToDo: await нужно ожидать паралельно у обоих бустов? | ||
} | ||
|
||
if (cell.Item is IBoostItem boost) | ||
{ | ||
boost.SwapWith = selectedCell.Item; | ||
await _boostExicuter.Execute(boost);//ToDo: await нужно ожидать паралельно у обоих бустов? | ||
} | ||
} | ||
|
||
|
||
} | ||
|
||
|
||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Cysharp.Threading.Tasks; | ||
using UnityEngine.Events; | ||
|
||
public interface ISwapSolwer | ||
{ | ||
UniTask SolveSwap(ICell selectedCell, ICell cell); | ||
} | ||
|
||
|
||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Cysharp.Threading.Tasks; | ||
using UnityEngine; | ||
|
||
public class RegularBoardFiller | ||
{ | ||
private ConfigFactory<int, IItem> _itemFactory; | ||
private ItemInCellInjector _itemInCellInjector; | ||
|
||
public RegularBoardFiller(ConfigFactory<int, IItem> itemFactory) | ||
{ | ||
_itemFactory = itemFactory; | ||
_itemInCellInjector = new(); | ||
} | ||
|
||
public async UniTask TryFillCellRegularItem(ICell cell, params Vector3[] path) | ||
{ | ||
bool isNeedToFill = cell.HasItem == false && cell.CanContainsItem; | ||
if (isNeedToFill) | ||
{ | ||
await FillCellRegularItem(cell, path); | ||
} | ||
} | ||
private async UniTask FillCellRegularItem(ICell cell, params Vector3[] path) | ||
{ | ||
var item = _itemFactory.Get(cell.GridPosition.ColumnIndex); | ||
await _itemInCellInjector.InjectItemInCell(item, cell, path); | ||
} | ||
} | ||
|
||
|
||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.