1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-30 16:01:53 +08:00

feat(武器系统): 添加武器位置交换功能

- 在ArrayTool中添加swap方法用于数组元素交换
- 为武器卡片添加左右移动按钮
- 实现武器位置交换逻辑,包括UI更新和数组同步
This commit is contained in:
2025-09-21 21:58:57 +08:00
parent cc75192e2e
commit a12c201880
3 changed files with 38 additions and 4 deletions
+6 -1
View File
@@ -5,4 +5,9 @@ static func removeAll(array: Array, value) -> Array:
for item in array:
if item != value:
result.append(item)
return result
return result
static func swap(array: Array, a: int, b: int):
var temp = array[a]
array[a] = array[b]
array[b] = temp
return array