mirror of
http://junepve.top:3000/chicrobot/CINC.git
synced 2026-10-29 23:31:29 +08:00
fix(boot) 修复只能向下滚动的问题
This commit is contained in:
1 parent
6ca6595127
commit
6dbce8bdd5
5 files changed
+45
-20
No files matched your search
@@ -0,0 +1,28 @@
|
||||
export default class MenuScene extends Phaser.Scene {
|
||||
constructor() {
|
||||
super('MenuScene')
|
||||
}
|
||||
|
||||
create() {
|
||||
// 设置背景颜色
|
||||
this.cameras.main.setBackgroundColor('#333333')
|
||||
// 获取主相机对象
|
||||
const cam = this.cameras.main;
|
||||
|
||||
// 添加菜单文本
|
||||
this.add.text(
|
||||
cam.centerX/5, // 文本在x轴上的位置,相机中心的1/5
|
||||
cam.centerY/5, // 文本在y轴上的位置,相机中心的1/5
|
||||
'CINC',
|
||||
{ fontSize: '64px', color: '#ffffff' }
|
||||
).setOrigin(0.5, 0.5);
|
||||
|
||||
this.add.rectangle(
|
||||
cam.centerX/5, // 矩形在x轴上的位置,相机中心的1/5
|
||||
cam.centerY, // 矩形在y轴上的位置,相机中心的1/5
|
||||
10, // 矩形的宽度
|
||||
10, // 矩形的高度
|
||||
0xffffff // 矩形的颜色,这里是白色
|
||||
).setOrigin(0.5, 0.5);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user