整理资源
This commit is contained in:
@@ -8,8 +8,8 @@ const { regClass, property } = Laya
|
||||
export class Home extends Laya.Script {
|
||||
declare owner : Laya.Box;
|
||||
|
||||
@property(Laya.Button)
|
||||
public btn_start: Laya.Button;
|
||||
@property(Laya.Box)
|
||||
public btn_start: Laya.Box;
|
||||
|
||||
@property(Laya.Button)
|
||||
public btn_clean: Laya.Button;
|
||||
|
||||
@@ -44,6 +44,8 @@ export class Stage extends Laya.Script {
|
||||
private btn_note_checked: Laya.Box
|
||||
@property(Laya.Box)
|
||||
public btn_hint: Laya.Box;
|
||||
private btn_hint_normal: Laya.Box
|
||||
private btn_hint_ad: Laya.Box
|
||||
|
||||
private selectedBlock: Block;
|
||||
private data: DOStage;
|
||||
@@ -159,11 +161,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.4)
|
||||
sames[i].setBlockColor(config.BLOCK_COLOR.BLUE, 0.6)
|
||||
}
|
||||
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.4)
|
||||
sames[i].setTipsBgColor(true, block.getData().get_show(), config.BLOCK_COLOR.BLUE, 0.6)
|
||||
}
|
||||
//正确
|
||||
if (block.getData().get_checked()) {
|
||||
@@ -175,7 +177,7 @@ export class Stage extends Laya.Script {
|
||||
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.4, true, config.BLOCK_COLOR.GREY, 1)
|
||||
relateds[i].setBlockColor(config.BLOCK_COLOR.RED, 0.6, true, config.BLOCK_COLOR.GREY, 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -184,7 +186,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.4)
|
||||
relateds[i].setBlockColor(config.BLOCK_COLOR.RED, 0.6)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user