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
10ce2672
Commit
10ce2672
authored
Sep 23, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Plain Diff
:wq
:wq `erge branch 'dev' of gitlab2.dui88.com:wanghongyuan/xiaoxiaole into dev
parents
2423e91a
ea4871ac
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
11 deletions
+53
-11
Tool.ts
egret/src/something/Tool.ts
+1
-1
MagicLionAni.ts
egret/src/something/anis/MagicLionAni.ts
+25
-9
Element.ts
egret/src/something/class/Element.ts
+7
-0
MagicLionBgAni.ts
egret/src/something/periodAni/MagicLionBgAni.ts
+20
-1
No files found.
egret/src/something/Tool.ts
View file @
10ce2672
...
...
@@ -374,7 +374,7 @@ export class Tool {
//与右交换,先确定col!=Tool.colNum-1,不是最右排元素8
if
(
col
!=
Tool
.
colNum
-
1
)
{
var
latRight
=
lattices
[
i
+
1
];
//能交换,并且类型不一致
//能交换,并且类型不一致
,并未判断latRight是否judgeMatch,也就是未判断是否魔力鸟,但是不影响
if
(
judgeFall
(
latRight
)
&&
lat
.
element
.
type
!=
latRight
.
element
.
type
)
{
//判断向右,+2,+3 lat 先确定col<Tool.colNum - 3
if
(
col
<
Tool
.
colNum
-
3
)
{
...
...
egret/src/something/anis/MagicLionAni.ts
View file @
10ce2672
...
...
@@ -2,18 +2,32 @@ import { Ani } from "../class/Ani";
//已是中心原点
export
class
MagicLionAni
extends
Ani
{
downImage
:
egret
.
Bitmap
;
downImage
:
egret
.
DisplayObjectContainer
;
upImage
:
egret
.
Bitmap
;
constructor
()
{
super
()
this
.
aniName
=
"MagicLionAni"
;
//下图
this
.
downImage
=
new
egret
.
DisplayObjectContainer
();
this
.
downImage
.
scaleX
=
this
.
downImage
.
scaleY
=
0.7
;
this
.
addChild
(
this
.
downImage
)
var
texture
:
egret
.
Texture
=
RES
.
getRes
(
"magicLionBg_png"
)
this
.
downImage
=
new
egret
.
Bitmap
(
texture
);
this
.
downImage
.
anchorOffsetX
=
texture
.
textureWidth
/
2
;
this
.
downImage
.
anchorOffsetY
=
texture
.
textureHeight
/
2
;
this
.
downImage
.
scaleX
=
this
.
downImage
.
scaleY
=
0.7
this
.
addChild
(
this
.
downImage
);
let
one
=
new
egret
.
Bitmap
(
texture
);
one
.
anchorOffsetX
=
texture
.
textureWidth
/
2
;
one
.
anchorOffsetY
=
texture
.
textureHeight
/
2
;
this
.
downImage
.
addChild
(
one
);
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
()
=>
{
one
.
rotation
-=
5
;
},
this
);
let
other
=
new
egret
.
Bitmap
(
texture
);
other
.
anchorOffsetX
=
texture
.
textureWidth
/
2
;
other
.
anchorOffsetY
=
texture
.
textureHeight
/
2
;
this
.
downImage
.
addChild
(
other
);
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
()
=>
{
other
.
rotation
-=
5
;
},
this
);
//上图
var
texture
:
egret
.
Texture
=
RES
.
getRes
(
"magicLion_png"
)
this
.
upImage
=
new
egret
.
Bitmap
(
texture
);
...
...
@@ -21,7 +35,9 @@ export class MagicLionAni extends Ani {
this
.
upImage
.
anchorOffsetY
=
texture
.
textureHeight
/
2
;
// this.upImage.scaleX = this.upImage.scaleY = 0.7
this
.
addChild
(
this
.
upImage
);
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
)
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
()
=>
{
this
.
upImage
.
rotation
+=
2
;
},
this
)
}
private
onEnterFrame
()
{
this
.
downImage
.
rotation
+=
5
;
...
...
@@ -43,7 +59,7 @@ export class MagicLionAni extends Ani {
})
egret
.
Tween
.
get
(
this
.
upImage
)
.
to
({
scaleX
:
1
,
scaleY
:
1
},
300
)
.
to
({
scaleX
:
0
,
scaleY
:
0
,
alpha
:
0
},
200
)
.
to
({
scaleX
:
0
,
scaleY
:
0
,
alpha
:
0
},
200
)
}
}
\ No newline at end of file
egret/src/something/class/Element.ts
View file @
10ce2672
...
...
@@ -146,6 +146,13 @@ export class Element extends eui.Component {
this
.
showImage
.
x
=
-
texture
.
textureWidth
/
2
;
this
.
showImage
.
y
=
-
texture
.
textureHeight
/
2
;
//特殊逻辑,因为魔力鸟动效要旋转,所以隐藏原图showImage
if
(
source
==
"magicLion_png"
)
{
this
.
showImage
.
alpha
=
0
;
}
else
{
this
.
showImage
.
alpha
=
1
;
}
}
reset
(
type
:
ElementType
)
{
...
...
egret/src/something/periodAni/MagicLionBgAni.ts
View file @
10ce2672
...
...
@@ -10,7 +10,26 @@ export class MagicLionBgAni extends egret.DisplayObjectContainer {
this
.
showImage
.
anchorOffsetY
=
texture
.
textureHeight
/
2
;
this
.
showImage
.
scaleX
=
this
.
showImage
.
scaleY
=
0.7
this
.
addChild
(
this
.
showImage
);
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
)
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
let
other
=
new
egret
.
Bitmap
(
texture
);
other
.
anchorOffsetX
=
texture
.
textureWidth
/
2
;
other
.
anchorOffsetY
=
texture
.
textureHeight
/
2
;
other
.
scaleX
=
other
.
scaleY
=
0.7
this
.
addChild
(
other
);
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
()
=>
{
other
.
rotation
-=
5
;
},
this
);
var
upTexture
:
egret
.
Texture
=
RES
.
getRes
(
"magicLion_png"
)
let
up
=
new
egret
.
Bitmap
(
upTexture
);
up
.
anchorOffsetX
=
upTexture
.
textureWidth
/
2
;
up
.
anchorOffsetY
=
upTexture
.
textureHeight
/
2
;
this
.
addChild
(
up
);
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
()
=>
{
up
.
rotation
+=
2
;
},
this
);
}
private
onEnterFrame
()
{
this
.
showImage
.
rotation
+=
5
;
...
...
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