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
8783010d
Commit
8783010d
authored
Mar 27, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix20200330_' of
http://gitlab2.dui88.com/wanghongyuan/xiaoxiaole
into 新增炮台
parents
ff43736c
c6af1c52
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
1 deletion
+35
-1
canno.svga
egret/resource/assets/svgas/canno.svga
+0
-0
cannofire.svga
egret/resource/assets/svgas/cannofire.svga
+0
-0
cannolight.svga
egret/resource/assets/svgas/cannolight.svga
+0
-0
cannoparticle.svga
egret/resource/assets/svgas/cannoparticle.svga
+0
-0
MainScene.ts
egret/src/mainScene/MainScene.ts
+5
-1
Element.ts
egret/src/something/class/Element.ts
+30
-0
No files found.
egret/resource/assets/svgas/canno.svga
0 → 100644
View file @
8783010d
File added
egret/resource/assets/svgas/cannofire.svga
0 → 100644
View file @
8783010d
File added
egret/resource/assets/svgas/cannolight.svga
0 → 100644
View file @
8783010d
File added
egret/resource/assets/svgas/cannoparticle.svga
0 → 100644
View file @
8783010d
File added
egret/src/mainScene/MainScene.ts
View file @
8783010d
...
@@ -411,8 +411,12 @@ export default class MainScene extends Scene {
...
@@ -411,8 +411,12 @@ export default class MainScene extends Scene {
var
svgas
=
[
"amazing"
,
"great"
,
"wonderful"
,
"bonusTime"
];
var
svgas
=
[
"amazing"
,
"great"
,
"wonderful"
,
"bonusTime"
];
//如果有节日的加
//如果有节日的加
if
(
this
.
festivalTarget
)
svgas
.
push
(
"redBombLight"
);
if
(
this
.
festivalTarget
)
svgas
.
push
(
"redBombLight"
);
svgas
.
push
(...[
"canno"
,
"cannofire"
,
"cannolight"
,
"cannoparticle"
]);
//新增大炮的动画
for
(
let
i
=
0
;
i
<
svgas
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
svgas
.
length
;
i
++
)
{
if
(
movieClips
[
svgas
[
i
]])
continue
;
if
(
movieClips
[
svgas
[
i
]])
continue
;
let
mvname
=
svgas
[
i
];
svgaParser
.
load
(
resPath
+
'resource/assets/svgas/'
+
svgas
[
i
]
+
".svga"
,
(
videoItem
)
=>
{
svgaParser
.
load
(
resPath
+
'resource/assets/svgas/'
+
svgas
[
i
]
+
".svga"
,
(
videoItem
)
=>
{
var
mv
=
new
window
[
"SVGA"
].
EgretMovieClip
(
videoItem
);
var
mv
=
new
window
[
"SVGA"
].
EgretMovieClip
(
videoItem
);
mv
.
lockStep
=
true
;
mv
.
lockStep
=
true
;
...
@@ -424,7 +428,7 @@ export default class MainScene extends Scene {
...
@@ -424,7 +428,7 @@ export default class MainScene extends Scene {
let
fun
;
let
fun
;
mv
.
addEventListener
(
egret
.
Event
.
COMPLETE
,
fun
=
function
(
e
)
{
mv
.
addEventListener
(
egret
.
Event
.
COMPLETE
,
fun
=
function
(
e
)
{
e
.
target
.
stop
()
e
.
target
.
stop
()
if
(
e
.
target
.
parent
)
{
if
(
e
.
target
.
parent
&&
mvname
!=
"canno"
)
{
e
.
target
.
parent
.
removeChild
(
e
.
target
)
e
.
target
.
parent
.
removeChild
(
e
.
target
)
}
}
},
this
)
},
this
)
...
...
egret/src/something/class/Element.ts
View file @
8783010d
...
@@ -35,11 +35,17 @@ import { Fish } from "./Fish";
...
@@ -35,11 +35,17 @@ import { Fish } from "./Fish";
* 坐标原点需要坐落在格子的中心点
* 坐标原点需要坐落在格子的中心点
* 最好到时按,底图,动效,气泡,笼子,毛球,进行分层,如果多个状态要共存时,必须分层,到时气泡的动画,要写再自己的层里
* 最好到时按,底图,动效,气泡,笼子,毛球,进行分层,如果多个状态要共存时,必须分层,到时气泡的动画,要写再自己的层里
*/
*/
//加载器
let
svgaParser
;
export
class
Element
extends
eui
.
Component
{
export
class
Element
extends
eui
.
Component
{
private
_fishState
=
0
;
private
_fishState
=
0
;
private
_isNeb
:
boolean
;
//是否
private
_isNeb
:
boolean
;
//是否
get
isNeb
()
{
return
this
.
_isNeb
}
get
isNeb
()
{
return
this
.
_isNeb
}
fishCanEliFlag
:
boolean
;
fishCanEliFlag
:
boolean
;
cannoMoveClip
:
any
;
//尝试设置碰撞状态,如果之前被特效集中,那么可以设置碰撞状态。碰撞状态之后可以准备消除。
//尝试设置碰撞状态,如果之前被特效集中,那么可以设置碰撞状态。碰撞状态之后可以准备消除。
setFishNebFlag
()
{
setFishNebFlag
()
{
if
(
this
.
_fishState
>
0
)
{
if
(
this
.
_fishState
>
0
)
{
...
@@ -421,7 +427,9 @@ export class Element extends eui.Component {
...
@@ -421,7 +427,9 @@ export class Element extends eui.Component {
this
.
cannolab
.
x
=
0
;
this
.
cannolab
.
x
=
0
;
this
.
cannolab
.
y
=
0
;
this
.
cannolab
.
y
=
0
;
this
.
addChild
(
this
.
cannolab
);
this
.
addChild
(
this
.
cannolab
);
this
.
cannolab
.
visible
=
type
==
ElementType
.
CANNO
;
this
.
cannolab
.
visible
=
type
==
ElementType
.
CANNO
;
this
.
showImage
.
visible
=
type
!=
ElementType
.
CANNO
;
//鸡蛋
//鸡蛋
if
(
type
==
ElementType
.
CHICKEN_EGG
)
{
if
(
type
==
ElementType
.
CHICKEN_EGG
)
{
this
.
chickenEgg
=
Pool
.
takeOut
(
RecoverName
.
CHICKEN_EGG
)
this
.
chickenEgg
=
Pool
.
takeOut
(
RecoverName
.
CHICKEN_EGG
)
...
@@ -443,6 +451,26 @@ export class Element extends eui.Component {
...
@@ -443,6 +451,26 @@ export class Element extends eui.Component {
}
}
this
.
addChild
(
this
.
festivalEle
)
this
.
addChild
(
this
.
festivalEle
)
}
}
this
.
createCanno
();
}
//添加炮台
createCanno
(){
if
(
this
.
type
==
ElementType
.
CANNO
){
if
(
this
.
cannoMoveClip
){
return
;
}
if
(
!
svgaParser
)
svgaParser
=
new
window
[
"SVGA"
].
Parser
();
svgaParser
.
load
(
resPath
+
'resource/assets/svgas/canno.svga'
,
(
videoItem
)
=>
{
this
.
cannoMoveClip
=
new
window
[
"SVGA"
].
EgretMovieClip
(
videoItem
);
this
.
cannoMoveClip
.
lockStep
=
true
;
this
.
cannoMoveClip
.
x
=
0
;
this
.
cannoMoveClip
.
y
=
0
;
console
.
log
(
"paotai"
,
this
.
cannoMoveClip
);
});
}
}
}
/**
/**
...
@@ -484,6 +512,8 @@ export class Element extends eui.Component {
...
@@ -484,6 +512,8 @@ export class Element extends eui.Component {
//类型重置,showImage修改
//类型重置,showImage修改
this
.
_type
=
type
;
this
.
_type
=
type
;
this
.
cannolab
.
visible
=
type
==
ElementType
.
CANNO
;
this
.
cannolab
.
visible
=
type
==
ElementType
.
CANNO
;
this
.
showImage
.
visible
=
type
!=
ElementType
.
CANNO
;
this
.
changeSource
(
"ele"
+
type
+
"_png"
);
this
.
changeSource
(
"ele"
+
type
+
"_png"
);
//特效重置
//特效重置
...
...
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