This commit is contained in:
2025-12-15 03:44:53 +08:00
parent 25a5950e8d
commit 2a3bcf7423
12 changed files with 326 additions and 107 deletions

View File

@@ -5,19 +5,22 @@ namespace Services {
public class Gem {
private GemType type;
private Vector2Int position;
public GemType Type => this.type;
public Vector2Int Position => this.position;
private int scoreValue;
public int ScoreValue => this.scoreValue;
public bool isMatch = false;
public Gem(GemType type, Vector2Int position, int scoreValue) {
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) {
this.type = type;
this.position = position;
this.scoreValue = scoreValue;
this.colorType = colorType ?? type;
}
public void SetPosition(Vector2Int position) {