mirror of
http://junepve.top:3000/chicrobot/CINC.git
synced 2026-10-30 00:41:29 +08:00
1 parent
149b90344e
commit
8ff2779557
2 files changed
+14
-4
No files matched your search
@@ -8,6 +8,16 @@ export default {
|
|||||||
height: window.innerHeight,
|
height: window.innerHeight,
|
||||||
// 游戏背景颜色:使用十六进制颜色值设置为天蓝色
|
// 游戏背景颜色:使用十六进制颜色值设置为天蓝色
|
||||||
backgroundColor: '#87ceeb',
|
backgroundColor: '#87ceeb',
|
||||||
|
// 输入系统配置
|
||||||
|
input: {
|
||||||
|
// 启用多点触控支持
|
||||||
|
multiTouch: true,
|
||||||
|
// 触摸事件捕获配置
|
||||||
|
touch: {
|
||||||
|
// 捕获触摸事件,防止事件冒泡
|
||||||
|
capture: true
|
||||||
|
}
|
||||||
|
},
|
||||||
// 物理引擎配置
|
// 物理引擎配置
|
||||||
physics: {
|
physics: {
|
||||||
// 默认使用的物理引擎:'arcade'是Phaser内置的轻量级物理引擎
|
// 默认使用的物理引擎:'arcade'是Phaser内置的轻量级物理引擎
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ export default class AttackSkillTestScene extends Phaser.Scene {
|
|||||||
isActive: false,
|
isActive: false,
|
||||||
base: null,
|
base: null,
|
||||||
knob: null,
|
knob: null,
|
||||||
pointer: null,
|
activePointer: null,
|
||||||
centerX: 0,
|
centerX: 0,
|
||||||
centerY: 0,
|
centerY: 0,
|
||||||
radius: 50,
|
radius: 50,
|
||||||
@@ -393,7 +393,7 @@ export default class AttackSkillTestScene extends Phaser.Scene {
|
|||||||
// 鼠标移动事件
|
// 鼠标移动事件
|
||||||
this.input.on('pointermove', (ptr) => {
|
this.input.on('pointermove', (ptr) => {
|
||||||
// 只有在技能轮盘激活时才处理
|
// 只有在技能轮盘激活时才处理
|
||||||
if (!this.skillWheel.isActive || this.skillWheel.pointer !== ptr) {
|
if (!this.skillWheel.isActive || this.skillWheel.activePointer !== ptr) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -419,7 +419,7 @@ export default class AttackSkillTestScene extends Phaser.Scene {
|
|||||||
// 鼠标释放事件
|
// 鼠标释放事件
|
||||||
this.input.on('pointerup', (ptr) => {
|
this.input.on('pointerup', (ptr) => {
|
||||||
// 只有在技能轮盘激活时才处理
|
// 只有在技能轮盘激活时才处理
|
||||||
if (!this.skillWheel.isActive || this.skillWheel.pointer !== ptr) {
|
if (!this.skillWheel.isActive || this.skillWheel.activePointer !== ptr) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -451,7 +451,7 @@ export default class AttackSkillTestScene extends Phaser.Scene {
|
|||||||
startSkillCast(pointer) {
|
startSkillCast(pointer) {
|
||||||
// 设置技能轮盘状态
|
// 设置技能轮盘状态
|
||||||
this.skillWheel.isActive = true;
|
this.skillWheel.isActive = true;
|
||||||
this.skillWheel.pointer = pointer;
|
this.skillWheel.activePointer = pointer;
|
||||||
|
|
||||||
// 显示旋钮和轮盘基础
|
// 显示旋钮和轮盘基础
|
||||||
this.skillWheel.knob.setVisible(true);
|
this.skillWheel.knob.setVisible(true);
|
||||||
|
|||||||
Reference in new issue
Block a user