mirror of
http://junepve.top:3000/chicrobot/CINC.git
synced 2026-10-29 19:51: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
@@ -50,13 +50,22 @@ import CharacterClassTestScene from './scenes/testScenes/CharacterClassTestScene
|
||||
import WeaponTestScene from './scenes/testScenes/WeaponTestScene.js';
|
||||
|
||||
// 故事场景
|
||||
// 开天辟地
|
||||
// 开天辟地,创建场景
|
||||
import PrimordialDevide from './scenes/storeScenes/PrimordialDevide.js';
|
||||
// 日月山川
|
||||
// 日月山川,创建时间,地图、物品
|
||||
import WorldTime from './scenes/storeScenes/WorldTime.js';
|
||||
import WorldLand from './scenes/storeScenes/WorldLand.js';
|
||||
// 女娲造人
|
||||
// 女娲造人,创建角色
|
||||
import BreatheLife from './scenes/storeScenes/BreatheLife.js';
|
||||
// 伏羲画卦,创建角色控制与信息栏
|
||||
import Control from './scenes/storeScenes/Control.js';
|
||||
// import InfoBar from './scenes/storeScenes/InfoBar.js';
|
||||
// // 神农百草,创建耕种系统
|
||||
// import Farming from './scenes/storeScenes/Farming.js';
|
||||
// // 涿鹿之战,创建战斗系统
|
||||
// import Battle from './scenes/storeScenes/Battle.js';
|
||||
// // 大禹治水,创建地形系统
|
||||
// import Terrain from './scenes/storeScenes/Terrain.js';
|
||||
|
||||
// 创建游戏的最终配置对象
|
||||
const config = {
|
||||
@@ -69,6 +78,7 @@ const config = {
|
||||
WorldTime,
|
||||
WorldLand,
|
||||
BreatheLife,
|
||||
Control,
|
||||
|
||||
// 测试场景
|
||||
MenuScene,
|
||||
|
||||
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