mirror of
http://junepve.top:3000/chicrobot/CINC.git
synced 2026-10-30 00:21:29 +08:00
26 lines
620 B
JavaScript
26 lines
620 B
JavaScript
/**
|
|
* Control 场景类
|
|
*
|
|
* 允许用户控制角色
|
|
*/
|
|
import BreatheLife from './BreatheLife.js'
|
|
export default class Control extends BreatheLife {
|
|
constructor(sceneKey = 'Control') {
|
|
// 场景相关
|
|
super(sceneKey)
|
|
this.nextScene = 'InfoBar'
|
|
}
|
|
preload() {
|
|
super.preload()
|
|
}
|
|
create() {
|
|
super.create()
|
|
|
|
// 覆盖场景切换条件
|
|
this.initSceneTransition()
|
|
}
|
|
initSceneTransition() {
|
|
// 初始化角色计数器,用于跟踪创建的角色数量
|
|
this.smallGrassObjects = [] // 维护小草集合
|
|
}
|
|
} |