feat(SS) 添加AI移动逻辑

This commit is contained in:
chicrobot committed 2026-02-06 20:57:38 +08:00
1 parent 48960d2a0c
commit 5a595d72e1
2 files changed
+65 -5

No files matched your search

+2 -2
View File
@@ -53,7 +53,7 @@ export default class WorldLand extends WorldTime {
this.input.on('pointerdown', () => {
// 获取点击位置的坐标
const { x, y } = this.input.activePointer
this.createTile(x, y)
this.createSmallGrass(x, y)
})
// 监听键盘按键事件,按键后执行场景过渡动画
@@ -102,7 +102,7 @@ export default class WorldLand extends WorldTime {
console.log(`草地铺满屏幕完成,使用了 ${tilesX}x${tilesY} 个瓦片`)
}
createTile(x, y) {
createSmallGrass(x, y) {
if (this.smallGrassCount >= 5) {
this.scene.start(this.nextScene);
}