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
51f8a615
Commit
51f8a615
authored
Jan 10, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
7436da46
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
13 deletions
+17
-13
Tool.ts
egret/src/something/Tool.ts
+3
-0
Element.ts
egret/src/something/class/Element.ts
+14
-13
No files found.
egret/src/something/Tool.ts
View file @
51f8a615
...
...
@@ -274,6 +274,7 @@ export class Tool {
lat
.
element
.
hasState
(
StateType
.
LOCK
)
||
lat
.
element
.
hasState
(
StateType
.
BLOCK_LOCK
)
||
lat
.
element
.
type
==
ElementType
.
JELLY
||
lat
.
element
.
type
==
ElementType
.
JELLY_MONSTER
||
lat
.
element
.
type
==
ElementType
.
CHICKEN_EGG
||
lat
.
element
.
type
==
ElementType
.
FESTIVALELE_BIG
//||
// lat.element.type == ElementType.FESTIVALELE_SMALL
...
...
@@ -297,6 +298,7 @@ export class Tool {
!
lat
.
element
.
hasState
(
StateType
.
HAIRBALLGREY
)
&&
!
lat
.
element
.
hasState
(
StateType
.
HAIRBALLBROWN
)
&&
!
lat
.
element
.
hasState
(
StateType
.
BLOCK_LOCK
)
&&
lat
.
element
.
type
!=
ElementType
.
JELLY_MONSTER
,
lat
.
element
.
type
!=
ElementType
.
FESTIVALELE_SMALL
)
{
return
true
...
...
@@ -411,6 +413,7 @@ export class Tool {
ele
.
hasState
(
StateType
.
HAIRBALLBLACK
)
||
ele
.
hasState
(
StateType
.
HAIRBALLBROWN
)
||
ele
.
type
==
ElementType
.
JELLY
||
ele
.
type
==
ElementType
.
JELLY_MONSTER
||
ele
.
type
==
ElementType
.
CHICKEN_EGG
||
ele
.
type
==
ElementType
.
FESTIVALELE_BIG
||
ele
.
type
==
ElementType
.
FESTIVALELE_SMALL
...
...
egret/src/something/class/Element.ts
View file @
51f8a615
...
...
@@ -60,9 +60,9 @@ export class Element extends eui.Component {
// egret.Tween.get(pic).set({ scaleX: 0, scaleY: 0 }).to({ scaleX: 1, scaleY: 1 }, 300);
// }
// }, this);
setInterval
(()
=>
{
setInterval
(()
=>
{
this
.
toAction
();
},
5000
);
},
5000
);
}
...
...
@@ -87,16 +87,17 @@ export class Element extends eui.Component {
this
.
toStandByAction
();
}
if
(
mv
.
currentFrame
==
391
)
{
const
tex
:
egret
.
Texture
=
RES
.
getRes
(
"ele20_png"
);
const
pic
=
new
egret
.
Bitmap
(
tex
);
pic
.
anchorOffsetX
=
tex
.
textureWidth
/
2
;
pic
.
anchorOffsetY
=
tex
.
textureHeight
;
pic
.
x
=
p
[
0
];
pic
.
y
=
p
[
1
];
this
.
stage
.
addChild
(
pic
);
egret
.
Tween
.
get
(
pic
).
set
({
scaleX
:
0
,
scaleY
:
0
}).
to
({
scaleX
:
1.1
,
scaleY
:
1.1
},
300
).
wait
(
1000
).
call
(()
=>
{
pic
.
parent
.
removeChild
(
pic
);
});
this
.
dispatchEvent
(
new
egret
.
Event
(
'onBlow'
));
// const tex: egret.Texture = RES.getRes("ele20_png");
// const pic = new egret.Bitmap(tex);
// pic.anchorOffsetX = tex.textureWidth / 2;
// pic.anchorOffsetY = tex.textureHeight;
// pic.x = p[0];
// pic.y = p[1];
// this.stage.addChild(pic);
// egret.Tween.get(pic).set({ scaleX: 0, scaleY: 0 }).to({ scaleX: 1.1, scaleY: 1.1 }, 300).wait(1000).call(()=>{
// pic.parent.removeChild(pic);
// });
}
};
this
.
_mv
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
cb
,
this
);
...
...
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