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
e297bc12
Commit
e297bc12
authored
Feb 27, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
ea56c329
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
33 additions
and
9 deletions
+33
-9
ele36.png
egret/resource/assets/mainScene/ele36.png
+0
-0
startpanel_ele36.png
egret/resource/assets/startpanel2/startpanel_ele36.png
+0
-0
sand_dis.svga
egret/resource/assets/svgas/sand_dis.svga
+0
-0
sand_move.svga
egret/resource/assets/svgas/sand_move.svga
+0
-0
sand_standby.svga
egret/resource/assets/svgas/sand_standby.svga
+0
-0
createSandDisAni.ts
egret/src/effect/createSandDisAni.ts
+16
-0
MainScene.ts
egret/src/mainScene/MainScene.ts
+5
-3
MapScene.ts
egret/src/mapScene/MapScene.ts
+3
-0
Sand.ts
egret/src/something/Sand.ts
+9
-6
No files found.
egret/resource/assets/mainScene/ele36.png
View replaced file @
ea56c329
View file @
e297bc12
8.73 KB
|
W:
|
H:
7.26 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/resource/assets/startpanel2/startpanel_ele36.png
View replaced file @
ea56c329
View file @
e297bc12
8.73 KB
|
W:
|
H:
7.26 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/resource/assets/svgas/sand_dis.svga
0 → 100644
View file @
e297bc12
File added
egret/resource/assets/svgas/sand_move.svga
0 → 100644
View file @
e297bc12
File added
egret/resource/assets/svgas/sand_standby.svga
0 → 100644
View file @
e297bc12
File added
egret/src/effect/createSandDisAni.ts
0 → 100644
View file @
e297bc12
import
getResPath
from
"../../libs/new_tc/getResPath"
;
import
{
loadSvga
}
from
"../loadSvga"
;
export
const
createSandDisAni
=
async
(
x
,
y
,
p
)
=>
{
const
movieclip
:
any
=
await
loadSvga
(
getResPath
()
+
'resource/assets/svgas/sand_dis.svga'
);
p
.
addChild
(
movieclip
);
movieclip
.
anchorOffsetX
=
100
;
movieclip
.
anchorOffsetY
=
100
;
// movieclip.scaleX=movieclip.scaleY=0.5;
movieclip
.
x
=
x
;
movieclip
.
y
=
y
;
movieclip
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
if
(
movieclip
.
parent
)
movieclip
.
parent
.
removeChild
(
movieclip
);
},
this
);
}
\ No newline at end of file
egret/src/mainScene/MainScene.ts
View file @
e297bc12
...
...
@@ -101,6 +101,7 @@ import { createHoneyDisAni } from '../effect/createHoneyDisAni';
import
Sand
,
{
getSandDisplayBlock
}
from
'../something/Sand'
;
import
{
SandAni
}
from
'../something/anis/SandAni'
;
import
doSandAI
from
'./doSandAI'
;
import
{
createSandDisAni
}
from
'../effect/createSandDisAni'
;
const
aniClass
=
{
"BoomAni"
:
BoomAni
,
...
...
@@ -3049,7 +3050,7 @@ export default class MainScene extends Scene {
* 格子上的冰块破碎
* @param lat
*/
iceBroken
(
lat
:
Lattice
)
{
checkLatt
iceBroken
(
lat
:
Lattice
)
{
if
(
!
lat
)
return
;
if
(
lat
.
ice
)
{
//带冰的lattice
const
ice
=
lat
.
ice
;
...
...
@@ -3084,7 +3085,8 @@ export default class MainScene extends Scene {
this
.
goElementTarget
(
ElementType
.
SAND
,
[
lat
.
sand
.
x
,
lat
.
sand
.
y
]);
lat
.
sand
=
null
;
const
p
=
Tool
.
getPositionByIndex
(
lat
.
index
);
this
.
playAni
(
RecoverName
.
SAND_ANI
,
p
);
// this.playAni(RecoverName.SAND_ANI, p);
createSandDisAni
(
p
[
0
],
p
[
1
],
this
)
}
}
...
...
@@ -3177,7 +3179,7 @@ export default class MainScene extends Scene {
//检查附近所有元素
checkNebAll
(
latttice
:
Lattice
,
ele
?:
Element
)
{
//如果格子有冰
this
.
iceBroken
(
latttice
);
this
.
checkLatt
iceBroken
(
latttice
);
this
.
checkFireworksNebEle
(
latttice
,
ele
);
this
.
checkFishNebEle
(
latttice
);
//如果附近有石头
...
...
egret/src/mapScene/MapScene.ts
View file @
e297bc12
...
...
@@ -426,6 +426,9 @@ export default class MapScene extends Scene {
loadSvga
(
getResPath
()
+
'resource/assets/svgas/honeypot_dispear.svga'
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/honeypot_change.svga'
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/honeypot_bubble.svga'
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/sand_standby.svga'
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/sand_move.svga'
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/sand_dis.svga'
);
// loadSvga(getResPath() + 'resource/assets/svgas/fireworks.svga');
if
(
!
window
[
'development'
])
{
...
...
egret/src/something/Sand.ts
View file @
e297bc12
import
centerAnchor
from
"./block/centerAnchor"
;
import
getResPath
from
"../../libs/new_tc/getResPath"
;
import
{
loadSvga
}
from
"../loadSvga"
;
export
default
class
Sand
extends
egret
.
Sprite
{
constructor
()
{
super
();
this
.
initSvga
();
}
const
sand
=
new
egret
.
Bitmap
(
RES
.
getRes
(
"ele36_png"
));
this
.
addChild
(
sand
)
;
centerAnchor
(
sand
);
async
initSvga
()
{
const
movieclip
:
any
=
await
loadSvga
(
getResPath
()
+
'resource/assets/svgas/sand_standby.svga'
);
movieclip
.
anchorOffsetX
=
78
/
2
;
movieclip
.
anchorOffsetY
=
78
/
2
;
this
.
addChild
(
movieclip
);
}
}
...
...
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