Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
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
wildfirecode13
xiaoxiaole
Commits
16a4c359
Commit
16a4c359
authored
Apr 13, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整猩猩的动画暂存
parent
29e6f2ee
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
2 deletions
+63
-2
xingxing.svga
egret/resource/assets/svgas/xingxing.svga
+0
-0
xingxingjio.svga
egret/resource/assets/svgas/xingxingjio.svga
+0
-0
MainScene.ts
egret/src/mainScene/MainScene.ts
+16
-0
Element.ts
egret/src/something/class/Element.ts
+47
-2
No files found.
egret/resource/assets/svgas/xingxing.svga
View file @
16a4c359
No preview for this file type
egret/resource/assets/svgas/xingxingjio.svga
0 → 100644
View file @
16a4c359
File added
egret/src/mainScene/MainScene.ts
View file @
16a4c359
...
@@ -1402,6 +1402,14 @@ export default class MainScene extends Scene {
...
@@ -1402,6 +1402,14 @@ export default class MainScene extends Scene {
// console.log(cannoele.cannoMoveClip.currentFrame);
// console.log(cannoele.cannoMoveClip.currentFrame);
// }
// }
onTap_boomBtn
()
{
onTap_boomBtn
()
{
for
(
var
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
){
var
lat
=
this
.
lattices
[
i
];
if
(
lat
&&
lat
.
element
&&
lat
.
element
.
inPongoPart
&&
lat
.
element
.
inPongoPart
==
"tl"
){
var
pongoele
:
Element
=
lat
.
element
;
pongoele
.
changePongoStop
(
"add"
);
}
}
return
;
NetManager
.
ins
.
clickLog
(
getlogItem
(
7
));
NetManager
.
ins
.
clickLog
(
getlogItem
(
7
));
if
(
this
.
propBtnCon
.
boomBtn
.
propNumShow
.
count
<=
0
)
{
if
(
this
.
propBtnCon
.
boomBtn
.
propNumShow
.
count
<=
0
)
{
//购买弹框
//购买弹框
...
@@ -1412,6 +1420,14 @@ export default class MainScene extends Scene {
...
@@ -1412,6 +1420,14 @@ export default class MainScene extends Scene {
}
}
onTap_hammerBtn
()
{
onTap_hammerBtn
()
{
for
(
var
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
){
var
lat
=
this
.
lattices
[
i
];
if
(
lat
&&
lat
.
element
&&
lat
.
element
.
inPongoPart
&&
lat
.
element
.
inPongoPart
==
"tl"
){
var
pongoele
:
Element
=
lat
.
element
;
pongoele
.
changePongoStop
(
"cut"
);
}
}
return
;
NetManager
.
ins
.
clickLog
(
getlogItem
(
10
));
NetManager
.
ins
.
clickLog
(
getlogItem
(
10
));
if
(
this
.
propBtnCon
.
hammerBtn
.
propNumShow
.
count
<=
0
)
{
if
(
this
.
propBtnCon
.
hammerBtn
.
propNumShow
.
count
<=
0
)
{
//购买弹框
//购买弹框
...
...
egret/src/something/class/Element.ts
View file @
16a4c359
...
@@ -280,7 +280,7 @@ export class Element extends eui.Component {
...
@@ -280,7 +280,7 @@ export class Element extends eui.Component {
}
}
}
}
initPongoMoveClip
(){
initPongoMoveClip
(){
console
.
log
(
"创建了一个猩猩"
);
console
.
log
(
"创建了一个猩猩"
,
this
.
pongoMoveClip
);
var
boxwidth
=
80
;
var
boxwidth
=
80
;
var
boxheight
=
80
;
var
boxheight
=
80
;
var
mvwidth
=
161
;
var
mvwidth
=
161
;
...
@@ -289,18 +289,63 @@ export class Element extends eui.Component {
...
@@ -289,18 +289,63 @@ export class Element extends eui.Component {
this
.
pongoMoveClip
.
x
=
(
boxwidth
-
mvwidth
)
/
2
;
this
.
pongoMoveClip
.
x
=
(
boxwidth
-
mvwidth
)
/
2
;
this
.
pongoMoveClip
.
y
=
(
boxheight
-
mvheight
)
/
2
;
this
.
pongoMoveClip
.
y
=
(
boxheight
-
mvheight
)
/
2
;
this
.
addChild
(
this
.
pongoMoveClip
);
this
.
addChild
(
this
.
pongoMoveClip
);
this
.
pongoMoveClip
.
gotoAndPlay
(
1
);
// this.pongoMoveClip.gotoAndPlay(1);
this
.
pongoMoveClip
.
gotoAndStop
(
1
);
this
.
noseeimgs
=
new
Array
();
this
.
noseeimgs
=
new
Array
();
this
.
lessPart
=
[
"tl"
,
"tr"
,
"bl"
,
"br"
];
this
.
lessPart
=
[
"tl"
,
"tr"
,
"bl"
,
"br"
];
this
.
pongoMoveClip
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
pongoFrameAni
,
this
);
this
.
pongoMoveClip
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
pongoFrameAni
,
this
);
egret
.
ticker
.
$startTick
(
this
.
update
,
this
);
egret
.
ticker
.
$startTick
(
this
.
update
,
this
);
}
}
//调整猩猩显示
changePongoStop
(
type
:
string
){
var
curframe
=
this
.
pongoMoveClip
.
currentFrame
;
console
.
log
(
"当前猩猩cur"
+
curframe
);
if
(
type
==
"add"
){
curframe
+=
10
;
}
else
if
(
type
==
"cut"
){
curframe
-=
10
;
}
if
(
curframe
>=
481
){
curframe
=
481
;
}
else
if
(
curframe
<=
1
){
curframe
=
1
;
}
this
.
pongoMoveClip
.
gotoAndStop
(
curframe
);
}
/**
* 脚草的动画单独
*
* 上部俩手都在 tl,tr-------1-101;
*
*/
//猩猩当前应处于的播放状态
//猩猩当前应处于的播放状态
//控制猩猩的播放
//控制猩猩的播放
ispongoMvloop
:
boolean
=
false
;
pongoMvstart
:
number
=
1
;
pongoMvend
:
number
=
101
;
pongoFrameAni
(){
pongoFrameAni
(){
var
curframe
=
this
.
pongoMoveClip
.
currentFrame
;
var
curframe
=
this
.
pongoMoveClip
.
currentFrame
;
//检测当前
//检测当前
if
(
this
.
lessPart
.
indexOf
(
"tl"
)
!=-
1
&&
this
.
lessPart
.
indexOf
(
"tr"
)
!=-
1
){
this
.
ispongoMvloop
=
true
;
this
.
pongoMvstart
=
1
;
this
.
pongoMvend
=
101
;
}
if
(
curframe
<
this
.
pongoMvend
&&!
this
.
pongoMoveClip
.
isPlaying
){
console
.
log
(
"检测到动画暂停,继续播放"
);
this
.
pongoMoveClip
.
gotoAndPlay
(
curframe
,
1
);
}
if
(
curframe
==
(
this
.
pongoMvend
-
1
)){
if
(
this
.
ispongoMvloop
){
console
.
log
(
"重播猩猩"
);
this
.
pongoMoveClip
.
gotoAndPlay
(
this
.
pongoMvstart
,
1
);
}
else
{
this
.
pongoMoveClip
.
gotoAndStop
(
this
.
pongoMvend
);
}
}
}
}
changePongoStat
(
part
:
string
,
lock
:
string
=
"free"
){
changePongoStat
(
part
:
string
,
lock
:
string
=
"free"
){
var
partIarr
:
Array
<
number
>
=
[];
var
partIarr
:
Array
<
number
>
=
[];
...
...
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