File tree Expand file tree Collapse file tree 3 files changed +29
-21
lines changed
Core/util/coreInitialFunction Expand file tree Collapse file tree 3 files changed +29
-21
lines changed Original file line number Diff line number Diff line change @@ -34,19 +34,28 @@ export const infoFetcher = (url: string) => {
34
34
gameConfig . forEach ( ( e ) => {
35
35
const { command, args } = e ;
36
36
if ( args . length > 0 ) {
37
- let res : any = args [ 0 ] . trim ( ) ;
38
- if ( / ^ ( t r u e | f a l s e ) $ / g. test ( args [ 0 ] ) ) {
39
- res = ! ! res ;
40
- } else if ( / ^ [ 0 - 9 ] + \. ? [ 0 - 9 ] + $ / g. test ( args [ 0 ] ) ) {
41
- res = Number ( res ) ;
42
- }
37
+ if ( args . length > 1 ) {
38
+ dispatch (
39
+ setGlobalVar ( {
40
+ key : command ,
41
+ value : args . join ( '|' ) ,
42
+ } ) ,
43
+ ) ;
44
+ } else {
45
+ let res : any = args [ 0 ] . trim ( ) ;
46
+ if ( / ^ ( t r u e | f a l s e ) $ / g. test ( args [ 0 ] ) ) {
47
+ res = ! ! res ;
48
+ } else if ( / ^ [ 0 - 9 ] + \. ? [ 0 - 9 ] + $ / g. test ( args [ 0 ] ) ) {
49
+ res = Number ( res ) ;
50
+ }
43
51
44
- dispatch (
45
- setGlobalVar ( {
46
- key : command ,
47
- value : res ,
48
- } ) ,
49
- ) ;
52
+ dispatch (
53
+ setGlobalVar ( {
54
+ key : command ,
55
+ value : res ,
56
+ } ) ,
57
+ ) ;
58
+ }
50
59
}
51
60
} ) ;
52
61
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ const Logo: FC = () => {
34
34
currentLogoIndex . set ( 0 ) ;
35
35
currentTimeOutId . set ( setTimeout ( nextImg , animationDuration ) ) ;
36
36
}
37
- } , [ isEnterGame , logoImage ] ) ;
37
+ } , [ isEnterGame ] ) ;
38
38
39
39
const currentLogoUrl = currentLogoIndex . value === - 1 ? '' : logoImage [ currentLogoIndex . value ] ;
40
40
return (
Original file line number Diff line number Diff line change @@ -25,14 +25,13 @@ const useConfigData = () => {
25
25
setEbg ( titleUrl ) ;
26
26
break ;
27
27
}
28
- /**
29
- * TODO:Game_Logo 是个数组,并且改变后会造成进入游戏界面重新渲染,以后再考虑如何处理
30
- */
31
- // case 'Game_Logo': {
32
- // const logoUrlList = [assetSetter(val, fileType.background)];
33
- // webgalStore.dispatch(setLogoImage(logoUrlList));
34
- // break;
35
- // }
28
+
29
+ case 'Game_Logo' : {
30
+ const logos = val . split ( '|' ) ;
31
+ const logoUrlList = logos . map ( ( val ) => assetSetter ( val , fileType . background ) ) ;
32
+ webgalStore . dispatch ( setLogoImage ( logoUrlList ) ) ;
33
+ break ;
34
+ }
36
35
37
36
case 'Title_bgm' : {
38
37
const bgmUrl = assetSetter ( val , fileType . bgm ) ;
You can’t perform that action at this time.
0 commit comments