Ejemplo n.º 1
0
 /// <summary>
 /// 提示されたオブジェクトリストにルールを適用する
 /// </summary>
 /// <param name="objects"></param>
 public void ApplyRule(GameObject[] objects)
 {
     foreach (var matched in _cond.Matching(objects))
     {
         _effect.Update(matched);
     }
 }
Ejemplo n.º 2
0
        IMatchedObjects[] IMatching.Matching(GameObject[] objects)
        {
            var time = UnityEngine.Time.time;

            // 指定時間が経過していない場合には空の配列を返す
            if (time - _lastSec < _timerSec)
            {
                return(new IMatchedObjects[0]);
            }
            _lastSec = time;
            return(_anotherMatching.Matching(objects).Select(matched => new MatchedObjects(this, matched.Objects)).ToArray());
        }