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
ec4320e0
Commit
ec4320e0
authored
May 27, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
动画暂存
parent
87214290
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
MainScene.ts
egret/src/mainScene/MainScene.ts
+7
-7
foodAni.ts
egret/src/something/anis/foodAni.ts
+2
-2
No files found.
egret/src/mainScene/MainScene.ts
View file @
ec4320e0
...
@@ -7038,7 +7038,7 @@ export default class MainScene extends Scene {
...
@@ -7038,7 +7038,7 @@ export default class MainScene extends Scene {
// Pool.recover(RecoverName.FOOD,ifood);
// Pool.recover(RecoverName.FOOD,ifood);
// }
// }
this
.
addFreeiceFoodArr
(
ifoodname
,
ifood
.
freeidxs
);
this
.
addFreeiceFoodArr
(
ifoodname
,
ifood
.
freeidxs
);
console
.
log
(
"食物自由了,消除上面的动物,播放食物自由动画"
);
//
console.log("食物自由了,消除上面的动物,播放食物自由动画");
//食物动效播完,进行食物的通关目标完成
//食物动效播完,进行食物的通关目标完成
// this.goElementTarget(ifood.type,[ifood.x,ifood.y]);
// this.goElementTarget(ifood.type,[ifood.x,ifood.y]);
...
@@ -7165,7 +7165,7 @@ export default class MainScene extends Scene {
...
@@ -7165,7 +7165,7 @@ export default class MainScene extends Scene {
}
}
//食物通关目标动画1段
//食物通关目标动画1段
playElfoodAni1
(
type
:
ElementType
,
fromP
:
number
[]){
playElfoodAni1
(
type
:
ElementType
,
fromP
:
number
[]){
console
.
log
(
"食物动画一段"
,
type
);
//
console.log("食物动画一段",type);
if
(
this
.
passElements
[
type
]
!=
undefined
){
if
(
this
.
passElements
[
type
]
!=
undefined
){
if
(
this
.
passElements
[
type
]
!=
0
){
if
(
this
.
passElements
[
type
]
!=
0
){
this
.
passElements
[
type
]
--
;
this
.
passElements
[
type
]
--
;
...
@@ -7212,7 +7212,7 @@ export default class MainScene extends Scene {
...
@@ -7212,7 +7212,7 @@ export default class MainScene extends Scene {
}
else
if
(
time1
>
500
){
}
else
if
(
time1
>
500
){
time1
=
500
;
time1
=
500
;
}
}
console
.
log
(
"位移时间"
,
time1
);
//
console.log("位移时间",time1);
foodani1
.
setData
(
mv
,
p1
,
p2
,
p3
,
this
,
this
.
playElfoodAni2
,
type
,
1
,
"ani1"
,
time1
);
foodani1
.
setData
(
mv
,
p1
,
p2
,
p3
,
this
,
this
.
playElfoodAni2
,
type
,
1
,
"ani1"
,
time1
);
...
@@ -7222,7 +7222,7 @@ export default class MainScene extends Scene {
...
@@ -7222,7 +7222,7 @@ export default class MainScene extends Scene {
//食物通关目标动画2段
//食物通关目标动画2段
async
playElfoodAni2
(
mv
:
any
,
type
:
ElementType
,
mainscene
:
MainScene
){
async
playElfoodAni2
(
mv
:
any
,
type
:
ElementType
,
mainscene
:
MainScene
){
console
.
log
(
"食物动画二段"
,
type
);
//
console.log("食物动画二段",type);
var
pro
=
new
Promise
(
resolve
=>
{
var
pro
=
new
Promise
(
resolve
=>
{
let
compfunc
=
function
(
e
){
let
compfunc
=
function
(
e
){
...
@@ -7234,7 +7234,7 @@ export default class MainScene extends Scene {
...
@@ -7234,7 +7234,7 @@ export default class MainScene extends Scene {
mv
.
gotoAndPlay
(
1
,
1
);
mv
.
gotoAndPlay
(
1
,
1
);
})
})
await
pro
;
await
pro
;
console
.
log
(
"二段播放完毕,开始第三段"
);
//
console.log("二段播放完毕,开始第三段");
var
foodani2
=
new
foodAni
();
var
foodani2
=
new
foodAni
();
var
p1
=
new
egret
.
Point
(
mv
.
x
,
mv
.
y
);
var
p1
=
new
egret
.
Point
(
mv
.
x
,
mv
.
y
);
...
@@ -7284,7 +7284,7 @@ export default class MainScene extends Scene {
...
@@ -7284,7 +7284,7 @@ export default class MainScene extends Scene {
}
else
if
(
time1
>
500
){
}
else
if
(
time1
>
500
){
time1
=
500
;
time1
=
500
;
}
}
console
.
log
(
"位移时间"
,
time1
);
//
console.log("位移时间",time1);
foodani2
.
setData
(
mv
,
p1
,
p2
,
p3
,
mainscene
,
mainscene
.
playElfoodAni3
,
type
,
tscale
,
"ani2"
,
time1
);
foodani2
.
setData
(
mv
,
p1
,
p2
,
p3
,
mainscene
,
mainscene
.
playElfoodAni3
,
type
,
tscale
,
"ani2"
,
time1
);
}
}
//食物通关目标动画3段
//食物通关目标动画3段
...
@@ -7294,7 +7294,7 @@ export default class MainScene extends Scene {
...
@@ -7294,7 +7294,7 @@ export default class MainScene extends Scene {
if
(
mv
&&
mv
.
parent
){
if
(
mv
&&
mv
.
parent
){
mv
.
parent
.
removeChild
(
mv
);
mv
.
parent
.
removeChild
(
mv
);
}
}
console
.
log
(
mainscene
.
elementTargets
.
targets
[
type
]);
//
console.log(mainscene.elementTargets.targets[type]);
mainscene
.
inaniFood
=
false
;
mainscene
.
inaniFood
=
false
;
mainscene
.
eliminate
();
mainscene
.
eliminate
();
}
}
...
...
egret/src/something/anis/foodAni.ts
View file @
ec4320e0
...
@@ -48,8 +48,8 @@ export default class foodAni{
...
@@ -48,8 +48,8 @@ export default class foodAni{
});
});
if
(
aniname
==
"ani1"
){
if
(
aniname
==
"ani1"
){
var
stime1
=
Math
.
floor
(
time1
/
4
);
var
stime1
=
Math
.
floor
(
time1
/
4
);
egret
.
Tween
.
get
(
mv
).
to
({
scaleX
:
0.9
,
scaleY
:
1.1
},
stime1
*
2
,
egret
.
Ease
.
sineIn
).
call
(()
=>
{
egret
.
Tween
.
get
(
mv
).
to
({
scaleX
:
1
,
scaleY
:
0.9
},
stime1
,
egret
.
Ease
.
sineIn
).
call
(()
=>
{
egret
.
Tween
.
get
(
mv
).
to
({
scaleX
:
1
,
scaleY
:
1
},
stime1
*
2
,
egret
.
Ease
.
sineIn
).
call
(()
=>
{
egret
.
Tween
.
get
(
mv
).
to
({
scaleX
:
1
,
scaleY
:
1
},
stime1
*
3
,
egret
.
Ease
.
sineIn
).
call
(()
=>
{
// egret.Tween.get(mv).to({
// egret.Tween.get(mv).to({
// scaleX: 0.9618,
// scaleX: 0.9618,
// scaleY: 1.0618
// scaleY: 1.0618
...
...
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