Assign GemSprite to BombPrefab

This commit is contained in:
2025-12-17 00:28:22 +08:00
parent de2de35b1b
commit 9f9bf9a3f5
6 changed files with 136 additions and 26 deletions

View File

@@ -1,4 +1,5 @@
using Enums;
using Structs;
using UnityEngine;
namespace Services {
@@ -14,10 +15,10 @@ namespace Services {
private GemType colorType;
public GemType MatchColor => this.type == GemType.Bomb ? this.colorType : this.type;
public Gem(GemType type, Vector2Int position, int scoreValue, GemType? colorType = null) {
public Gem(GemType type, Vector2Int position, GemTypeValues gemValue, GemType? colorType = null) {
this.type = type;
this.position = position;
this.scoreValue = scoreValue;
this.scoreValue = gemValue.scoreValue;
this.colorType = colorType ?? type;
}