Cleanup
This commit is contained in:
@@ -4,7 +4,6 @@ using System.Collections.Generic;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Enums;
|
||||
using Models.Interfaces;
|
||||
using Structs;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Services.Interfaces
|
||||
|
||||
@@ -2,7 +2,6 @@ using System.Collections.Generic;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using Enums;
|
||||
using Structs;
|
||||
|
||||
namespace Services.Interfaces {
|
||||
public interface IMatchService {
|
||||
|
||||
@@ -1,24 +1,18 @@
|
||||
using Presenter;
|
||||
using Services.Interfaces;
|
||||
using UnityEngine;
|
||||
using VContainer.Unity;
|
||||
using Views;
|
||||
|
||||
namespace Services
|
||||
{
|
||||
public class LevelEntryPoint : IStartable
|
||||
{
|
||||
private readonly IObjectPool<GemView> gemViewPool;
|
||||
private readonly IGameBoardService gameBoardService;
|
||||
private readonly IInputService inputService;
|
||||
private readonly AudioPresenter audioPresenter;
|
||||
|
||||
public LevelEntryPoint(IObjectPool<GemView> gemViewPool, IGameBoardService gameBoardService, IInputService inputService, AudioPresenter audioPresenter)
|
||||
public LevelEntryPoint(IGameBoardService gameBoardService, IInputService inputService)
|
||||
{
|
||||
this.gemViewPool = gemViewPool;
|
||||
this.gameBoardService = gameBoardService;
|
||||
this.inputService = inputService;
|
||||
this.audioPresenter = audioPresenter;
|
||||
}
|
||||
|
||||
public void Start()
|
||||
|
||||
@@ -4,7 +4,6 @@ using Cysharp.Threading.Tasks;
|
||||
using Enums;
|
||||
using Models.Interfaces;
|
||||
using Services.Interfaces;
|
||||
using Structs;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Services {
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
using System;
|
||||
using Services.Interfaces;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Services {
|
||||
public class ScoreService : IScoreService {
|
||||
private int score = 0;
|
||||
private int score;
|
||||
public int Score => this.score;
|
||||
public event Action<int> OnScoreChanged;
|
||||
public void AddScore(int value) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using Enums;
|
||||
using Models.Interfaces;
|
||||
using Services;
|
||||
using Structs;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Enums;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace Utils {
|
||||
public static class RandomUtils {
|
||||
private static readonly GemType[] spawnableGems = BuildSpawnableGems();
|
||||
private static readonly GemType[] SPAWNABLE_GEMS = BuildSpawnableGems();
|
||||
|
||||
private static GemType[] BuildSpawnableGems() {
|
||||
Array values = Enum.GetValues(typeof(GemType));
|
||||
@@ -31,7 +30,7 @@ namespace Utils {
|
||||
}
|
||||
|
||||
public static GemType RandomGemType() {
|
||||
return spawnableGems[Random.Range(0, spawnableGems.Length)];
|
||||
return SPAWNABLE_GEMS[Random.Range(0, SPAWNABLE_GEMS.Length)];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,11 +19,11 @@ namespace Views {
|
||||
|
||||
private CancellationTokenSource spawnScaleCts;
|
||||
|
||||
public void Bind(Gem gem, GemTypeValues gemvalue, bool isBomb = false) {
|
||||
public void Bind(Gem gem, GemTypeValues gemValue, bool isBomb = false) {
|
||||
this.gem = gem;
|
||||
this.gameObject.SetActive(true);
|
||||
|
||||
SetupGem(isBomb, gemvalue.gemSprite);
|
||||
SetupGem(isBomb, gemValue.gemSprite);
|
||||
PlaySpawnScale();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user