48 lines
954 B
Plaintext
48 lines
954 B
Plaintext
using PuzzleDefine;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class PuzzleGemMatch : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private List<PositionedGem> MatchedGems = new List<PositionedGem>();
|
|
public PuzzleDefine.AttributeFix Bonus;
|
|
public PuzzleGameMode.VoidDelegate OnAfterMatchedGemsChanged;
|
|
|
|
public PuzzleGameMode.TimingNames LastTimingName;
|
|
|
|
public IEnumerable<PositionedGem> Gems
|
|
{
|
|
get
|
|
{
|
|
return MatchedGems;
|
|
}
|
|
}
|
|
|
|
public void AddBonus(PuzzleDefine.AttributeFix? bonus)
|
|
{
|
|
if (bonus == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
Bonus += bonus.Value;
|
|
}
|
|
|
|
public void AddGems(IEnumerable<PositionedGem> gems)
|
|
{
|
|
MatchedGems.AddRange(gems);
|
|
}
|
|
|
|
public void AddGem(PositionedGem gem)
|
|
{
|
|
MatchedGems.Add(gem);
|
|
}
|
|
|
|
public void Clear()
|
|
{
|
|
MatchedGems.Clear();
|
|
}
|
|
}
|