消珠遊戲的原形.
- 珠盤大小
- 珠的種類
- 掉落速度
- 掉落加速度
- 加速時間
- 掉落方式 (亂數時間差掉落容許)
邪惡的控制器
- 限制及指定每頁消除數 (Combo Target)
- 消除數誤差容許數 (Random Config > Target)
容許自訂消珠條件
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
namespace ComboBallGame
{
public class Destroyer2Pair : ComboBallDestroyer
{
public int AffectTypeRangeBegin = 0;
public int AffectTypeRangeEnd = 4;
private void OnEnable()
{
DecideRule = (_matrix) => {
for(int x=0; x<_matrix.Count; x++)
{
for(int y=0; y<_matrix[x].Count; y++)
{
// kill if the right one is same as mine.
FakeBall _ballA = GetBall(x,y,_matrix);
FakeBall _ballB = GetBall(x+1,y,_matrix);
if( _ballA.BallType >= AffectTypeRangeBegin &&
_ballA.BallType <= AffectTypeRangeEnd )
{
if( _ballA != null && _ballB != null &&
_ballA.BallType == _ballB.BallType )
{ // Kill them if same type
GetBall(x,y,_matrix).FlagDestroyMark=true;
GetBall(x+1,y,_matrix).FlagDestroyMark=true;
}
// kill if the bottom one is same as mine.
_ballA = GetBall(x,y,_matrix);
_ballB = GetBall(x,y+1,_matrix);
if( _ballA != null && _ballB != null &&
_ballA.BallType == _ballB.BallType )
{ // Kill them if same type
GetBall(x,y,_matrix).FlagDestroyMark=true;
GetBall(x,y+1,_matrix).FlagDestroyMark=true;
}
}
}
}
return _matrix;
};
}
}
}

