完善冲突动画

This commit is contained in:
2025-05-27 15:30:14 +08:00
parent b6126cebad
commit 606c5a78fd
2 changed files with 20 additions and 19 deletions

View File

@@ -265,11 +265,11 @@ export class Stage extends Laya.Script {
else {
var sames = this.findSameNumberBlocks(block)//相同数字的格子
for (var i=0; i<sames.length; i++) {
sames[i].setBlockColor(config.BLOCK_COLOR.BLUE, 0.6)
sames[i].setBlockColor(config.BLOCK_COLOR.BLUE, 0.4)
}
var sames = this.findSameNoteBlocks(block)//相同数字的铅笔格子
for (var i=0; i<sames.length; i++) {
sames[i].setTipsBgColor(true, block.getData().get_show(), config.BLOCK_COLOR.BLUE, 0.6)
sames[i].setTipsBgColor(true, block.getData().get_show(), config.BLOCK_COLOR.BLUE, 0.4)
}
//正确
if (block.getData().get_checked()) {
@@ -280,8 +280,8 @@ export class Stage extends Laya.Script {
for (var i=0; i<relateds.length; i++) {//相关且数字相同
if (relateds[i].getData().get_show() == block.getData().get_show()) {//播放变红动效
if (relateds[i].getData().get_index() != block.getData().get_index()) {
relateds[i].setBlockColor(config.BLOCK_COLOR.WHITE)
relateds[i].setBlockColor(config.BLOCK_COLOR.RED, 0.6, true, config.BLOCK_COLOR.GREY, 1)
// relateds[i].setBlockColor(config.BLOCK_COLOR.WHITE)
relateds[i].setBlockColor(config.BLOCK_COLOR.RED, 0.4, true, config.BLOCK_COLOR.GREY, 1)
}
}
}
@@ -290,7 +290,7 @@ export class Stage extends Laya.Script {
for (var i=0; i<relateds.length; i++) {//相关且数字相同
if (relateds[i].getData().get_show() == block.getData().get_show()) {//直接变红
if (relateds[i].getData().get_index() != block.getData().get_index()) {
relateds[i].setBlockColor(config.BLOCK_COLOR.RED, 0.6)
relateds[i].setBlockColor(config.BLOCK_COLOR.RED, 0.4)
}
}
}