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
86c15430
Commit
86c15430
authored
Jul 25, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加快钩子速度
parent
262eaeb5
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
99 additions
and
1318 deletions
+99
-1318
TakeFailed.ts
assets/scripts/dialog/TakeFailed.ts
+6
-1
Game.ts
assets/scripts/game/Game.ts
+23
-8
start.ts
assets/scripts/scenes/start.ts
+2
-3
HelloScilla.js
build/scripts/HelloScilla.js
+0
-24
DialogContent.js
build/scripts/dialog/DialogContent.js
+0
-54
Network.js
build/scripts/dialog/Network.js
+0
-11
Normal.js
build/scripts/dialog/Normal.js
+0
-11
TakeRewards.js
build/scripts/dialog/TakeRewards.js
+0
-37
Tips.js
build/scripts/dialog/Tips.js
+0
-15
Game.js
build/scripts/game/Game.js
+0
-651
Stone.js
build/scripts/game/Stone.js
+0
-46
ToolAnimate.js
build/scripts/game/ToolAnimate.js
+0
-26
Treasure.js
build/scripts/game/Treasure.js
+0
-47
start.js
build/scripts/scenes/start.js
+0
-352
index.js
build/scripts/utils/index.js
+0
-14
bundle.js
debug/bundle.js
+65
-15
bundle.js.map
debug/bundle.js.map
+1
-1
manifest.json
manifest.json
+1
-1
ts-time-record.json
ts-time-record.json
+1
-1
No files found.
assets/scripts/dialog/TakeFailed.ts
View file @
86c15430
...
@@ -10,10 +10,15 @@ export default class TakeFailed extends DialogContent {
...
@@ -10,10 +10,15 @@ export default class TakeFailed extends DialogContent {
unit
:
dynamic
unit
:
dynamic
setup
(
data
)
{
super
.
setup
(
data
);
this
.
setLabel
();
}
setLabel
()
{
setLabel
()
{
this
.
label
.
getComponent
(
TextRenderer
).
text
=
`
${
this
.
unit
}
扣除失败
this
.
label
.
getComponent
(
TextRenderer
).
text
=
`
${
this
.
unit
}
扣除失败
别慌张,可以再试一次哟~`
别慌张,可以再试一次哟~`
this
.
controller
.
getComponent
(
Popup
).
showDialog
(
'TakeFailed'
)
// this.entity.getChildrenByName('Button')[0].getComponent(BuriedPoint).callSetConfig()
// this.entity.getChildrenByName('Button')[0].getComponent(BuriedPoint).callSetConfig()
}
}
...
...
assets/scripts/game/Game.ts
View file @
86c15430
...
@@ -25,7 +25,7 @@ enum ElementType {
...
@@ -25,7 +25,7 @@ enum ElementType {
Stone
=
'Stone'
Stone
=
'Stone'
}
}
const
commonSpeedBefore
=
2
80
const
commonSpeedBefore
=
5
80
const
commonSpeedAfter
=
420
const
commonSpeedAfter
=
420
const
slowSpeed
=
350
const
slowSpeed
=
350
...
@@ -77,6 +77,7 @@ export default class Game extends InteractComponent {
...
@@ -77,6 +77,7 @@ export default class Game extends InteractComponent {
private
playable
:
boolean
=
true
private
playable
:
boolean
=
true
private
clickable
:
boolean
=
false
private
clickable
:
boolean
=
false
private
blockTextures
:
any
=
{};
homeInfo
:
dynamic
homeInfo
:
dynamic
configInterface
:
dynamic
configInterface
:
dynamic
...
@@ -99,9 +100,22 @@ export default class Game extends InteractComponent {
...
@@ -99,9 +100,22 @@ export default class Game extends InteractComponent {
}
}
init
()
{
async
loadTextures
(){
let
urls
=
{
treasure
:
this
.
configInterface
.
indexBoxImg
,
stone
:
this
.
configInterface
.
indexBlockImg
};
for
(
let
key
in
urls
){
this
.
blockTextures
[
key
]
=
await
engine
.
assetsManager
.
loadTexture
(
urls
[
key
]);
}
}
async
init
()
{
this
.
startRotate
()
this
.
startRotate
()
await
this
.
loadTextures
();
this
.
copyEntity
.
getComponent
(
TextureRenderer
).
texture
=
this
.
blockTextures
.
treasure
;
this
.
initBox
()
this
.
initBox
()
const
{
x
,
y
}
=
this
.
Detail
.
getComponent
(
Transform
).
position
const
{
x
,
y
}
=
this
.
Detail
.
getComponent
(
Transform
).
position
...
@@ -204,7 +218,7 @@ export default class Game extends InteractComponent {
...
@@ -204,7 +218,7 @@ export default class Game extends InteractComponent {
// if (box === 6) stoneNum--
// if (box === 6) stoneNum--
const
generateEle
=
(
create
,
box
,
img
,
num
,
left
,
top
,
width
,
height
)
=>
{
const
generateEle
=
(
create
,
box
,
img
,
num
,
left
,
top
,
width
,
height
)
=>
{
const
entity
=
create
(
box
,
this
.
config
.
getTexture
(
img
)
,
num
)
const
entity
=
create
(
box
,
this
.
blockTextures
[
img
]
,
num
)
const
element
=
this
.
initElement
(
entity
,
left
-
containerWidth
/
2
,
top
-
containerHeight
/
2
,
width
,
height
)
const
element
=
this
.
initElement
(
entity
,
left
-
containerWidth
/
2
,
top
-
containerHeight
/
2
,
width
,
height
)
this
.
elementList
.
push
(
element
)
this
.
elementList
.
push
(
element
)
}
}
...
@@ -232,24 +246,24 @@ export default class Game extends InteractComponent {
...
@@ -232,24 +246,24 @@ export default class Game extends InteractComponent {
}
}
if
(
rowNum
===
3
&&
i
===
1
)
{
if
(
rowNum
===
3
&&
i
===
1
)
{
height
=
0
height
=
0
generateEle
(
createStone
,
this
.
BoxContainer
,
'stone
.png
'
,
box
,
left
,
top
,
width
,
height
)
generateEle
(
createStone
,
this
.
BoxContainer
,
'stone'
,
box
,
left
,
top
,
width
,
height
)
continue
continue
}
}
}
}
if
(
treasureNum
>
0
&&
stoneNum
>
0
)
{
if
(
treasureNum
>
0
&&
stoneNum
>
0
)
{
if
(
createRandomTreasure
())
{
if
(
createRandomTreasure
())
{
treasureNum
--
treasureNum
--
generateEle
(
createTreasure
,
this
.
BoxContainer
,
'treasure
.png
'
,
box
,
left
,
top
,
width
,
height
)
generateEle
(
createTreasure
,
this
.
BoxContainer
,
'treasure'
,
box
,
left
,
top
,
width
,
height
)
}
else
{
}
else
{
stoneNum
--
stoneNum
--
generateEle
(
createStone
,
this
.
BoxContainer
,
'stone
.png
'
,
box
,
left
,
top
,
width
,
height
)
generateEle
(
createStone
,
this
.
BoxContainer
,
'stone'
,
box
,
left
,
top
,
width
,
height
)
}
}
}
else
if
(
stoneNum
>
0
)
{
}
else
if
(
stoneNum
>
0
)
{
stoneNum
--
stoneNum
--
generateEle
(
createStone
,
this
.
BoxContainer
,
'stone
.png
'
,
box
,
left
,
top
,
width
,
height
)
generateEle
(
createStone
,
this
.
BoxContainer
,
'stone'
,
box
,
left
,
top
,
width
,
height
)
}
else
if
(
treasureNum
>
0
)
{
}
else
if
(
treasureNum
>
0
)
{
treasureNum
--
treasureNum
--
generateEle
(
createTreasure
,
this
.
BoxContainer
,
'treasure
.png
'
,
box
,
left
,
top
,
width
,
height
)
generateEle
(
createTreasure
,
this
.
BoxContainer
,
'treasure'
,
box
,
left
,
top
,
width
,
height
)
}
}
}
}
})
})
...
@@ -379,6 +393,7 @@ export default class Game extends InteractComponent {
...
@@ -379,6 +393,7 @@ export default class Game extends InteractComponent {
break
break
case
3
:
case
3
:
this
.
TakeFailed
.
getComponent
(
TakeFailed
).
setLabel
()
this
.
TakeFailed
.
getComponent
(
TakeFailed
).
setLabel
()
this
.
popup
.
showDialog
(
'TakeFailed'
)
break
break
default
:
default
:
this
.
popup
.
showDialog
(
'Network'
)
this
.
popup
.
showDialog
(
'Network'
)
...
...
assets/scripts/scenes/start.ts
View file @
86c15430
...
@@ -7,7 +7,7 @@ import {
...
@@ -7,7 +7,7 @@ import {
engine
,
engine
,
resource
,
resource
,
instantiate
,
instantiate
,
dataCenter
,
Texture
,
color
,
color
,
ScillaEvent
,
ScillaEvent
,
LocalStorage
LocalStorage
...
@@ -96,7 +96,6 @@ export default class start extends ScillaComponent {
...
@@ -96,7 +96,6 @@ export default class start extends ScillaComponent {
}
}
initEnv
()
initEnv
()
}
}
init
()
{
init
()
{
...
@@ -212,7 +211,7 @@ export default class start extends ScillaComponent {
...
@@ -212,7 +211,7 @@ export default class start extends ScillaComponent {
}
}
private
initFirstJoin
()
{
private
initFirstJoin
()
{
const
instance
=
new
LocalStorage
(
'miner-tool'
)
const
instance
=
new
LocalStorage
(
'miner-tool'
+
'_'
+
this
.
homeInfo
.
id
);
const
isFirst
=
instance
.
getItem
(
'first'
)
const
isFirst
=
instance
.
getItem
(
'first'
)
console
.
log
(
isFirst
)
console
.
log
(
isFirst
)
if
(
isFirst
===
'1'
)
{
if
(
isFirst
===
'1'
)
{
...
...
build/scripts/HelloScilla.js
deleted
100644 → 0
View file @
262eaeb5
import
*
as
tslib_1
from
"tslib"
;
import
TextRenderer
from
'components/renderer/TextRenderer'
;
import
Wave
from
'components/animation/Wave'
;
import
ScillaComponent
from
'components/base/ScillaComponent'
;
var
HelloScilla
=
(
function
(
_super
)
{
tslib_1
.
__extends
(
HelloScilla
,
_super
);
function
HelloScilla
()
{
var
_this
=
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
_this
.
name
=
'scilla'
;
return
_this
;
}
HelloScilla
.
prototype
.
onCreate
=
function
()
{
_super
.
prototype
.
onCreate
.
call
(
this
);
this
.
labelRenderer
=
this
.
label
.
getComponent
(
TextRenderer
);
this
.
logoAnimation
=
this
.
logo
.
getComponent
(
Wave
);
};
HelloScilla
.
prototype
.
tapMe
=
function
()
{
this
.
labelRenderer
.
text
=
'Hello '
+
this
.
name
;
this
.
logoAnimation
.
play
();
};
return
HelloScilla
;
}(
ScillaComponent
));
export
default
HelloScilla
;
//# sourceMappingURL=module.js.map
\ No newline at end of file
build/scripts/dialog/DialogContent.js
deleted
100644 → 0
View file @
262eaeb5
import
*
as
tslib_1
from
"tslib"
;
import
ScillaComponent
from
"components/base/ScillaComponent"
;
import
{
fade
,
flew
,
none
,
zoom
}
from
"components/other/Popup"
;
import
{
decorators
}
from
"scilla"
;
var
dirtyFieldTrigger
=
decorators
.
dirtyFieldTrigger
;
var
DialogContent
=
(
function
(
_super
)
{
tslib_1
.
__extends
(
DialogContent
,
_super
);
function
DialogContent
()
{
var
_this
=
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
_this
.
effect
=
PopupEffect
.
none
;
_this
.
effectImpl
=
none
;
_this
.
show
=
function
(
data
,
callback
)
{
console
.
log
(
'show'
);
_this
.
bubbling
(
'showDialog'
,
_this
.
entity
.
name
,
data
,
callback
);
};
_this
.
hide
=
function
(
action
)
{
_this
.
bubbling
(
'hideDialog'
,
_this
.
entity
.
name
,
action
||
'close'
);
};
return
_this
;
}
DialogContent
.
prototype
.
onModify
=
function
(
value
,
key
,
oldValue
)
{
_super
.
prototype
.
onModify
.
call
(
this
,
value
,
key
,
oldValue
);
if
(
key
===
'effect'
)
{
this
.
effectImpl
=
effects
[
value
];
}
};
DialogContent
.
prototype
.
onAwake
=
function
()
{
_super
.
prototype
.
onAwake
.
call
(
this
);
};
DialogContent
.
prototype
.
onTapCloseButton
=
function
()
{
this
.
hide
();
};
DialogContent
.
prototype
.
setup
=
function
(
data
)
{
};
tslib_1
.
__decorate
([
dirtyFieldTrigger
],
DialogContent
.
prototype
,
"effect"
,
void
0
);
return
DialogContent
;
}(
ScillaComponent
));
export
default
DialogContent
;
var
effects
=
{
none
:
none
,
fade
:
fade
,
flew
:
flew
,
zoom
:
zoom
,
};
export
var
PopupEffect
;
(
function
(
PopupEffect
)
{
PopupEffect
[
"none"
]
=
"none"
;
PopupEffect
[
"fade"
]
=
"fade"
;
PopupEffect
[
"flew"
]
=
"flew"
;
PopupEffect
[
"zoom"
]
=
"zoom"
;
})(
PopupEffect
||
(
PopupEffect
=
{}));
//# sourceMappingURL=module.js.map
\ No newline at end of file
build/scripts/dialog/Network.js
deleted
100644 → 0
View file @
262eaeb5
import
*
as
tslib_1
from
"tslib"
;
import
{
DialogContent
}
from
'components/other/Popup'
;
var
Network
=
(
function
(
_super
)
{
tslib_1
.
__extends
(
Network
,
_super
);
function
Network
()
{
return
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
}
return
Network
;
}(
DialogContent
));
export
default
Network
;
//# sourceMappingURL=module.js.map
\ No newline at end of file
build/scripts/dialog/Normal.js
deleted
100644 → 0
View file @
262eaeb5
import
*
as
tslib_1
from
"tslib"
;
import
{
DialogContent
}
from
'components/other/Popup'
;
var
Normal
=
(
function
(
_super
)
{
tslib_1
.
__extends
(
Normal
,
_super
);
function
Normal
()
{
return
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
}
return
Normal
;
}(
DialogContent
));
export
default
Normal
;
//# sourceMappingURL=module.js.map
\ No newline at end of file
build/scripts/dialog/TakeRewards.js
deleted
100644 → 0
View file @
262eaeb5
import
*
as
tslib_1
from
"tslib"
;
import
{
DialogContent
}
from
'components/other/Popup'
;
import
{
engine
,
createTexture
}
from
'scilla'
;
import
TextRenderer
from
'components/renderer/TextRenderer'
;
import
TextureRenderer
from
'components/renderer/TextureRenderer'
;
import
Popup
from
'components/other/Popup'
;
var
TakeRewards
=
(
function
(
_super
)
{
tslib_1
.
__extends
(
TakeRewards
,
_super
);
function
TakeRewards
()
{
return
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
}
TakeRewards
.
prototype
.
init
=
function
()
{
return
tslib_1
.
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
_a
,
_b
,
popup
;
return
tslib_1
.
__generator
(
this
,
function
(
_c
)
{
switch
(
_c
.
label
)
{
case
0
:
this
.
name
.
getComponent
(
TextRenderer
).
text
=
this
.
nameText
;
_a
=
this
.
img
.
getComponent
(
TextureRenderer
);
_b
=
createTexture
;
return
[
4
,
engine
.
assetsManager
.
loadImage
(
this
.
imgUrl
)];
case
1
:
_a
.
texture
=
_b
.
apply
(
void
0
,
[
_c
.
sent
()]);
popup
=
this
.
controller
.
getComponent
(
Popup
);
popup
.
showDialog
(
'TakeRewards'
);
return
[
2
];
}
});
});
};
TakeRewards
.
prototype
.
onclick
=
function
()
{
location
.
href
=
this
.
link
;
};
return
TakeRewards
;
}(
DialogContent
));
export
default
TakeRewards
;
//# sourceMappingURL=module.js.map
\ No newline at end of file
build/scripts/dialog/Tips.js
deleted
100644 → 0
View file @
262eaeb5
import
*
as
tslib_1
from
"tslib"
;
import
{
DialogContent
}
from
'components/other/Popup'
;
import
TextRenderer
from
'components/renderer/TextRenderer'
;
var
Tips
=
(
function
(
_super
)
{
tslib_1
.
__extends
(
Tips
,
_super
);
function
Tips
()
{
return
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
}
Tips
.
prototype
.
setLabel
=
function
(
num
)
{
this
.
label
.
getComponent
(
TextRenderer
).
text
=
"
\
u6BCF
\
u5C40
\
u6316
\
u51FA"
+
num
+
"
\
u4E2A
\
u5B9D
\
u7BB1
\n
\
u5373
\
u6709
\
u673A
\
u4F1A
\
u83B7
\
u5F97
\
u5956
\
u54C1"
;
};
return
Tips
;
}(
DialogContent
));
export
default
Tips
;
//# sourceMappingURL=module.js.map
\ No newline at end of file
build/scripts/game/Game.js
deleted
100644 → 0
View file @
262eaeb5
This diff is collapsed.
Click to expand it.
build/scripts/game/Stone.js
deleted
100644 → 0
View file @
262eaeb5
import
*
as
tslib_1
from
"tslib"
;
import
ScillaComponent
from
'components/base/ScillaComponent'
;
import
{
Entity
}
from
'scilla'
;
import
TextureRenderer
from
'components/renderer/TextureRenderer'
;
import
RelativeLayout
from
'components/other/RelativeLayout'
;
import
Transform
from
'components/base/Transform'
;
var
scale
;
(
function
(
scale
)
{
scale
[
scale
[
"min"
]
=
0.5
]
=
"min"
;
scale
[
scale
[
"max"
]
=
0.7
]
=
"max"
;
})(
scale
||
(
scale
=
{}));
function
generateRandomScale
()
{
return
Number
((
Math
.
random
()
*
0.2
+
scale
.
min
).
toFixed
(
2
));
}
var
Stone
=
(
function
(
_super
)
{
tslib_1
.
__extends
(
Stone
,
_super
);
function
Stone
(
entity
,
texture
)
{
var
_this
=
_super
.
call
(
this
)
||
this
;
_this
.
entity
=
entity
;
_this
.
ts
=
new
Transform
();
_this
.
tx
=
new
TextureRenderer
();
_this
.
rl
=
new
RelativeLayout
();
_this
.
entity
.
addComponent
(
_this
.
ts
);
_this
.
entity
.
addComponent
(
_this
.
tx
);
_this
.
entity
.
addComponent
(
_this
.
rl
);
var
scale
=
generateRandomScale
();
_this
.
ts
.
scale
.
setXY
(
scale
,
scale
);
_this
.
rl
.
once
=
false
;
_this
.
tx
.
texture
=
texture
;
return
_this
;
}
Stone
.
prototype
.
onAwake
=
function
()
{
};
Stone
.
prototype
.
destory
=
function
()
{
this
.
enabled
=
false
;
};
return
Stone
;
}(
ScillaComponent
));
export
default
Stone
;
export
function
createStone
(
parent
,
texture
)
{
var
entity
=
new
Entity
();
parent
.
addChild
(
entity
);
entity
.
addComponent
(
new
Stone
(
entity
,
texture
));
return
entity
;
}
//# sourceMappingURL=module.js.map
\ No newline at end of file
build/scripts/game/ToolAnimate.js
deleted
100644 → 0
View file @
262eaeb5
var
constant
;
(
function
(
constant
)
{
constant
[
constant
[
"rotate"
]
=
60
]
=
"rotate"
;
constant
[
constant
[
"absMaxValue"
]
=
70
]
=
"absMaxValue"
;
})(
constant
||
(
constant
=
{}));
var
ToolAnimateRotate
=
(
function
()
{
function
ToolAnimateRotate
(
ts
)
{
this
.
forwards
=
1
;
this
.
ts
=
ts
;
}
ToolAnimateRotate
.
prototype
.
onTick
=
function
(
t
)
{
if
(
this
.
lastT
===
undefined
)
{
return
this
.
lastT
=
t
;
}
var
v
=
this
.
forwards
*
Math
.
floor
(
t
-
this
.
lastT
)
/
1000
*
constant
.
rotate
+
this
.
ts
.
rotation
;
if
(
Math
.
abs
(
v
)
>=
constant
.
absMaxValue
)
{
v
=
this
.
forwards
*
constant
.
absMaxValue
;
this
.
forwards
*=
-
1
;
}
this
.
ts
.
rotation
=
v
;
this
.
lastT
=
t
;
};
return
ToolAnimateRotate
;
}());
export
default
ToolAnimateRotate
;
//# sourceMappingURL=module.js.map
\ No newline at end of file
build/scripts/game/Treasure.js
deleted
100644 → 0
View file @
262eaeb5
import
*
as
tslib_1
from
"tslib"
;
import
ScillaComponent
from
'components/base/ScillaComponent'
;
import
{
Entity
}
from
'scilla'
;
import
TextureRenderer
from
'components/renderer/TextureRenderer'
;
import
RelativeLayout
from
'components/other/RelativeLayout'
;
import
Transform
from
'components/base/Transform'
;
var
scale
;
(
function
(
scale
)
{
scale
[
scale
[
"min"
]
=
0.5
]
=
"min"
;
scale
[
scale
[
"max"
]
=
0.7
]
=
"max"
;
})(
scale
||
(
scale
=
{}));
function
generateRandomScale
()
{
return
Number
((
Math
.
random
()
*
0.2
+
scale
.
min
).
toFixed
(
2
));
}
var
Treasure
=
(
function
(
_super
)
{
tslib_1
.
__extends
(
Treasure
,
_super
);
function
Treasure
(
entity
,
texture
)
{
var
_this
=
_super
.
call
(
this
)
||
this
;
_this
.
entity
=
entity
;
_this
.
ts
=
new
Transform
();
_this
.
tx
=
new
TextureRenderer
();
_this
.
rl
=
new
RelativeLayout
();
_this
.
entity
.
addComponent
(
_this
.
ts
);
_this
.
entity
.
addComponent
(
_this
.
tx
);
_this
.
entity
.
addComponent
(
_this
.
rl
);
var
scale
=
generateRandomScale
();
_this
.
ts
.
scale
.
setXY
(
scale
,
scale
);
_this
.
rl
.
once
=
false
;
_this
.
tx
.
texture
=
texture
;
return
_this
;
}
Treasure
.
prototype
.
onAwake
=
function
()
{
};
Treasure
.
prototype
.
destory
=
function
()
{
this
.
enabled
=
false
;
};
return
Treasure
;
}(
ScillaComponent
));
export
default
Treasure
;
export
function
createTreasure
(
parent
,
texture
)
{
var
entity
=
new
Entity
();
parent
.
addChild
(
entity
);
entity
.
addComponent
(
new
Treasure
(
entity
,
texture
));
entity
.
enabled
=
true
;
return
entity
;
}
//# sourceMappingURL=module.js.map
\ No newline at end of file
build/scripts/scenes/start.js
deleted
100644 → 0
View file @
262eaeb5
This diff is collapsed.
Click to expand it.
build/scripts/utils/index.js
deleted
100644 → 0
View file @
262eaeb5
export
function
countDown
(
from
,
to
,
onChange
,
onComplete
)
{
var
current
=
from
;
onChange
(
current
);
var
timer
=
setInterval
(
function
()
{
if
(
current
<=
to
)
{
clearInterval
(
timer
);
onComplete
(
to
);
}
else
{
onChange
(
--
current
);
}
},
1000
);
}
//# sourceMappingURL=module.js.map
\ No newline at end of file
debug/bundle.js
View file @
86c15430
...
@@ -9736,7 +9736,7 @@
...
@@ -9736,7 +9736,7 @@
return
true
;
return
true
;
};
};
start
.
prototype
.
initFirstJoin
=
function
()
{
start
.
prototype
.
initFirstJoin
=
function
()
{
var
instance
=
new
LocalStorage
(
'miner-tool'
);
var
instance
=
new
LocalStorage
(
'miner-tool'
+
'_'
+
this
.
homeInfo
.
id
);
var
isFirst
=
instance
.
getItem
(
'first'
);
var
isFirst
=
instance
.
getItem
(
'first'
);
console
.
log
(
isFirst
);
console
.
log
(
isFirst
);
if
(
isFirst
===
'1'
)
{
if
(
isFirst
===
'1'
)
{
...
@@ -10202,9 +10202,12 @@
...
@@ -10202,9 +10202,12 @@
function
TakeFailed
()
{
function
TakeFailed
()
{
return
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
return
_super
!==
null
&&
_super
.
apply
(
this
,
arguments
)
||
this
;
}
}
TakeFailed
.
prototype
.
setup
=
function
(
data
)
{
_super
.
prototype
.
setup
.
call
(
this
,
data
);
this
.
setLabel
();
};
TakeFailed
.
prototype
.
setLabel
=
function
()
{
TakeFailed
.
prototype
.
setLabel
=
function
()
{
this
.
label
.
getComponent
(
TextRenderer
).
text
=
this
.
unit
+
"
\
u6263
\
u9664
\
u5931
\
u8D25
\n
\
u522B
\
u614C
\
u5F20
\
uFF0C
\
u53EF
\
u4EE5
\
u518D
\
u8BD5
\
u4E00
\
u6B21
\
u54DF~"
;
this
.
label
.
getComponent
(
TextRenderer
).
text
=
this
.
unit
+
"
\
u6263
\
u9664
\
u5931
\
u8D25
\n
\
u522B
\
u614C
\
u5F20
\
uFF0C
\
u53EF
\
u4EE5
\
u518D
\
u8BD5
\
u4E00
\
u6B21
\
u54DF~"
;
this
.
controller
.
getComponent
(
Popup
).
showDialog
(
'TakeFailed'
);
};
};
return
TakeFailed
;
return
TakeFailed
;
}(
DialogContent
));
}(
DialogContent
));
...
@@ -10214,7 +10217,7 @@
...
@@ -10214,7 +10217,7 @@
ElementType
[
"Treasure"
]
=
"Treasure"
;
ElementType
[
"Treasure"
]
=
"Treasure"
;
ElementType
[
"Stone"
]
=
"Stone"
;
ElementType
[
"Stone"
]
=
"Stone"
;
})(
ElementType
||
(
ElementType
=
{}));
})(
ElementType
||
(
ElementType
=
{}));
var
commonSpeedBefore
=
2
80
;
var
commonSpeedBefore
=
5
80
;
var
commonSpeedAfter
=
420
;
var
commonSpeedAfter
=
420
;
var
slowSpeed
=
350
;
var
slowSpeed
=
350
;
var
startPoint
=
{
var
startPoint
=
{
...
@@ -10236,6 +10239,7 @@
...
@@ -10236,6 +10239,7 @@
_this
.
score
=
0
;
_this
.
score
=
0
;
_this
.
playable
=
true
;
_this
.
playable
=
true
;
_this
.
clickable
=
false
;
_this
.
clickable
=
false
;
_this
.
blockTextures
=
{};
_this
.
doJoinStatus
=
false
;
_this
.
doJoinStatus
=
false
;
_this
.
doJoinRunning
=
false
;
_this
.
doJoinRunning
=
false
;
return
_this
;
return
_this
;
...
@@ -10248,13 +10252,58 @@
...
@@ -10248,13 +10252,58 @@
this
.
popup
=
this
.
DialogContainer
.
getComponent
(
Popup
);
this
.
popup
=
this
.
DialogContainer
.
getComponent
(
Popup
);
this
.
rotateTick
=
new
ToolAnimateRotate
(
this
.
toolTs
);
this
.
rotateTick
=
new
ToolAnimateRotate
(
this
.
toolTs
);
};
};
Game
.
prototype
.
loadTextures
=
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
urls
,
_a
,
_b
,
_i
,
key
,
_c
,
_d
;
return
__generator
(
this
,
function
(
_e
)
{
switch
(
_e
.
label
)
{
case
0
:
urls
=
{
treasure
:
this
.
configInterface
.
indexBoxImg
,
stone
:
this
.
configInterface
.
indexBlockImg
};
_a
=
[];
for
(
_b
in
urls
)
_a
.
push
(
_b
);
_i
=
0
;
_e
.
label
=
1
;
case
1
:
if
(
!
(
_i
<
_a
.
length
))
return
[
3
,
4
];
key
=
_a
[
_i
];
_c
=
this
.
blockTextures
;
_d
=
key
;
return
[
4
,
engine
.
assetsManager
.
loadTexture
(
urls
[
key
])];
case
2
:
_c
[
_d
]
=
_e
.
sent
();
_e
.
label
=
3
;
case
3
:
_i
++
;
return
[
3
,
1
];
case
4
:
return
[
2
];
}
});
});
};
Game
.
prototype
.
init
=
function
()
{
Game
.
prototype
.
init
=
function
()
{
this
.
startRotate
();
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
this
.
initBox
();
var
_a
,
x
,
y
;
var
_a
=
this
.
Detail
.
getComponent
(
Transform
).
position
,
x
=
_a
.
x
,
y
=
_a
.
y
;
return
__generator
(
this
,
function
(
_b
)
{
this
.
ox
=
x
;
switch
(
_b
.
label
)
{
this
.
oy
=
y
;
case
0
:
this
.
setBtnActionBg
(
false
);
this
.
startRotate
();
return
[
4
,
this
.
loadTextures
()];
case
1
:
_b
.
sent
();
this
.
copyEntity
.
getComponent
(
TextureRenderer
).
texture
=
this
.
blockTextures
.
treasure
;
this
.
initBox
();
_a
=
this
.
Detail
.
getComponent
(
Transform
).
position
,
x
=
_a
.
x
,
y
=
_a
.
y
;
this
.
ox
=
x
;
this
.
oy
=
y
;
this
.
setBtnActionBg
(
false
);
return
[
2
];
}
});
});
};
};
Game
.
prototype
.
onUpdate
=
function
(
t
)
{
Game
.
prototype
.
onUpdate
=
function
(
t
)
{
_super
.
prototype
.
onUpdate
.
call
(
this
,
t
);
_super
.
prototype
.
onUpdate
.
call
(
this
,
t
);
...
@@ -10338,7 +10387,7 @@
...
@@ -10338,7 +10387,7 @@
var
treasureNum
=
box
;
var
treasureNum
=
box
;
var
stoneNum
=
Math
.
ceil
(
box
*
0.6
);
var
stoneNum
=
Math
.
ceil
(
box
*
0.6
);
var
generateEle
=
function
(
create
,
box
,
img
,
num
,
left
,
top
,
width
,
height
)
{
var
generateEle
=
function
(
create
,
box
,
img
,
num
,
left
,
top
,
width
,
height
)
{
var
entity
=
create
(
box
,
_this
.
config
.
getTexture
(
img
)
,
num
);
var
entity
=
create
(
box
,
_this
.
blockTextures
[
img
]
,
num
);
var
element
=
_this
.
initElement
(
entity
,
left
-
containerWidth
/
2
,
top
-
containerHeight
/
2
,
width
,
height
);
var
element
=
_this
.
initElement
(
entity
,
left
-
containerWidth
/
2
,
top
-
containerHeight
/
2
,
width
,
height
);
_this
.
elementList
.
push
(
element
);
_this
.
elementList
.
push
(
element
);
};
};
...
@@ -10366,27 +10415,27 @@
...
@@ -10366,27 +10415,27 @@
}
}
if
(
rowNum
===
3
&&
i
===
1
)
{
if
(
rowNum
===
3
&&
i
===
1
)
{
height
=
0
;
height
=
0
;
generateEle
(
createStone
,
_this
.
BoxContainer
,
'stone
.png
'
,
box
,
left
,
top
,
width
,
height
);
generateEle
(
createStone
,
_this
.
BoxContainer
,
'stone'
,
box
,
left
,
top
,
width
,
height
);
continue
;
continue
;
}
}
}
}
if
(
treasureNum
>
0
&&
stoneNum
>
0
)
{
if
(
treasureNum
>
0
&&
stoneNum
>
0
)
{
if
(
createRandomTreasure
())
{
if
(
createRandomTreasure
())
{
treasureNum
--
;
treasureNum
--
;
generateEle
(
createTreasure
,
_this
.
BoxContainer
,
'treasure
.png
'
,
box
,
left
,
top
,
width
,
height
);
generateEle
(
createTreasure
,
_this
.
BoxContainer
,
'treasure'
,
box
,
left
,
top
,
width
,
height
);
}
}
else
{
else
{
stoneNum
--
;
stoneNum
--
;
generateEle
(
createStone
,
_this
.
BoxContainer
,
'stone
.png
'
,
box
,
left
,
top
,
width
,
height
);
generateEle
(
createStone
,
_this
.
BoxContainer
,
'stone'
,
box
,
left
,
top
,
width
,
height
);
}
}
}
}
else
if
(
stoneNum
>
0
)
{
else
if
(
stoneNum
>
0
)
{
stoneNum
--
;
stoneNum
--
;
generateEle
(
createStone
,
_this
.
BoxContainer
,
'stone
.png
'
,
box
,
left
,
top
,
width
,
height
);
generateEle
(
createStone
,
_this
.
BoxContainer
,
'stone'
,
box
,
left
,
top
,
width
,
height
);
}
}
else
if
(
treasureNum
>
0
)
{
else
if
(
treasureNum
>
0
)
{
treasureNum
--
;
treasureNum
--
;
generateEle
(
createTreasure
,
_this
.
BoxContainer
,
'treasure
.png
'
,
box
,
left
,
top
,
width
,
height
);
generateEle
(
createTreasure
,
_this
.
BoxContainer
,
'treasure'
,
box
,
left
,
top
,
width
,
height
);
}
}
}
}
});
});
...
@@ -10512,6 +10561,7 @@
...
@@ -10512,6 +10561,7 @@
break
;
break
;
case
3
:
case
3
:
this
.
TakeFailed
.
getComponent
(
TakeFailed
).
setLabel
();
this
.
TakeFailed
.
getComponent
(
TakeFailed
).
setLabel
();
this
.
popup
.
showDialog
(
'TakeFailed'
);
break
;
break
;
default
:
default
:
this
.
popup
.
showDialog
(
'Network'
);
this
.
popup
.
showDialog
(
'Network'
);
...
...
debug/bundle.js.map
View file @
86c15430
This diff is collapsed.
Click to expand it.
manifest.json
View file @
86c15430
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
},
},
"entryScene"
:
"main"
"entryScene"
:
"main"
},
},
"webServiceUrl"
:
""
"webServiceUrl"
:
"
http://localhost:3000
"
},
},
"dataCenterConfig"
:
{
"dataCenterConfig"
:
{
"dataCenterRoot"
:
[
"dataCenterRoot"
:
[
...
...
ts-time-record.json
View file @
86c15430
{
"/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"
:
1563
759198037.7097
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/TakeRewards.ts"
:
1563759198037.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"
:
1563878060701.6638
,
"/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"
:
1563870901625.6755
,
"/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"
:
1563
942766706.9917
,
"/Users/rockyl/WorkSpaces/scilla-projects/minner-tool/assets/scripts/dialog/TakeRewards.ts"
:
1563759198037.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
}
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