Exemplo n.º 1
0
    private void ItemUpHander(GameObject go)
    {
        EventTriggerListener.Get(go).onUp -= ItemUpHander;
        lineLayer.ShowList();
        if (FightModule.crtFightStadus == FightStadus.line)
        {
            List <CellInfo> lineCells = CellModel.Instance.lineCells;
            if (lineCells.Count > 0)
            {
                cellLayer.lastTouchCell = lineCells[lineCells.Count - 1].Copy();
            }
            if (lineCells.Count < GameModel.Instance.GetGameConfig(1003))
            {
                List <CellInfo> lineCellsCopy = new List <CellInfo>();
                for (int i = 0; i < lineCells.Count; i++)
                {
                    lineCellsCopy.Add(lineCells[i]);
                }

                CellModel.Instance.UndoLineCells();

                for (int i = 0; i < lineCellsCopy.Count; i++)
                {
                    List <CellInfo> skillCells = SkillModel.Instance.QuitCell(lineCellsCopy[i]);
                    cellLayer.ChangeCells(skillCells);
                }
                cellLayer.ClearListStadus();
                FightModule.crtFightStadus = FightStadus.idle;
                SkillModel.Instance.SkillEnd();
                fightUI.UpdateCollect(true);
                monsterLayer.UpdateList();
                cellLayer.UpdateList();
                fightUI.skillListPart.gameObject.SetActive(false);
            }
            else
            {
                fightUI.UpdateCollect(false);
                FightModule.crtFightStadus = FightStadus.ready_play;
            }
            //fightUI.propsPart.gameObject.SetActive(true);
        }
    }