示例#1
0
    private void DeductStep()
    {
        isDeductStep = true;
        bool isSkillDeduct = FuncDeduct.Deduct();

        fightUI.UpdateCollect(true, true);
        fightUI.UpdateCollect(false, true, isSkillDeduct);

        List <List <CellAnimInfo> > cellAnims = CellModel.Instance.anims;

        rootAction = new OrderAction();
        for (int i = 0; i < cellAnims.Count; i++)
        {
            ParallelAction paralle = new ParallelAction();

            List <CellAnimInfo> cellAnimss = cellAnims[i];
            int j;
            for (j = 0; j < cellAnimss.Count; j++)
            {
                CellAnimInfo  animInfo = cellAnimss[j];
                FightCellItem item     = GetItemByRunId(animInfo.runId);
                if (item != null)
                {
                    OrderAction order = new OrderAction();

                    FightEffectItem effectItem = effectLayer.FindEffectItemByPos(animInfo.toInfo.posX, animInfo.toInfo.posY);

                    order.AddNode(new ShowBombActor(item, effectItem));
                    order.AddNode(new WaitActor(300));
                    order.AddNode(new ShowBombActor(item, effectItem, false));
                    order.AddNode(new ChangeCellActor(item, animInfo.toInfo));
                    if (animInfo.toInfo.isBlank)
                    {
                        order.AddNode(new ShowEffectActor(item.transform, "effect_cell_clear", fightModule.transform));
                        order.AddNode(new DestroyActor(item.gameObject));
                    }

                    paralle.AddNode(order);
                }
            }
            rootAction.AddNode(new PlaySoundActor("wreck"));
            rootAction.AddNode(paralle);
        }

        ExecuteAction(FightStadus.deduct);
    }