!= to !==
This commit is contained in:
@@ -222,7 +222,7 @@ export class Stage extends Laya.Script {
|
||||
for (let i = 0; i < blocks.length; i++) {
|
||||
score += blocks[i].get_score()
|
||||
}
|
||||
if (this.score_current != score) { // 分数发生变化
|
||||
if (this.score_current !== score) { // 分数发生变化
|
||||
this.score_current = score
|
||||
this.score_step = Math.ceil((this.score_current - this.score_last) / 24)
|
||||
if (this.score_current > this.score_last)
|
||||
@@ -238,7 +238,7 @@ export class Stage extends Laya.Script {
|
||||
if (this.score_animation_wait_frame < 0)
|
||||
this.score_animation_wait_frame = 0
|
||||
if (this.score_animation_wait_frame <= 0) {
|
||||
if (this.score_current != this.score_last) {
|
||||
if (this.score_current !== this.score_last) {
|
||||
if (this.score_current > this.score_last) {
|
||||
this.score_last += this.score_step
|
||||
if (this.score_last > this.score_current)
|
||||
@@ -286,7 +286,7 @@ export class Stage extends Laya.Script {
|
||||
if (animated) { // 填数状态播放闪动效果
|
||||
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()) {
|
||||
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)
|
||||
}
|
||||
@@ -295,7 +295,7 @@ export class Stage extends Laya.Script {
|
||||
} else {
|
||||
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()) {
|
||||
if (relateds[i].getData().get_index() !== block.getData().get_index()) {
|
||||
relateds[i].setBlockColor(config.BLOCK_COLOR.RED, 0.4)
|
||||
}
|
||||
}
|
||||
@@ -355,7 +355,7 @@ export class Stage extends Laya.Script {
|
||||
}
|
||||
|
||||
onClickNote(evt: Laya.Event): void {
|
||||
if (evt != null) {
|
||||
if (evt !== null) {
|
||||
this.data.set_note_open(!this.data.get_note_open())
|
||||
}
|
||||
this.btn_note_normal.visible = this.data.get_note_open() === false
|
||||
@@ -428,7 +428,7 @@ export class Stage extends Laya.Script {
|
||||
} else {
|
||||
for (var i = 0; i < relateds.length; i++) {
|
||||
const obj = relateds[i]
|
||||
if (obj.getData().get_show() === showNumber && obj.getData().get_index() != this.selectedBlock.getData().get_index()) {
|
||||
if (obj.getData().get_show() === showNumber && obj.getData().get_index() !== this.selectedBlock.getData().get_index()) {
|
||||
obj.setFadeAnimation()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user