Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
minner-tool
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郑明
minner-tool
Commits
1ba3b551
Commit
1ba3b551
authored
Sep 12, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复url写死http的问题
parent
86c15430
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
228 additions
and
144 deletions
+228
-144
TakeRewards.ts
assets/scripts/dialog/TakeRewards.ts
+2
-2
Game.ts
assets/scripts/game/Game.ts
+54
-43
start.ts
assets/scripts/scenes/start.ts
+4
-1
bundle.js
debug/bundle.js
+161
-92
bundle.js.map
debug/bundle.js.map
+1
-1
index.html
index.html
+2
-1
manifest.json
manifest.json
+1
-1
doJoin.json
mock/aaw/digGold/doJoin.json
+1
-1
getInfo.json
mock/aaw/digGold/getInfo.json
+1
-1
ts-time-record.json
ts-time-record.json
+1
-1
No files found.
assets/scripts/dialog/TakeRewards.ts
View file @
1ba3b551
...
...
@@ -21,6 +21,6 @@ export default class TakeRewards extends DialogContent {
}
onclick
()
{
location
.
href
=
this
.
link
location
.
href
=
window
[
'recordDetailNewUrl'
]
+
this
.
link
.
substr
(
this
.
link
.
lastIndexOf
(
'?'
));
}
}
assets/scripts/game/Game.ts
View file @
1ba3b551
...
...
@@ -100,12 +100,12 @@ export default class Game extends InteractComponent {
}
async
loadTextures
(){
async
loadTextures
()
{
let
urls
=
{
treasure
:
this
.
configInterface
.
indexBoxImg
,
stone
:
this
.
configInterface
.
indexBlockImg
};
for
(
let
key
in
urls
)
{
for
(
let
key
in
urls
)
{
this
.
blockTextures
[
key
]
=
await
engine
.
assetsManager
.
loadTexture
(
urls
[
key
]);
}
}
...
...
@@ -279,7 +279,7 @@ export default class Game extends InteractComponent {
let
scale
;
if
(
height
<=
0
)
{
scale
=
entity
.
min
;
}
else
{
}
else
{
scale
=
ts
.
scale
.
x
*
Math
.
min
(
height
/
thisHeight
+
0.1
,
0.8
);
}
...
...
@@ -459,7 +459,7 @@ export default class Game extends InteractComponent {
this
.
Button
.
getComponent
(
BuriedPoint
).
setConfig
(
point
.
dpm
,
point
.
dcm
,
true
)
}
onClickActionBtn
()
{
async
onClickActionBtn
()
{
this
.
clickable
=
false
this
.
stopRotate
()
const
renderer
=
this
.
toolTr
...
...
@@ -500,29 +500,32 @@ export default class Game extends InteractComponent {
const
index
=
this
.
elementList
.
findIndex
(
item
=>
item
===
result
)
this
.
elementList
.
splice
(
index
,
1
)
createTween
(
this
,
renderer
,
true
)
await
createTween
(
this
,
renderer
,
true
)
.
to
({
anchor
:
{
y
:
this
.
toolTrAnchorY
-
per
}
},
distance
/
commonSpeedBefore
*
1000
)
.
call
(()
=>
{
if
(
this
.
playable
&&
!
this
.
clickable
)
return
if
(
result
.
type
===
ElementType
.
Treasure
)
{
this
.
hitTreasure
({
entity
:
result
.
entity
})
}
else
{
this
.
hitStone
({
entity
:
result
.
entity
,
toolDistance
:
distance
})
}
})
.
to
({
}).
getPromise
();
createTween
(
this
,
renderer
).
to
({
anchor
:
{
y
:
this
.
toolTrAnchorY
}
},
distance
/
(
result
.
type
===
ElementType
.
Treasure
?
commonSpeedAfter
:
slowSpeed
)
*
1000
,
ease
.
cubicInOut
)
.
call
(()
=>
{
.
call
(()
=>
{
this
.
startRotate
()
this
.
clickable
=
true
})
.
getPromise
();
if
(
this
.
playable
&&
!
this
.
clickable
)
return
if
(
result
.
type
===
ElementType
.
Treasure
)
{
await
this
.
hitTreasure
({
entity
:
result
.
entity
})
}
else
{
await
this
.
hitStone
({
entity
:
result
.
entity
,
toolDistance
:
distance
})
}
this
.
clickable
=
true
}
}
...
...
@@ -612,11 +615,14 @@ export default class Game extends InteractComponent {
const
local
=
locationTs
.
globalPositionToLocal
(
global
)
ts
.
position
.
setXY
(
local
.
x
,
local
.
y
)
const
distance
=
generatePointDistanceToZeroZero
(
local
.
x
,
local
.
y
)
const
speed
=
4
00
const
speed
=
5
00
const
time
=
Number
((
distance
/
speed
).
toFixed
(
4
))
*
1000
const
{
x
:
sx
,
y
:
sy
}
=
ts
.
scale
console
.
log
(
'hitTreasure'
);
return
Promise
.
all
([
createTween
(
this
,
ts
,
true
,
{
initFields
:
[
'x'
,
'alpha'
]})
.
to
({
position
:
{
x
:
local
.
x
>
50
?
50
:
local
.
x
<
-
50
?
-
50
:
0
},
...
...
@@ -631,14 +637,18 @@ export default class Game extends InteractComponent {
alpha
:
0
},
200
)
.
call
(()
=>
{
console
.
log
(
'hitTreasure2'
,
this
.
playable
,
!
this
.
clickable
);
if
(
this
.
playable
&&
!
this
.
clickable
)
return
this
.
setDetail
(
++
this
.
score
,
true
,
this
.
submit
.
bind
(
this
));
})
.
getPromise
(),
createTween
(
this
,
ts
,
false
,
{
initFields
:
[
'y'
]})
.
to
({
position
:
{
y
:
this
.
oy
-
50
}
},
time
-
200
,
ease
.
cubicInOut
)
.
call
(()
=>
ts
.
scale
.
setXY
(
ox
,
oy
))
.
getPromise
(),
])
}
private
hitStone
({
entity
,
toolDistance
})
{
...
...
@@ -648,7 +658,7 @@ export default class Game extends InteractComponent {
const
currLocation
=
curTs
.
position
const
distance
=
generatePointsDistance
(
currLocation
.
x
,
currLocation
.
y
,
needLocaltion
[
0
],
needLocaltion
[
1
])
createTween
(
this
,
curTs
,
true
,
{
initFields
:
[
'x'
,
'y'
]})
return
createTween
(
this
,
curTs
,
true
,
{
initFields
:
[
'x'
,
'y'
]})
.
to
({
position
:
{
x
:
needLocaltion
[
0
],
...
...
@@ -662,6 +672,7 @@ export default class Game extends InteractComponent {
y
:
needLocaltion
[
1
],
}
},
330
)
.
getPromise
();
}
private
hitEdge
(
funcFromX
,
funcFromY
)
{
...
...
assets/scripts/scenes/start.ts
View file @
1ba3b551
...
...
@@ -340,7 +340,10 @@ export default class start extends ScillaComponent {
return
}
if
(
this
.
configError
)
return
if
(
this
.
isRunning
())
location
.
href
=
this
.
homeInfo
.
prizeUrl
if
(
this
.
isRunning
())
{
const
prizeUrl
=
this
.
homeInfo
.
prizeUrl
;
location
.
href
=
window
[
'recordUrl'
]
+
prizeUrl
.
substr
(
prizeUrl
.
lastIndexOf
(
'?'
));
}
}
showRule
()
{
...
...
debug/bundle.js
View file @
1ba3b551
This diff is collapsed.
Click to expand it.
debug/bundle.js.map
View file @
1ba3b551
This diff is collapsed.
Click to expand it.
index.html
View file @
1ba3b551
...
...
@@ -288,7 +288,8 @@
<script>
var
CFG
=
{
opId
:
83189
}
};
var
DEBUG
=
true
;
</script>
<script
src=
"//yun.duiba.com.cn/db_games/activity/public_js/fetch-jsonp.min.js"
></script>
<script
src=
"debug/bundle.js"
></script>
...
...
manifest.json
View file @
1ba3b551
...
...
@@ -15,7 +15,7 @@
},
"entryScene"
:
"main"
},
"webServiceUrl"
:
"http://localhost:300
0
"
"webServiceUrl"
:
"http://localhost:300
1
"
},
"dataCenterConfig"
:
{
"dataCenterRoot"
:
[
...
...
mock/aaw/digGold/doJoin.json
View file @
1ba3b551
{
"success"
:
fals
e
,
"success"
:
tru
e
,
"code"
:
"0901011"
,
"desc"
:
"OK"
,
"timestamp"
:
1543501361476
,
...
...
mock/aaw/digGold/getInfo.json
View file @
1ba3b551
...
...
@@ -10,7 +10,7 @@
"title"
:
"title"
,
"rule"
:
"<p><strong>测试测试</strong></p><p><em style=
\"
color: rgb(51, 51, 51);
\"
>测试测试</em></p><p><strong style=
\"
color: rgb(51, 51, 51);
\"
><em>测试测试</em></strong></p>"
,
"box"
:
10
,
"continueTime"
:
5
,
"continueTime"
:
60
,
"earnCreditsUrl"
:
"//yun.duiba.com.cn/h5/activity/goldminer/images/indexRuleImg.png"
,
"prizeList"
:[
{
...
...
ts-time-record.json
View file @
1ba3b551
{
"/Users/firefly/duiba/demoList/minner-tool/assets/scripts/HelloScilla.ts"
:
1561020169937.0137
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/HelloScilla.ts"
:
1561020169937.0137
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/DialogContent.ts"
:
1561600311985.8552
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/Network.ts"
:
1561600425062.0408
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/Normal.ts"
:
1562566682279.367
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/Tips.ts"
:
1563342864232.2847
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/TakeRewards.ts"
:
1561604368987.917
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/scenes/start.ts"
:
1563414744765.5208
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/game/Game.ts"
:
1563517294108.954
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/utils/index.ts"
:
1561701943800.5488
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/game/ToolAnimate.ts"
:
1562061481431.2627
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/game/Treasure.ts"
:
1562036486693.9104
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/game/Stone.ts"
:
1562036497419.1833
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/Currency.ts"
:
1562576376017.156
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/TakeFailed.ts"
:
1562567908671.4026
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/utils/BuriedPoint.ts"
:
1562566605218.4138
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/Currency.ts"
:
1563759198037.1516
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/Normal.ts"
:
1563759198037.4158
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/TakeFailed.ts"
:
1563942766706.9917
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/TakeRewards.ts"
:
156
3759198037.9731
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/Tips.ts"
:
1563759198038.2512
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/game/Game.ts"
:
1563967580359.461
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/game/Stone.ts"
:
1563877946954.2656
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/game/ToolAnimate.ts"
:
1563759198039.2769
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/game/Treasure.ts"
:
1563877946951.9539
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/scenes/start.ts"
:
1563958374197.611
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/utils/BuriedPoint.ts"
:
1563759198040.374
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/utils/index.ts"
:
1563759198040.6511
}
{
"/Users/firefly/duiba/demoList/minner-tool/assets/scripts/HelloScilla.ts"
:
1561020169937.0137
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/HelloScilla.ts"
:
1561020169937.0137
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/DialogContent.ts"
:
1561600311985.8552
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/Network.ts"
:
1561600425062.0408
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/Normal.ts"
:
1562566682279.367
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/Tips.ts"
:
1563342864232.2847
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/TakeRewards.ts"
:
1561604368987.917
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/scenes/start.ts"
:
1563414744765.5208
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/game/Game.ts"
:
1563517294108.954
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/utils/index.ts"
:
1561701943800.5488
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/game/ToolAnimate.ts"
:
1562061481431.2627
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/game/Treasure.ts"
:
1562036486693.9104
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/game/Stone.ts"
:
1562036497419.1833
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/Currency.ts"
:
1562576376017.156
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/dialog/TakeFailed.ts"
:
1562567908671.4026
,
"/Users/firefly/duiba/demoList/miner-tool/assets/scripts/utils/BuriedPoint.ts"
:
1562566605218.4138
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/Currency.ts"
:
1563759198037.1516
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/Normal.ts"
:
1563759198037.4158
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/TakeFailed.ts"
:
1563942766706.9917
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/TakeRewards.ts"
:
156
8278918207.8828
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/Tips.ts"
:
1563759198038.2512
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/game/Game.ts"
:
1566887047804.8462
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/game/Stone.ts"
:
1563877946954.2656
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/game/ToolAnimate.ts"
:
1563759198039.2769
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/game/Treasure.ts"
:
1563877946951.9539
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/scenes/start.ts"
:
1568277429304.0603
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/utils/BuriedPoint.ts"
:
1563759198040.374
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/utils/index.ts"
:
1563759198040.6511
}
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