Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
JsxForFYGETemplate
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
spc
JsxForFYGETemplate
Commits
4980dee1
Commit
4980dee1
authored
Dec 05, 2022
by
Master Q
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
适配淘宝环境处理
parent
09f8472b
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
670 additions
and
21 deletions
+670
-21
mergeJs.js
scripts/mergeJs.js
+1
-0
ResJson.ts
src/ResJson.ts
+663
-16
GameScene.tsx
src/scenes/GameScene/GameScene.tsx
+4
-4
TbNet.ts
src/tools/TbNet.ts
+2
-1
No files found.
scripts/mergeJs.js
View file @
4980dee1
...
...
@@ -12,5 +12,6 @@ fs.writeFileSync(endPath + "output.js",
// 'import * as FYGE from "fyge";\n' +//以后改成这个
// 'import * as SvgaParser from "svga-parser";\n' +
'/* eslint-disable */
\
n'
+
'const FYGE = require("./fyge.min.js");
\
n'
+
fs
.
readFileSync
(
"./output.js"
));
console
.
log
(
"js生成"
)
src/ResJson.ts
View file @
4980dee1
This diff is collapsed.
Click to expand it.
src/scenes/GameScene/GameScene.tsx
View file @
4980dee1
...
...
@@ -169,18 +169,18 @@ export class GameScene extends Dream.RenderContainer {
* 绑定事件
*/
initEvents
()
{
if
(
GameConfig
.
debugger
)
{
if
(
GameConfig
.
debugger
&&
document
)
{
document
.
body
.
addEventListener
(
'keydown'
,
(
e
)
=>
{
if
(
e
.
code
!=
"Space"
)
return
;
this
.
onActionDown
();
})
}
this
.
sceneCont
.
addEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
this
.
onActionDown
,
this
)
this
.
sceneCont
?
.
addEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
this
.
onActionDown
,
this
)
}
removeEvents
()
{
this
.
sceneCont
.
removeAllEventListener
()
this
.
sceneCont
?
.
removeAllEventListener
()
}
/**
...
...
@@ -201,7 +201,7 @@ export class GameScene extends Dream.RenderContainer {
console
.
log
(
'最远距离了'
)
})
if
(
GameConfig
.
debugger
)
{
if
(
GameConfig
.
debugger
&&
document
)
{
document
.
body
.
addEventListener
(
'keyup'
,
async
()
=>
{
this
.
onActionUp
()
},
{
once
:
true
})
...
...
src/tools/TbNet.ts
View file @
4980dee1
...
...
@@ -63,7 +63,8 @@ export function sendTbNet(
//网络超时
// let waitObj;
//@ts-ignore 本地开发,直接取数据
if
(
location
.
port
==
'8081'
)
{
console
.
log
(
'send tbNet ==========='
)
if
(
location
&&
location
.
port
==
'8081'
)
{
const
netInfo
=
netName
.
split
(
"."
);
const
url
=
`../../mock/miniTb/
${
netInfo
[
0
]}
/
${
netInfo
[
1
]}
.json`
;
fetchAsync
(
url
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment