コード例 #1
0
        public void Kill(IBonusEffect bEffect)
        {
            //if (BonusEffects.Count != 0) return;
            var finded = BonusEffects.FindAll((b) => {
                var bb = b.BonusType == bEffect.BonusType;
                return(bb);
            });

            if (finded.Count == 0)
            {
                BonusEffects.Add(bEffect);

                if (bEffect.BonusType == BonusEffect.LINE_H || bEffect.BonusType == BonusEffect.LINE_V)
                {
                    ((LineBonusEffect)bEffect).BeforeLastStep += (effect) =>
                    {
                        switch (effect.Direction)
                        {
                        case LineBonusEffectDirection.LR:
                            KillRightLine();
                            break;

                        case LineBonusEffectDirection.RL:
                            KillLeftLine();
                            break;

                        case LineBonusEffectDirection.TB:
                            KillBottomLine();
                            break;

                        case LineBonusEffectDirection.BT:
                            KillTopLine();
                            break;
                        }
                    };
                }

                Kill();
            }
        }
コード例 #2
0
 protected void SetBonusEffect(IBonusEffect effect)
 {
     BonusEffects.Add(effect);
 }