Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-libs
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
劳工
zeroing-libs
Commits
26ce1641
Commit
26ce1641
authored
Apr 10, 2020
by
13732208043
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
茶叶更新
parent
1ac3d065
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
36 deletions
+39
-36
pick-tea.json
dist/customs/pick-tea.json
+1
-1
main.js
src/custom/pick-tea/debug/main.js
+15
-14
main.js.map
src/custom/pick-tea/debug/main.js.map
+1
-1
GameView.ts
src/custom/pick-tea/src/game/GameView.ts
+22
-20
No files found.
dist/customs/pick-tea.json
View file @
26ce1641
This diff is collapsed.
Click to expand it.
src/custom/pick-tea/debug/main.js
View file @
26ce1641
...
...
@@ -12,6 +12,7 @@
function
injectProps
(
p
)
{
engine
.
injectProp
(
props
,
p
);
}
//# sourceMappingURL=props.js.map
function
getTexture
(
uuid
)
{
return
engine
.
Texture
.
from
(
getAssetByUUID
(
uuid
).
uuid
);
...
...
@@ -29,6 +30,7 @@
}
function
showLog
(
abjname
,
obj
)
{
}
//# sourceMappingURL=utils.js.map
var
GameView
=
(
function
(
_super
)
{
tslib
.
__extends
(
GameView
,
_super
);
...
...
@@ -293,8 +295,9 @@
this
.
basketLevel
=
0
;
var
pickTeaSVGA
=
this
.
basketSvgaGroup
[
this
.
basketLevel
];
var
templength
=
pickTeaSVGA
.
children
.
length
;
if
(
this
.
allFrames
<
templength
)
if
(
this
.
allFrames
<
templength
)
{
pickTeaSVGA
.
removeChildAt
(
10
);
}
var
originframes
=
pickTeaSVGA
.
children
[
7
];
if
(
!
originframes
)
{
return
;
...
...
@@ -311,22 +314,18 @@
pickTeaSVGA
.
addChildAt
(
this
.
teaHalfImg
,
10
);
};
GameView
.
prototype
.
setPickTeaLevel
=
function
(
level
)
{
var
_this
=
this
;
this
.
basketLevel
=
level
;
var
pickTeaSVGA
=
this
.
basketSvgaGroup
[
level
];
pickTeaSVGA
.
visible
=
true
;
console
.
log
(
'总共有多少'
,
pickTeaSVGA
.
children
.
length
);
setTimeout
(
function
()
{
var
originframes
=
pickTeaSVGA
.
children
[
7
];
_this
.
teaHalfImg
.
visible
=
true
;
var
teaBucketframes
=
JSON
.
parse
(
JSON
.
stringify
(
originframes
.
frames
));
if
(
_this
.
teaHalfImg
)
{
_this
.
teaHalfImg
[
'frames'
]
=
teaBucketframes
;
}
showLog
(
_this
.
teaHalfImg
);
pickTeaSVGA
.
addChildAt
(
_this
.
teaHalfImg
,
10
);
pickTeaSVGA
.
gotoAndPlay
(
1
,
true
);
},
300
);
var
originframes
=
pickTeaSVGA
.
children
[
7
];
this
.
teaHalfImg
.
visible
=
true
;
var
teaBucketframes
=
JSON
.
parse
(
JSON
.
stringify
(
originframes
.
frames
));
if
(
this
.
teaHalfImg
)
{
this
.
teaHalfImg
[
'frames'
]
=
teaBucketframes
;
}
showLog
(
this
.
teaHalfImg
);
pickTeaSVGA
.
addChildAt
(
this
.
teaHalfImg
,
10
);
pickTeaSVGA
.
gotoAndPlay
(
1
,
true
);
};
GameView
.
prototype
.
handGrasp
=
function
()
{
var
that
=
this
;
...
...
@@ -412,6 +411,7 @@
};
return
GameWrapper
;
}(
engine
.
Container
));
//# sourceMappingURL=GameWrapper.js.map
function
index
(
props
)
{
prepareProps
();
...
...
@@ -419,6 +419,7 @@
var
instance
=
new
GameWrapper
();
return
instance
;
}
//# sourceMappingURL=index.js.map
return
index
;
...
...
src/custom/pick-tea/debug/main.js.map
View file @
26ce1641
This diff is collapsed.
Click to expand it.
src/custom/pick-tea/src/game/GameView.ts
View file @
26ce1641
...
...
@@ -178,7 +178,7 @@ export default class GameView extends engine.Container {
// setTimeout(() => {
// this.setPickTeaLevel(1)
// this.setTeaNum({ totalNum: 1
0, nowNum:
0, serverData: 1585290768011 })
// this.setTeaNum({ totalNum: 1
50, nowNum: 6
0, serverData: 1585290768011 })
// //this.setTeaNum({ totalNum: 100, nowNum: 0 })
// }, 500)
// setTimeout(() => {
...
...
@@ -457,8 +457,10 @@ export default class GameView extends engine.Container {
let
pickTeaSVGA
=
this
.
basketSvgaGroup
[
this
.
basketLevel
];
let
templength
=
pickTeaSVGA
.
children
.
length
;
//console.log('templength',templength)
if
(
this
.
allFrames
<
templength
)
if
(
this
.
allFrames
<
templength
)
{
pickTeaSVGA
.
removeChildAt
(
10
);
}
let
originframes
=
pickTeaSVGA
.
children
[
7
];
if
(
!
originframes
)
{
return
;
...
...
@@ -486,27 +488,27 @@ export default class GameView extends engine.Container {
this
.
basketLevel
=
level
;
let
pickTeaSVGA
=
this
.
basketSvgaGroup
[
level
];
pickTeaSVGA
.
visible
=
true
;
console
.
log
(
'总共有多少'
,
pickTeaSVGA
.
children
.
length
)
//
console.log('总共有多少', pickTeaSVGA.children.length)
//showLog('littleTea url')
//showLog(this.teaHalfImg['_source'])
//需要svga缓存结束
setTimeout
(()
=>
{
showLog
(
'延迟500ms'
)
let
originframes
=
pickTeaSVGA
.
children
[
7
];
//按照采茶叶的多少来 设置茶叶是不是满的图片
this
.
teaHalfImg
.
visible
=
true
;
let
teaBucketframes
=
JSON
.
parse
(
JSON
.
stringify
(
originframes
.
frames
));
//this.teaHalfImg = //new engine.Image(getTextureByName('茶叶-少'));
if
(
this
.
teaHalfImg
)
{
//this.teaHalfImg.source = ''
this
.
teaHalfImg
[
'frames'
]
=
teaBucketframes
;
}
showLog
(
'this.teaHalfImg'
);
showLog
(
this
.
teaHalfImg
);
pickTeaSVGA
.
addChildAt
(
this
.
teaHalfImg
,
10
)
pickTeaSVGA
.
gotoAndPlay
(
1
,
true
);
},
300
)
//
setTimeout(() => {
showLog
(
'延迟500ms'
)
let
originframes
=
pickTeaSVGA
.
children
[
7
];
//按照采茶叶的多少来 设置茶叶是不是满的图片
this
.
teaHalfImg
.
visible
=
true
;
let
teaBucketframes
=
JSON
.
parse
(
JSON
.
stringify
(
originframes
.
frames
));
//this.teaHalfImg = //new engine.Image(getTextureByName('茶叶-少'));
if
(
this
.
teaHalfImg
)
{
//this.teaHalfImg.source = ''
this
.
teaHalfImg
[
'frames'
]
=
teaBucketframes
;
}
showLog
(
'this.teaHalfImg'
);
showLog
(
this
.
teaHalfImg
);
pickTeaSVGA
.
addChildAt
(
this
.
teaHalfImg
,
10
)
pickTeaSVGA
.
gotoAndPlay
(
1
,
true
);
//
}, 300)
}
handGrasp
()
{
showLog
(
'handGrasp'
)
...
...
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