mirror of
http://junepve.top:3000/chicrobot/CINC.git
synced 2026-10-30 07:41:29 +08:00
feat(SS) 添加故事场景其他内容
This commit is contained in:
1 parent
6b07a4a096
commit
062d950583
7 files changed
+44
-6
No files matched your search
Whitespace-only changes.
@@ -2,15 +2,17 @@
|
||||
* BreatheLife 场景类
|
||||
*
|
||||
* 交互场景,允许用户通过点击屏幕创建角色
|
||||
* 当创建的角色超过3个时,点击已存在的角色会为其设置纹理
|
||||
* 当设置纹理的角色超过3个时,自动切换到 MenuScene 场景
|
||||
* 第二次点击设置纹理
|
||||
* 第三次点击赋予动画
|
||||
* 第四次点击移动角色
|
||||
* 当移动角色超过3个后再次点击,切换到下一个场景
|
||||
*/
|
||||
import WorldLand from './WorldLand.js'
|
||||
export default class BreatheLife extends WorldLand {
|
||||
constructor(sceneKey = 'BreatheLife') {
|
||||
// 场景相关
|
||||
super(sceneKey)
|
||||
this.nextScene = 'MenuScene'
|
||||
this.nextScene = 'Control'
|
||||
|
||||
// 层级相关
|
||||
this.SpriteDepth = 10 // 角色层级
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* 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 = [] // 维护小草集合
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Reference in new issue
Block a user