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
163b615b
Commit
163b615b
authored
Feb 06, 2020
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
2fb1cffe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
3 deletions
+72
-3
FesRedShootAni.ts
egret/src/something/anisCall/FesRedShootAni.ts
+70
-3
FestivalEle.ts
egret/src/something/class/FestivalEle.ts
+2
-0
No files found.
egret/src/something/anisCall/FesRedShootAni.ts
View file @
163b615b
...
@@ -6,13 +6,80 @@ import { Element } from "../class/Element";
...
@@ -6,13 +6,80 @@ import { Element } from "../class/Element";
import
{
Tool
}
from
"../Tool"
;
import
{
Tool
}
from
"../Tool"
;
import
{
ElementType
}
from
"../enum/ElementType"
;
import
{
ElementType
}
from
"../enum/ElementType"
;
/**
* 情人节版本
*/
export
class
FesRedShootAni
extends
egret
.
DisplayObjectContainer
{
light
:
LightingAni
;
imageAni
:
ImageAni
;
imageAniCon
:
egret
.
DisplayObjectContainer
constructor
()
{
super
()
this
.
light
=
new
LightingAni
();
this
.
addChild
(
this
.
light
);
var
arr
=
[]
for
(
var
i
=
1
;
i
<=
10
;
i
++
)
{
arr
.
push
(
"fesEleSmallDis"
+
i
+
"_png"
);
}
this
.
imageAniCon
=
new
egret
.
DisplayObjectContainer
();
this
.
imageAni
=
new
ImageAni
(
arr
);
this
.
imageAniCon
.
addChild
(
this
.
imageAni
);
this
.
addChild
(
this
.
imageAniCon
);
this
.
imageAni
.
visible
=
false
}
reset
()
{
this
.
light
.
visible
=
true
;
this
.
imageAni
.
visible
=
false
;
this
.
light
.
scaleX
=
0.2
;
}
play
(
startP
:
number
[],
ele
:
Element
,
callback
:
Function
)
{
this
.
reset
()
//算角度
var
r
=
Tool
.
getForwardRotation
(
startP
,
[
ele
.
x
,
ele
.
y
])
this
.
light
.
rotation
=
r
*
180
/
Math
.
PI
;
this
.
light
.
x
=
startP
[
0
];
this
.
light
.
y
=
startP
[
1
];
this
.
imageAniCon
.
x
=
ele
.
x
;
this
.
imageAniCon
.
y
=
ele
.
y
;
//247
var
dis
=
Math
.
sqrt
(
(
startP
[
0
]
-
ele
.
x
)
*
(
startP
[
0
]
-
ele
.
x
)
+
(
startP
[
1
]
-
ele
.
y
)
*
(
startP
[
1
]
-
ele
.
y
)
)
var
scaleX
=
dis
/
247
;
egret
.
Tween
.
get
(
this
.
light
)
.
to
({
scaleX
:
scaleX
,
},
400
)
.
call
(()
=>
{
ele
.
reset
(
ElementType
.
FESTIVALELE_SMALL
);
ele
.
scaleX
=
ele
.
scaleY
=
0.1
egret
.
Tween
.
get
(
ele
)
.
to
({
scaleX
:
1
,
scaleY
:
1
},
500
,
egret
.
Ease
.
backOut
)
//回调
callback
();
this
.
imageAni
.
visible
=
true
;
this
.
imageAni
.
play
(()
=>
{
if
(
this
.
$parent
)
{
this
.
$parent
.
removeChild
(
this
)
};
Pool
.
recover
(
RecoverName
.
FESREDSHOOT_ANI
,
this
)
})
setTimeout
(()
=>
{
this
.
light
.
visible
=
false
;
},
200
)
})
}
}
export
const
stepPosition
:
number
[]
=
[
125
,
115
];
/**
/**
* 需要回调的
* 需要回调的
* 手动修改this.shoot.rotation=
* 手动修改this.shoot.rotation=
*/
*/
export
class
FesRedShootAni
extends
egret
.
DisplayObjectContainer
{
/*
export class FesRedShootAni extends egret.DisplayObjectContainer {
light: LightingAni;
light: LightingAni;
imageAni: ImageAni;
imageAni: ImageAni;
imageAniCon: egret.DisplayObjectContainer
imageAniCon: egret.DisplayObjectContainer
...
@@ -75,7 +142,7 @@ export class FesRedShootAni extends egret.DisplayObjectContainer {
...
@@ -75,7 +142,7 @@ export class FesRedShootAni extends egret.DisplayObjectContainer {
})
})
}
}
}
}
*/
...
...
egret/src/something/class/FestivalEle.ts
View file @
163b615b
...
@@ -121,8 +121,10 @@ function ani(b: egret.Bitmap) {
...
@@ -121,8 +121,10 @@ function ani(b: egret.Bitmap) {
b
.
scaleX
=
b
.
scaleY
=
1
;
b
.
scaleX
=
b
.
scaleY
=
1
;
b
.
rotation
=
-
90
;
b
.
rotation
=
-
90
;
egret
.
Tween
.
get
(
b
)
egret
.
Tween
.
get
(
b
)
.
wait
(
700
)
.
to
({
scaleX
:
0.33
,
scaleY
:
0.33
,
alpha
:
1
},
700
,
egret
.
Ease
.
backOut
)
.
to
({
scaleX
:
0.33
,
scaleY
:
0.33
,
alpha
:
1
},
700
,
egret
.
Ease
.
backOut
)
egret
.
Tween
.
get
(
b
)
egret
.
Tween
.
get
(
b
)
.
wait
(
700
)
.
to
({
rotation
:
0
},
700
,
egret
.
Ease
.
backOut
)
.
to
({
rotation
:
0
},
700
,
egret
.
Ease
.
backOut
)
}
}
//暂时只有一个就用40,和mainscene里的festivalIndex保持一致
//暂时只有一个就用40,和mainscene里的festivalIndex保持一致
...
...
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