|
@@ -2,7 +2,7 @@
|
|
|
* @Author: mojunshou 1637302775@qq.com
|
|
* @Author: mojunshou 1637302775@qq.com
|
|
|
* @Date: 2025-03-20 15:01:09
|
|
* @Date: 2025-03-20 15:01:09
|
|
|
* @LastEditors: mojunshou 1637302775@qq.com
|
|
* @LastEditors: mojunshou 1637302775@qq.com
|
|
|
- * @LastEditTime: 2025-04-25 18:11:18
|
|
|
|
|
|
|
+ * @LastEditTime: 2025-04-25 18:39:45
|
|
|
* @Description: 消除游戏主场景
|
|
* @Description: 消除游戏主场景
|
|
|
*/
|
|
*/
|
|
|
import { _decorator, Button, Color, EventTouch, instantiate, JsonAsset, v3, Label, Node, Prefab, randomRangeInt, Sprite, tween, UITransform, Vec2, Vec3, Widget } from "cc";
|
|
import { _decorator, Button, Color, EventTouch, instantiate, JsonAsset, v3, Label, Node, Prefab, randomRangeInt, Sprite, tween, UITransform, Vec2, Vec3, Widget } from "cc";
|
|
@@ -191,7 +191,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
//不可用的颜色
|
|
//不可用的颜色
|
|
|
unavailableColor = new Color(255, 0, 0, 100)
|
|
unavailableColor = new Color(255, 0, 0, 100)
|
|
|
//旋转容错
|
|
//旋转容错
|
|
|
- rotateFaultTolerant = 10;
|
|
|
|
|
|
|
+ rotateFaultTolerant = 50;
|
|
|
|
|
|
|
|
isAutoMode: boolean = false;
|
|
isAutoMode: boolean = false;
|
|
|
autoModeInterval: number = 1 // 自动模式的间隔时间(秒)
|
|
autoModeInterval: number = 1 // 自动模式的间隔时间(秒)
|
|
@@ -286,11 +286,9 @@ export class EliminateViewComp extends CCComp {
|
|
|
this.gameState = GameState.PAUSED;
|
|
this.gameState = GameState.PAUSED;
|
|
|
break;
|
|
break;
|
|
|
case "playing":
|
|
case "playing":
|
|
|
- this.scheduleOnce(() => {
|
|
|
|
|
- if (this.gameState == GameState.PAUSED || this.autoState && this.gameState == GameState.GAME_OVER) {
|
|
|
|
|
- this.gameState = GameState.PLAYING;
|
|
|
|
|
- }
|
|
|
|
|
- }, 0.5)
|
|
|
|
|
|
|
+ if (this.gameState == GameState.PAUSED || this.autoState && this.gameState == GameState.GAME_OVER || this.autoState && this.gameState == GameState.GAME_PASS) {
|
|
|
|
|
+ this.gameState = GameState.PLAYING;
|
|
|
|
|
+ }
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -495,8 +493,8 @@ export class EliminateViewComp extends CCComp {
|
|
|
const midX = transform.width / 2;
|
|
const midX = transform.width / 2;
|
|
|
node.setPosition(0, 0);
|
|
node.setPosition(0, 0);
|
|
|
brickData.brickNode = node
|
|
brickData.brickNode = node
|
|
|
- brickData.brickNode.scale_x = 0.6;
|
|
|
|
|
- brickData.brickNode.scale_y = 0.6;
|
|
|
|
|
|
|
+ brickData.brickNode.scale_x = 0.8;
|
|
|
|
|
+ brickData.brickNode.scale_y = 0.8;
|
|
|
brickData.brickInitPos = node.getWorldPosition()
|
|
brickData.brickInitPos = node.getWorldPosition()
|
|
|
this.bricksList.push(brickData)
|
|
this.bricksList.push(brickData)
|
|
|
this.brickAddEvent(brickData)
|
|
this.brickAddEvent(brickData)
|