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 @@
...
@@ -12,6 +12,7 @@
function
injectProps
(
p
)
{
function
injectProps
(
p
)
{
engine
.
injectProp
(
props
,
p
);
engine
.
injectProp
(
props
,
p
);
}
}
//# sourceMappingURL=props.js.map
function
getTexture
(
uuid
)
{
function
getTexture
(
uuid
)
{
return
engine
.
Texture
.
from
(
getAssetByUUID
(
uuid
).
uuid
);
return
engine
.
Texture
.
from
(
getAssetByUUID
(
uuid
).
uuid
);
...
@@ -29,6 +30,7 @@
...
@@ -29,6 +30,7 @@
}
}
function
showLog
(
abjname
,
obj
)
{
function
showLog
(
abjname
,
obj
)
{
}
}
//# sourceMappingURL=utils.js.map
var
GameView
=
(
function
(
_super
)
{
var
GameView
=
(
function
(
_super
)
{
tslib
.
__extends
(
GameView
,
_super
);
tslib
.
__extends
(
GameView
,
_super
);
...
@@ -293,8 +295,9 @@
...
@@ -293,8 +295,9 @@
this
.
basketLevel
=
0
;
this
.
basketLevel
=
0
;
var
pickTeaSVGA
=
this
.
basketSvgaGroup
[
this
.
basketLevel
];
var
pickTeaSVGA
=
this
.
basketSvgaGroup
[
this
.
basketLevel
];
var
templength
=
pickTeaSVGA
.
children
.
length
;
var
templength
=
pickTeaSVGA
.
children
.
length
;
if
(
this
.
allFrames
<
templength
)
if
(
this
.
allFrames
<
templength
)
{
pickTeaSVGA
.
removeChildAt
(
10
);
pickTeaSVGA
.
removeChildAt
(
10
);
}
var
originframes
=
pickTeaSVGA
.
children
[
7
];
var
originframes
=
pickTeaSVGA
.
children
[
7
];
if
(
!
originframes
)
{
if
(
!
originframes
)
{
return
;
return
;
...
@@ -311,22 +314,18 @@
...
@@ -311,22 +314,18 @@
pickTeaSVGA
.
addChildAt
(
this
.
teaHalfImg
,
10
);
pickTeaSVGA
.
addChildAt
(
this
.
teaHalfImg
,
10
);
};
};
GameView
.
prototype
.
setPickTeaLevel
=
function
(
level
)
{
GameView
.
prototype
.
setPickTeaLevel
=
function
(
level
)
{
var
_this
=
this
;
this
.
basketLevel
=
level
;
this
.
basketLevel
=
level
;
var
pickTeaSVGA
=
this
.
basketSvgaGroup
[
level
];
var
pickTeaSVGA
=
this
.
basketSvgaGroup
[
level
];
pickTeaSVGA
.
visible
=
true
;
pickTeaSVGA
.
visible
=
true
;
console
.
log
(
'总共有多少'
,
pickTeaSVGA
.
children
.
length
);
var
originframes
=
pickTeaSVGA
.
children
[
7
];
setTimeout
(
function
()
{
this
.
teaHalfImg
.
visible
=
true
;
var
originframes
=
pickTeaSVGA
.
children
[
7
];
var
teaBucketframes
=
JSON
.
parse
(
JSON
.
stringify
(
originframes
.
frames
));
_this
.
teaHalfImg
.
visible
=
true
;
if
(
this
.
teaHalfImg
)
{
var
teaBucketframes
=
JSON
.
parse
(
JSON
.
stringify
(
originframes
.
frames
));
this
.
teaHalfImg
[
'frames'
]
=
teaBucketframes
;
if
(
_this
.
teaHalfImg
)
{
}
_this
.
teaHalfImg
[
'frames'
]
=
teaBucketframes
;
showLog
(
this
.
teaHalfImg
);
}
pickTeaSVGA
.
addChildAt
(
this
.
teaHalfImg
,
10
);
showLog
(
_this
.
teaHalfImg
);
pickTeaSVGA
.
gotoAndPlay
(
1
,
true
);
pickTeaSVGA
.
addChildAt
(
_this
.
teaHalfImg
,
10
);
pickTeaSVGA
.
gotoAndPlay
(
1
,
true
);
},
300
);
};
};
GameView
.
prototype
.
handGrasp
=
function
()
{
GameView
.
prototype
.
handGrasp
=
function
()
{
var
that
=
this
;
var
that
=
this
;
...
@@ -412,6 +411,7 @@
...
@@ -412,6 +411,7 @@
};
};
return
GameWrapper
;
return
GameWrapper
;
}(
engine
.
Container
));
}(
engine
.
Container
));
//# sourceMappingURL=GameWrapper.js.map
function
index
(
props
)
{
function
index
(
props
)
{
prepareProps
();
prepareProps
();
...
@@ -419,6 +419,7 @@
...
@@ -419,6 +419,7 @@
var
instance
=
new
GameWrapper
();
var
instance
=
new
GameWrapper
();
return
instance
;
return
instance
;
}
}
//# sourceMappingURL=index.js.map
return
index
;
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 {
...
@@ -178,7 +178,7 @@ export default class GameView extends engine.Container {
// setTimeout(() => {
// setTimeout(() => {
// this.setPickTeaLevel(1)
// 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 })
// //this.setTeaNum({ totalNum: 100, nowNum: 0 })
// }, 500)
// }, 500)
// setTimeout(() => {
// setTimeout(() => {
...
@@ -457,8 +457,10 @@ export default class GameView extends engine.Container {
...
@@ -457,8 +457,10 @@ export default class GameView extends engine.Container {
let
pickTeaSVGA
=
this
.
basketSvgaGroup
[
this
.
basketLevel
];
let
pickTeaSVGA
=
this
.
basketSvgaGroup
[
this
.
basketLevel
];
let
templength
=
pickTeaSVGA
.
children
.
length
;
let
templength
=
pickTeaSVGA
.
children
.
length
;
//console.log('templength',templength)
//console.log('templength',templength)
if
(
this
.
allFrames
<
templength
)
if
(
this
.
allFrames
<
templength
)
{
pickTeaSVGA
.
removeChildAt
(
10
);
pickTeaSVGA
.
removeChildAt
(
10
);
}
let
originframes
=
pickTeaSVGA
.
children
[
7
];
let
originframes
=
pickTeaSVGA
.
children
[
7
];
if
(
!
originframes
)
{
if
(
!
originframes
)
{
return
;
return
;
...
@@ -486,27 +488,27 @@ export default class GameView extends engine.Container {
...
@@ -486,27 +488,27 @@ export default class GameView extends engine.Container {
this
.
basketLevel
=
level
;
this
.
basketLevel
=
level
;
let
pickTeaSVGA
=
this
.
basketSvgaGroup
[
level
];
let
pickTeaSVGA
=
this
.
basketSvgaGroup
[
level
];
pickTeaSVGA
.
visible
=
true
;
pickTeaSVGA
.
visible
=
true
;
console
.
log
(
'总共有多少'
,
pickTeaSVGA
.
children
.
length
)
//
console.log('总共有多少', pickTeaSVGA.children.length)
//showLog('littleTea url')
//showLog('littleTea url')
//showLog(this.teaHalfImg['_source'])
//showLog(this.teaHalfImg['_source'])
//需要svga缓存结束
//需要svga缓存结束
setTimeout
(()
=>
{
//
setTimeout(() => {
showLog
(
'延迟500ms'
)
showLog
(
'延迟500ms'
)
let
originframes
=
pickTeaSVGA
.
children
[
7
];
let
originframes
=
pickTeaSVGA
.
children
[
7
];
//按照采茶叶的多少来 设置茶叶是不是满的图片
//按照采茶叶的多少来 设置茶叶是不是满的图片
this
.
teaHalfImg
.
visible
=
true
;
this
.
teaHalfImg
.
visible
=
true
;
let
teaBucketframes
=
JSON
.
parse
(
JSON
.
stringify
(
originframes
.
frames
));
let
teaBucketframes
=
JSON
.
parse
(
JSON
.
stringify
(
originframes
.
frames
));
//this.teaHalfImg = //new engine.Image(getTextureByName('茶叶-少'));
//this.teaHalfImg = //new engine.Image(getTextureByName('茶叶-少'));
if
(
this
.
teaHalfImg
)
{
if
(
this
.
teaHalfImg
)
{
//this.teaHalfImg.source = ''
//this.teaHalfImg.source = ''
this
.
teaHalfImg
[
'frames'
]
=
teaBucketframes
;
this
.
teaHalfImg
[
'frames'
]
=
teaBucketframes
;
}
}
showLog
(
'this.teaHalfImg'
);
showLog
(
'this.teaHalfImg'
);
showLog
(
this
.
teaHalfImg
);
showLog
(
this
.
teaHalfImg
);
pickTeaSVGA
.
addChildAt
(
this
.
teaHalfImg
,
10
)
pickTeaSVGA
.
addChildAt
(
this
.
teaHalfImg
,
10
)
pickTeaSVGA
.
gotoAndPlay
(
1
,
true
);
pickTeaSVGA
.
gotoAndPlay
(
1
,
true
);
},
300
)
//
}, 300)
}
}
handGrasp
()
{
handGrasp
()
{
showLog
(
'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