mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-06 03:54:30 +08:00
存储管理系统
This commit is contained in:
1 parent
bf828bcacf
commit
05ed15c0a6
7 files changed
+110
-18
No files matched your search
+3
-3
@@ -1,5 +1,3 @@
|
||||
import { debounce } from 'lodash-es';
|
||||
|
||||
export default function init() {
|
||||
return { useDrag, useWheel, useUp, isMobile };
|
||||
}
|
||||
@@ -31,7 +29,9 @@ checkMobile();
|
||||
|
||||
function checkMobile() {
|
||||
if (isMobile && !alerted) {
|
||||
alert('手机端建议使用自带的浏览器进行游玩,并在进入游戏后开启全屏游玩');
|
||||
alert(
|
||||
'手机端建议使用自带的浏览器进行游玩,并在进入游戏后开启游戏内的全屏设置游玩'
|
||||
);
|
||||
alerted = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,3 +263,10 @@ export function pColor(color: string) {
|
||||
arr[3] ??= 1;
|
||||
return `rgba(${arr.join(',')})` as Color;
|
||||
}
|
||||
|
||||
export function deleteWith<T>(arr: T[], ele: T): T[] {
|
||||
const index = arr.indexOf(ele);
|
||||
if (index === -1) return arr;
|
||||
arr.splice(index, 1);
|
||||
return arr;
|
||||
}
|
||||
Reference in new issue
Block a user