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
50d6ea08
Commit
50d6ea08
authored
Feb 27, 2020
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
0907319a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
5 deletions
+66
-5
MapScene.ts
egret/src/mapScene/MapScene.ts
+5
-4
ShareCodePanel.ts
egret/src/panels/ShareCodePanel.ts
+2
-0
EleDisAni.ts
egret/src/something/anis/EleDisAni.ts
+59
-1
No files found.
egret/src/mapScene/MapScene.ts
View file @
50d6ea08
...
...
@@ -70,10 +70,11 @@ export default class MapScene extends Scene {
var
codeMsgs
=
{
//具体code还没给
"2002002016"
:
"不可以给自己助力哦~"
,
//
"2002002036"
:
"已经给好友助力过了哦~"
,
"2002002037"
:
"已经给好友助力过了哦~"
,
//
"2002002037": "已经给好友助力过了哦~",
"2002002025"
:
"今日助力次数已达上限啦!"
,
//新加的
//新加的,还没给,其他的都用助力失败
"2002002013"
:
"口令无效,请复制正确的口令!"
,
"2002002015"
:
"口令不存在"
,
}
showToast
(
res
&&
codeMsgs
[
res
.
code
]
?
codeMsgs
[
res
.
code
]
:
"助力失败"
);
}
...
...
@@ -452,7 +453,7 @@ export default class MapScene extends Scene {
// this['guide'].visible = false;
// return;
// }
if
(
this
[
'actsShowBtn'
].
visible
)
if
(
this
[
'actsShowBtn'
].
visible
)
this
[
'guide'
].
visible
=
true
;
// });
...
...
egret/src/panels/ShareCodePanel.ts
View file @
50d6ea08
...
...
@@ -121,6 +121,8 @@ class ShareCodePanel extends ComponentBase {
start
()
{
super
.
start
();
this
.
height
=
this
.
stage
.
stageHeight
;
//字体修改
this
.
msg
.
fontFamily
=
"FZY3JW"
//
// if (!document.getElementById("kouling")){
// var a='<div id="kouling" style="display:none" data-clipboard-text=""></div>';
...
...
egret/src/something/anis/EleDisAni.ts
View file @
50d6ea08
import
{
Ani
}
from
"../class/Ani"
;
import
{
ImageAni
}
from
"../class/ImageAni"
;
import
{
ElementType
,
FiveBaseElementTypes
}
from
"../enum/ElementType"
;
import
{
Pool
}
from
"../Pool"
;
//原点已是中心
export
class
EleDisAni
extends
Ani
{
...
...
@@ -27,3 +29,59 @@ export class EleDisAni extends Ani {
})
}
}
var
recoverName
:
string
=
"EleDisAniNew"
;
/**
* 新增5种普通消除动效
* 不继承Ani了,自己回收
*/
class
EleDisAniNew
extends
egret
.
DisplayObjectContainer
{
/**
* 粗犷一点吧
*/
showImage0
:
ImageAni
;
showImage1
:
ImageAni
;
showImage2
:
ImageAni
;
showImage3
:
ImageAni
;
showImage4
:
ImageAni
;
constructor
()
{
super
()
for
(
var
i
=
0
;
i
<
5
;
i
++
)
{
var
arr
=
[]
for
(
var
j
=
1
;
j
<=
19
;
j
++
)
arr
.
push
(
"eleDisNew"
+
i
+
"_"
+
j
+
"_png"
);
//改图片
this
[
"showImage"
+
i
]
=
new
ImageAni
(
arr
);
this
[
"showImage"
+
i
].
visible
=
false
;
this
.
addChild
(
this
[
"showImage"
+
i
])
}
}
play
(
type
:
ElementType
)
{
//如果不是5种基础元素,就用第0种
if
(
FiveBaseElementTypes
.
indexOf
(
type
)
<
0
)
type
=
ElementType
.
RABBIT
;
var
target
:
ImageAni
=
this
[
"showImage"
+
type
];
target
.
visible
=
true
;
target
.
currentFrame
=
0
;
target
.
source
=
target
.
sourceAll
[
0
];
target
.
play
(()
=>
{
target
.
visible
=
false
;
if
(
this
.
parent
)
this
.
parent
.
removeChild
(
this
);
Pool
.
recover
(
recoverName
,
this
);
})
}
}
/**
* 新加的方法,直接调用播放消除动效
* @param type 5种基础类型
* @param p 位置信息
*/
export
function
playEleDisAniNew
(
type
:
ElementType
,
p
:
number
[])
{
let
ani
:
EleDisAniNew
=
Pool
.
takeOut
(
recoverName
);
if
(
!
ani
)
ani
=
new
EleDisAniNew
();
ani
.
x
=
p
[
0
];
ani
.
y
=
p
[
1
];
ani
.
play
(
type
);
return
ani
;
}
\ No newline at end of file
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