示例#1
0
    void OnMatchFinish(List<Matching> matchingList)
    {
        record.AddMatches(matchingList);

        PuzzleEffectControl effectBoard = new PuzzleEffectControl(this, matchingList, chainComboCount);
        effectBoard.ShowAll();

        if (blockQueue != null)
        {
            foreach (var match in matchingList)
            {
                Command command = match.CreateCommand(match.blocks.Length, matchGeneration);
                if (command != null)
                {
                    blockQueue.TryAdd(command);
                }

                // LifePerMatch
                if (match.blockEntity.ApplyLifeRatePerMatch)
                {
                    string actionPattern = "Action( Self; RecoverHP; [LifeRatePerMatch] * [MaximumLife])";
                    blockQueue.TryAdd(new Command(string.Empty, actionPattern, 0, 0, 0, false, null));
                }
            }
        }

        if (owner != null)
        {
            var vfxs = ExportCommandVFXs(matchingList.Select(x => x.blockEntity));
            foreach (var entity in vfxs)
            {
                if (entity > 0)
                {
                    owner.AttachEffect(entity);
                }
            }
        }
    }
示例#2
0
    void OnMatchFinish(List<Matching> matchingList)
    {
        record.AddMatches(matchingList);

        PuzzleEffectControl effectBoard = new PuzzleEffectControl(this, matchingList, chainComboCount);
        effectBoard.ShowAll();

        if (blockQueue != null)
        {
            foreach (var match in matchingList)
            {
                var command = match.CreateCommand(matchGeneration);
                if (command != null)
                {
                    blockQueue.TryAdd(command);
                }
            }
        }
    }