mirror of
http://junepve.top:3000/chicrobot/CINC.git
synced 2026-10-29 23:31:29 +08:00
feat(inventory) 添加背包物品移动、拾取到背包、丢弃背包物品功能
This commit is contained in:
1 parent
ae26209a24
commit
35e10a2abc
6 files changed
+408
-115
No files matched your search
@@ -180,8 +180,8 @@ export default class InventoryTestScene extends Phaser.Scene {
|
||||
// 键盘输入
|
||||
this.cursors = this.input.keyboard.createCursorKeys();
|
||||
|
||||
// 背包快捷键(I键)
|
||||
this.input.keyboard.on('keydown-I', () => {
|
||||
// 背包快捷键(B键)
|
||||
this.input.keyboard.on('keydown-B', () => {
|
||||
this.inventoryUI.toggle();
|
||||
});
|
||||
|
||||
@@ -381,7 +381,7 @@ export default class InventoryTestScene extends Phaser.Scene {
|
||||
key4Text.setScrollFactor(0, 0); // 固定在屏幕上,不随相机移动
|
||||
key4Text.setDepth(10); // 设置深度,确保显示在侧边栏上方
|
||||
|
||||
const keyIText = this.add.text(10, 220, '按I键:打开/关闭背包', {
|
||||
const keyIText = this.add.text(10, 220, '按B键:打开/关闭背包', {
|
||||
fontSize: '16px',
|
||||
fill: '#ffffff'
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user