Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
DuibaGameTemplate
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
钱根
DuibaGameTemplate
Commits
a8e20c38
Commit
a8e20c38
authored
May 27, 2022
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
5ec0fba6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
53 deletions
+7
-53
rollup.dev.mjs
rollup.dev.mjs
+2
-3
Main.ts
src/Main.ts
+5
-8
Tools.ts
src/Tools.ts
+0
-37
index.ts
src/index.ts
+0
-5
No files found.
rollup.dev.mjs
View file @
a8e20c38
...
@@ -30,8 +30,7 @@ const { version } = JSON.parse(fs.readFileSync("./package.json", "utf-8"));
...
@@ -30,8 +30,7 @@ const { version } = JSON.parse(fs.readFileSync("./package.json", "utf-8"));
watchResChange
();
watchResChange
();
const
options
=
{
const
options
=
{
// input: "src/Main.ts",
input
:
"src/Main.ts"
,
input
:
"src/index.ts"
,
cache
:
true
,
cache
:
true
,
output
:
[
output
:
[
{
{
...
@@ -85,7 +84,7 @@ rollup.watch(options);
...
@@ -85,7 +84,7 @@ rollup.watch(options);
*/
*/
function
watchResChange
()
{
function
watchResChange
()
{
const
skinUrl
=
"./resource/skin.json"
;
const
skinUrl
=
"./resource/skin.json"
;
fs
.
watchFile
(
skinUrl
,
{
persistent
:
true
,
interval
:
2000
},
(
curr
,
prev
)
=>
{
fs
.
watchFile
(
skinUrl
,
{
persistent
:
true
,
interval
:
2000
},
()
=>
{
const
skinDataAll
=
fs
.
readFileSync
(
skinUrl
)
const
skinDataAll
=
fs
.
readFileSync
(
skinUrl
)
const
endFile
=
`export const SkinJson =
${
skinDataAll
}
`
;
const
endFile
=
`export const SkinJson =
${
skinDataAll
}
`
;
fs
.
writeFileSync
(
"./src/SkinJson.ts"
,
endFile
);
fs
.
writeFileSync
(
"./src/SkinJson.ts"
,
endFile
);
...
...
src/Main.ts
View file @
a8e20c38
...
@@ -51,7 +51,6 @@ export class Main {
...
@@ -51,7 +51,6 @@ export class Main {
true
,
//视窗居中裁切
true
,
//视窗居中裁切
false
,
//不定高,定宽适配
false
,
//不定高,定宽适配
sysInfo
&&
sysInfo
.
pixelRatio
||
window
.
devicePixelRatio
||
1
,
//分辨率
sysInfo
&&
sysInfo
.
pixelRatio
||
window
.
devicePixelRatio
||
1
,
//分辨率
{
antialias
:
true
}
);
);
this
.
canvas
=
canvas
;
// 赋值下,为了下面的destroy的cancelAnimationFrame
this
.
canvas
=
canvas
;
// 赋值下,为了下面的destroy的cancelAnimationFrame
...
@@ -113,8 +112,6 @@ export class Main {
...
@@ -113,8 +112,6 @@ export class Main {
return
;
return
;
}
}
Tools
.
checkPermission
();
await
Promise
.
all
([
await
Promise
.
all
([
Texture
.
fromUrl
(
"https://yun.duiba.com.cn/aurora/assets/923bcdee2d54f39797fb1cc5a79ab84da1bbe972.jpg"
),
Texture
.
fromUrl
(
"https://yun.duiba.com.cn/aurora/assets/923bcdee2d54f39797fb1cc5a79ab84da1bbe972.jpg"
),
Texture
.
fromUrl
(
"https://yun.duiba.com.cn/aurora/assets/92856abbb6293e863708fa2c0ea3556cf9b2afaa.jpg"
),
Texture
.
fromUrl
(
"https://yun.duiba.com.cn/aurora/assets/92856abbb6293e863708fa2c0ea3556cf9b2afaa.jpg"
),
...
@@ -201,10 +198,10 @@ export class Main {
...
@@ -201,10 +198,10 @@ export class Main {
// 全局事件置空
// 全局事件置空
GDispatcher
.
removeAllEventListener
();
GDispatcher
.
removeAllEventListener
();
//
//
淘宝环境网络数据记录清
// 淘宝环境网络数据记录清
//
destroyTbNetData();
destroyTbNetData
();
//
//
//
网络数据记录清空
// 网络数据记录清空
//
destroyWebNetData();
destroyWebNetData
();
}
}
}
}
src/Tools.ts
View file @
a8e20c38
...
@@ -112,43 +112,6 @@ export class Tools {
...
@@ -112,43 +112,6 @@ export class Tools {
return
success
&&
data
.
isVip
;
return
success
&&
data
.
isVip
;
}
}
/**
* 询问权限用
*/
public
static
async
checkPermission
()
{
//@ts-ignore
var
tbMy
=
my
if
(
!
tbMy
)
return
;
if
(
FYGE
.
osType
==
"ios"
)
return
;
//@ts-ignore
const
{
cloud
}
=
getApp
();
//测试地址//到时云存储传一个小json,,改路径
var
url
=
"cloud://8105858AA48FED3F15CB94186ED0D5E7//feileJump.doHelp.json"
;
//获取临时地址
var
urls
=
await
cloud
.
file
.
getTempFileURL
({
fileId
:
[
url
]
})
url
=
urls
[
0
].
url
.
replace
(
'-internal'
,
''
);
tbMy
.
downloadFile
({
url
:
url
,
success
(
res
)
{
var
i
=
res
.
apFilePath
;
tbMy
.
getFileSystemManager
().
readFile
({
filePath
:
i
,
// encoding: "utf8",
success
:
function
(
r
)
{
},
fail
:
function
(
res
)
{
}
})
},
fail
(
res
)
{
},
});
}
/************ 其他 ************/
/************ 其他 ************/
/**
/**
* 修改皮肤上的文本对齐方式,原先默认是左的,多汗行的时候计算有误,待查
* 修改皮肤上的文本对齐方式,原先默认是左的,多汗行的时候计算有误,待查
...
...
src/index.ts
deleted
100644 → 0
View file @
5ec0fba6
console
.
log
(
11111
);
console
.
log
(
new
Date
(
__buildDate__
));
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