Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
babycare_xiaoxiao
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
翁阳
babycare_xiaoxiao
Commits
97dd51fd
Commit
97dd51fd
authored
Jul 09, 2020
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
c1
parent
813ca7dc
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
86 additions
and
70 deletions
+86
-70
workspace.xml
.idea/workspace.xml
+30
-25
ProgressBar.ts
src/common/ProgressBar.ts
+3
-3
ProgressBarS.ts
src/common/ProgressBarS.ts
+2
-2
CheckBtn.ts
src/scene/map/CheckBtn.ts
+2
-2
MapUI.ts
src/scene/map/MapUI.ts
+8
-8
BubbleState.ts
src/something/states/BubbleState.ts
+9
-6
HairballBlackState.ts
src/something/states/HairballBlackState.ts
+9
-6
HairballBrownState.ts
src/something/states/HairballBrownState.ts
+12
-10
LockState.ts
src/something/states/LockState.ts
+11
-8
No files found.
.idea/workspace.xml
View file @
97dd51fd
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"9cef0552-af3c-4a1c-be1f-dc41ebe5b6db"
name=
"Default Changelist"
comment=
"111"
>
<change
afterPath=
"$PROJECT_DIR$/mock/miniTb/babycare.getIndex.json"
afterDir=
"false"
/>
<list
default=
"true"
id=
"9cef0552-af3c-4a1c-be1f-dc41ebe5b6db"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/
module/views/layers.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/module/views/layers
.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/
TaoBaoNet.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/TaoBaoNet
.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/
src/common/ProgressBar.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/common/ProgressBar
.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/
common/ProgressBarS.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/common/ProgressBarS
.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/scene/map/CheckBtn.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/scene/map/CheckBtn.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/scene/map/MapBottom.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/scene/map/MapBottom.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/scene/map/MapMid.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/scene/map/MapMid.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/scene/map/MapPart.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/scene/map/MapPart.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/scene/map/MapScene.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/scene/map/MapScene.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/scene/map/MapTop.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/scene/map/MapTop.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/scene/map/MapUI.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/scene/map/MapUI.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/something/states/BubbleState.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/something/states/BubbleState.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/something/states/HairballBlackState.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/something/states/HairballBlackState.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/something/states/HairballBrownState.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/something/states/HairballBrownState.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/something/states/LockState.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/something/states/LockState.ts"
afterDir=
"false"
/>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
...
@@ -102,7 +100,7 @@
<updated>
1594106513515
</updated>
<workItem
from=
"1594106517562"
duration=
"5224000"
/>
<workItem
from=
"1594111755267"
duration=
"29551000"
/>
<workItem
from=
"1594260676967"
duration=
"14
401
000"
/>
<workItem
from=
"1594260676967"
duration=
"14
897
000"
/>
</task>
<task
id=
"LOCAL-00001"
summary=
"111"
>
<created>
1594122339119
</created>
...
...
@@ -118,7 +116,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1594213388301
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"3"
/>
<task
id=
"LOCAL-00003"
summary=
"111"
>
<created>
1594279815824
</created>
<option
name=
"number"
value=
"00003"
/>
<option
name=
"presentableId"
value=
"LOCAL-00003"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1594279815824
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"4"
/>
<servers
/>
</component>
<component
name=
"TypeScriptGeneratedFilesManager"
>
...
...
@@ -137,26 +142,26 @@
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
x=
"251"
y=
"471"
key=
"ANALYSIS_DLG_com.intellij.analysis.BaseAnalysisAction$1/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1594113080922"
/>
<state
x=
"58"
y=
"183"
key=
"CommitChangelistDialog2"
timestamp=
"159427
7421161
"
>
<state
x=
"58"
y=
"183"
key=
"CommitChangelistDialog2"
timestamp=
"159427
9815598
"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
x=
"58"
y=
"183"
key=
"CommitChangelistDialog2/31.23.1889.1177@31.23.1889.1177"
timestamp=
"159427
7421161
"
/>
<state
width=
"879"
height=
"329"
key=
"GridCell.Tab.0.bottom"
timestamp=
"15942
6159232
7"
>
<state
x=
"58"
y=
"183"
key=
"CommitChangelistDialog2/31.23.1889.1177@31.23.1889.1177"
timestamp=
"159427
9815598
"
/>
<state
width=
"879"
height=
"329"
key=
"GridCell.Tab.0.bottom"
timestamp=
"15942
8019203
7"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
width=
"879"
height=
"329"
key=
"GridCell.Tab.0.bottom/31.23.1889.1177@31.23.1889.1177"
timestamp=
"15942
6159232
7"
/>
<state
width=
"879"
height=
"329"
key=
"GridCell.Tab.0.center"
timestamp=
"15942
6159232
6"
>
<state
width=
"879"
height=
"329"
key=
"GridCell.Tab.0.bottom/31.23.1889.1177@31.23.1889.1177"
timestamp=
"15942
8019203
7"
/>
<state
width=
"879"
height=
"329"
key=
"GridCell.Tab.0.center"
timestamp=
"15942
8019203
6"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
width=
"879"
height=
"329"
key=
"GridCell.Tab.0.center/31.23.1889.1177@31.23.1889.1177"
timestamp=
"15942
6159232
6"
/>
<state
width=
"879"
height=
"329"
key=
"GridCell.Tab.0.left"
timestamp=
"15942
61592326
"
>
<state
width=
"879"
height=
"329"
key=
"GridCell.Tab.0.center/31.23.1889.1177@31.23.1889.1177"
timestamp=
"15942
8019203
6"
/>
<state
width=
"879"
height=
"329"
key=
"GridCell.Tab.0.left"
timestamp=
"15942
80192034
"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
width=
"879"
height=
"329"
key=
"GridCell.Tab.0.left/31.23.1889.1177@31.23.1889.1177"
timestamp=
"15942
61592326
"
/>
<state
width=
"879"
height=
"329"
key=
"GridCell.Tab.0.right"
timestamp=
"15942
6159232
6"
>
<state
width=
"879"
height=
"329"
key=
"GridCell.Tab.0.left/31.23.1889.1177@31.23.1889.1177"
timestamp=
"15942
80192034
"
/>
<state
width=
"879"
height=
"329"
key=
"GridCell.Tab.0.right"
timestamp=
"15942
8019203
6"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
width=
"879"
height=
"329"
key=
"GridCell.Tab.0.right/31.23.1889.1177@31.23.1889.1177"
timestamp=
"15942
6159232
6"
/>
<state
width=
"879"
height=
"329"
key=
"GridCell.Tab.0.right/31.23.1889.1177@31.23.1889.1177"
timestamp=
"15942
8019203
6"
/>
<state
x=
"210"
y=
"320"
key=
"RollbackChangesDialog"
timestamp=
"1594173186663"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
...
...
@@ -165,10 +170,10 @@
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
x=
"31"
y=
"250"
key=
"SettingsEditor/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1594195630991"
/>
<state
x=
"92"
y=
"351"
key=
"Vcs.Push.Dialog.v2"
timestamp=
"15942
13389525
"
>
<state
x=
"92"
y=
"351"
key=
"Vcs.Push.Dialog.v2"
timestamp=
"15942
79817233
"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
x=
"92"
y=
"351"
key=
"Vcs.Push.Dialog.v2/31.23.1889.1177@31.23.1889.1177"
timestamp=
"15942
13389525
"
/>
<state
x=
"92"
y=
"351"
key=
"Vcs.Push.Dialog.v2/31.23.1889.1177@31.23.1889.1177"
timestamp=
"15942
79817233
"
/>
<state
x=
"87"
y=
"216"
key=
"com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser"
timestamp=
"1594111906161"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
...
...
@@ -177,9 +182,9 @@
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
x=
"157"
y=
"286"
key=
"run.anything.popup/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1594188122355"
/>
<state
x=
"640"
y=
"288"
width=
"670"
height=
"676"
key=
"search.everywhere.popup"
timestamp=
"1594279
600705
"
>
<state
x=
"640"
y=
"288"
width=
"670"
height=
"676"
key=
"search.everywhere.popup"
timestamp=
"1594279
909133
"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
x=
"640"
y=
"288"
width=
"670"
height=
"676"
key=
"search.everywhere.popup/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1594279
600705
"
/>
<state
x=
"640"
y=
"288"
width=
"670"
height=
"676"
key=
"search.everywhere.popup/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1594279
909133
"
/>
</component>
</project>
\ No newline at end of file
src/common/ProgressBar.ts
View file @
97dd51fd
import
{
Tool
}
from
"../Tools"
;
import
{
Tool
s
}
from
"../Tools"
;
import
{
RES
}
from
"../../module/RES"
;
...
...
@@ -22,7 +22,7 @@ export class ProgressBar extends FYGE.Container {
.
drawRoundedRect
(
0
,
0
,
this
.
value
*
this
.
maxLength
,
19
,
10
)
.
endFill
();
this
.
progressTxt
=
this
.
addChild
(
Tool
.
getText
(
this
.
progressTxt
=
this
.
addChild
(
Tool
s
.
getText
(
"0%"
,
22
,
"#f8c862"
,
...
...
src/common/ProgressBarS.ts
View file @
97dd51fd
import
{
Tool
}
from
"../Tools"
;
import
{
Tool
s
}
from
"../Tools"
;
import
{
RES
}
from
"../../module/RES"
;
...
...
src/scene/map/CheckBtn.ts
View file @
97dd51fd
...
...
@@ -4,7 +4,7 @@ import Container = FYGE.Container;
import
Sprite
=
FYGE
.
Sprite
;
import
Texture
=
FYGE
.
Texture
;
import
TextField
=
FYGE
.
TextField
;
import
{
Tool
}
from
"../../Tools"
;
import
{
Tool
s
}
from
"../../Tools"
;
import
TEXT_ALIGN
=
FYGE
.
TEXT_ALIGN
;
import
MouseEvent
=
FYGE
.
MouseEvent
;
import
Point
=
FYGE
.
Point
;
...
...
@@ -120,7 +120,7 @@ export default class CheckBtn extends Container {
this
.
star
=
[
star1
,
star2
,
star3
];
this
.
checkNum
=
data
.
check
;
this
.
checkLabel
=
this
.
btn
.
addChild
(
Tool
.
getText
(
this
.
checkLabel
=
this
.
btn
.
addChild
(
Tool
s
.
getText
(
data
.
check
,
30
,
'#ffffff'
,
TEXT_ALIGN
.
CENTER
,
90
,
8
,
33
));
...
...
src/scene/map/MapUI.ts
View file @
97dd51fd
...
...
@@ -4,7 +4,7 @@ import TextField = FYGE.TextField;
import
Sprite
=
FYGE
.
Sprite
;
import
TEXT_ALIGN
=
FYGE
.
TEXT_ALIGN
;
import
{
RES
}
from
"../../../module/RES"
;
import
{
Tool
}
from
"../../Tools"
;
import
{
Tool
s
}
from
"../../Tools"
;
import
MouseEvent
=
FYGE
.
MouseEvent
;
export
default
class
MapUI
extends
Container
{
...
...
@@ -111,11 +111,11 @@ class EnergyBox extends Container {
private
initUi
(
data
)
{
this
.
position
.
set
(
544
,
105
);
this
.
addChild
(
Tool
.
getSprite
(
'map_energyBg.png'
));
this
.
addChild
(
Tool
s
.
getSprite
(
'map_energyBg.png'
));
this
.
addBtn
=
this
.
addChild
(
new
Button
(
RES
.
getRes
(
'map_energyAdd.png'
)));
this
.
addBtn
.
position
.
set
(
135
,
14
);
this
.
countLabel
=
this
.
addChild
(
Tool
.
getText
(
this
.
countLabel
=
this
.
addChild
(
Tool
s
.
getText
(
'0'
,
20
,
'#ffffff'
,
TEXT_ALIGN
.
CENTER
,
80
,
54
,
21
));
...
...
@@ -150,9 +150,9 @@ class CreditsBox extends Container {
private
initUi
(
data
)
{
this
.
position
.
set
(
544
,
184
);
this
.
addChild
(
Tool
.
getSprite
(
'map_creditsBg.png'
));
this
.
addChild
(
Tool
s
.
getSprite
(
'map_creditsBg.png'
));
this
.
countLabel
=
this
.
addChild
(
Tool
.
getText
(
this
.
countLabel
=
this
.
addChild
(
Tool
s
.
getText
(
'积分:0'
,
20
,
'#ffffff'
,
TEXT_ALIGN
.
CENTER
,
105
,
58
,
21
));
...
...
@@ -179,20 +179,20 @@ class PrizeBox extends Button {
private
initUi
(
data
)
{
this
.
position
.
set
(
558
,
269
);
this
.
checkTip
=
this
.
addChild
(
Tool
.
getText
(
this
.
checkTip
=
this
.
addChild
(
Tool
s
.
getText
(
'再闯XXX关'
,
22
,
'#ffffff'
,
TEXT_ALIGN
.
CENTER
,
158
,
0
,
64
));
this
.
tip
=
this
.
addChild
(
Tool
.
getText
(
this
.
tip
=
this
.
addChild
(
Tool
s
.
getText
(
'参与红包抽奖
\
n赢XXX优惠券'
,
17
,
'#ec5a5a'
,
TEXT_ALIGN
.
CENTER
,
158
,
0
,
112
));
this
.
tip
.
lineSpacing
=
0
;
this
.
prizeImg
=
this
.
addChild
(
Tool
.
getSprite
(
'map_star_enable.png'
,
39
,
150
));
this
.
prizeImg
=
this
.
addChild
(
Tool
s
.
getSprite
(
'map_star_enable.png'
,
39
,
150
));
this
.
prizeImg
.
width
=
80
;
this
.
prizeImg
.
height
=
33
;
}
...
...
src/something/states/BubbleState.ts
View file @
97dd51fd
...
...
@@ -4,6 +4,9 @@ import { State } from "../class/State";
import
{
Pool
}
from
"../Pool"
;
import
{
RecoverName
}
from
"../enum/RecoverName"
;
import
{
ElementType
}
from
"../enum/ElementType"
;
import
Sprite
=
FYGE
.
Sprite
;
import
{
RES
}
from
"../../../module/RES"
;
import
Texture
=
FYGE
.
Texture
;
/**
* 变色气泡状态
...
...
@@ -13,11 +16,11 @@ export class BubbleState extends State {
/**
* 显示图片
*/
private
showImage
:
egret
.
Bitmap
;
private
showImage
:
Sprite
;
constructor
(
type
:
ElementType
)
{
super
();
this
.
showImage
=
new
egret
.
Bitmap
();
this
.
showImage
=
new
Sprite
();
this
.
changeSource
(
"bubleEle"
+
type
+
"_png"
);
this
.
addChild
(
this
.
showImage
);
}
...
...
@@ -33,9 +36,9 @@ export class BubbleState extends State {
}
private
changeSource
(
source
:
string
)
{
var
texture
:
egret
.
Texture
=
RES
.
getRes
(
source
);
var
texture
:
Texture
=
RES
.
getRes
(
source
);
this
.
showImage
.
texture
=
texture
;
this
.
showImage
.
x
=
-
texture
.
textureW
idth
/
2
;
this
.
showImage
.
y
=
-
texture
.
textureH
eight
/
2
this
.
showImage
.
x
=
-
texture
.
w
idth
/
2
;
this
.
showImage
.
y
=
-
texture
.
h
eight
/
2
}
}
src/something/states/HairballBlackState.ts
View file @
97dd51fd
...
...
@@ -4,13 +4,16 @@ import { State } from "../class/State";
import
{
Pool
}
from
"../Pool"
;
import
{
RecoverName
}
from
"../enum/RecoverName"
;
import
{
ElementType
}
from
"../enum/ElementType"
;
import
Sprite
=
FYGE
.
Sprite
;
import
{
RES
}
from
"../../../module/RES"
;
import
Texture
=
FYGE
.
Texture
;
/**
* 黑色毛球状态
* 两次消除,需要修改图片,,,再说,还没写,切换眩晕状态,是否有动画,都再说
*/
export
class
HairballBlackState
extends
State
{
private
showImage
:
egret
.
Bitmap
;
private
showImage
:
Sprite
;
/**
* 是否激活
*/
...
...
@@ -24,7 +27,7 @@ export class HairballBlackState extends State {
}
constructor
()
{
super
();
this
.
showImage
=
new
egret
.
Bitmap
();
this
.
showImage
=
new
Sprite
();
this
.
addChild
(
this
.
showImage
);
this
.
changeSource
(
"ele"
+
ElementType
.
HAIRBALLBLACK
+
"_png"
)
this
.
_isAwake
=
true
;
...
...
@@ -40,9 +43,9 @@ export class HairballBlackState extends State {
}
private
changeSource
(
source
:
string
)
{
var
texture
:
egret
.
Texture
=
RES
.
getRes
(
source
);
var
texture
:
Texture
=
RES
.
getRes
(
source
);
this
.
showImage
.
texture
=
texture
;
this
.
showImage
.
x
=
-
texture
.
textureW
idth
/
2
;
this
.
showImage
.
y
=
-
texture
.
textureH
eight
/
2
this
.
showImage
.
x
=
-
texture
.
w
idth
/
2
;
this
.
showImage
.
y
=
-
texture
.
h
eight
/
2
}
}
src/something/states/HairballBrownState.ts
View file @
97dd51fd
import
{
State
}
from
"../class/State"
;
import
{
Pool
}
from
"../Pool"
;
import
{
RecoverName
}
from
"../enum/RecoverName"
;
import
{
ElementType
}
from
"../enum/ElementType"
;
import
{
RES
}
from
"../../../module/RES"
;
import
Texture
=
FYGE
.
Texture
;
import
Sprite
=
FYGE
.
Sprite
;
/**
* 褐色帽绣毛球状态
* 分裂动画都在外面单独掉
*/
export
class
HairballBrownState
extends
State
{
private
showImage
:
egret
.
Bitmap
;
private
showImage
:
Sprite
;
/**
* 是否激活
*/
isActive
:
boolean
;
constructor
()
{
super
();
var
texture
:
egret
.
Texture
=
RES
.
getRes
(
"ele"
+
ElementType
.
HAIRBALLBROWN
+
"_png"
)
this
.
showImage
=
new
egret
.
Bitmap
(
texture
);
var
texture
:
Texture
=
RES
.
getRes
(
"ele"
+
ElementType
.
HAIRBALLBROWN
+
"_png"
)
this
.
showImage
=
new
Sprite
(
texture
);
this
.
addChild
(
this
.
showImage
);
this
.
showImage
.
x
=
-
texture
.
textureW
idth
/
2
;
this
.
showImage
.
y
=
-
texture
.
textureH
eight
/
2
;
this
.
showImage
.
x
=
-
texture
.
w
idth
/
2
;
this
.
showImage
.
y
=
-
texture
.
h
eight
/
2
;
this
.
isActive
=
false
;
}
reset
()
{
...
...
@@ -33,9 +35,9 @@ export class HairballBrownState extends State {
}
private
changeSource
(
source
:
string
)
{
var
texture
:
egret
.
Texture
=
RES
.
getRes
(
source
);
var
texture
:
Texture
=
RES
.
getRes
(
source
);
this
.
showImage
.
texture
=
texture
;
this
.
showImage
.
x
=
-
texture
.
textureW
idth
/
2
;
this
.
showImage
.
y
=
-
texture
.
textureH
eight
/
2
this
.
showImage
.
x
=
-
texture
.
w
idth
/
2
;
this
.
showImage
.
y
=
-
texture
.
h
eight
/
2
}
}
src/something/states/LockState.ts
View file @
97dd51fd
import
{
State
}
from
"../class/State"
;
import
{
Pool
}
from
"../Pool"
;
import
{
RecoverName
}
from
"../enum/RecoverName"
;
import
{
RES
}
from
"../../../module/RES"
;
import
Tween
=
FYGE
.
Tween
;
import
Texture
=
FYGE
.
Texture
;
import
Sprite
=
FYGE
.
Sprite
;
/**
* 枷锁状态
* 动画比较简单,直接写这里
*/
export
class
LockState
extends
State
{
private
showImage
:
egret
.
Bitmap
;
private
showImage
:
Sprite
;
constructor
()
{
super
();
var
texture
:
egret
.
Texture
=
RES
.
getRes
(
"lockVine_png"
)
this
.
showImage
=
new
egret
.
Bitmap
(
texture
);
var
texture
:
Texture
=
RES
.
getRes
(
"lockVine_png"
)
this
.
showImage
=
new
Sprite
(
texture
);
this
.
addChild
(
this
.
showImage
);
this
.
showImage
.
x
=
-
texture
.
textureW
idth
/
2
;
this
.
showImage
.
y
=
-
texture
.
textureH
eight
/
2
this
.
showImage
.
x
=
-
texture
.
w
idth
/
2
;
this
.
showImage
.
y
=
-
texture
.
h
eight
/
2
}
reset
()
{
this
.
alpha
=
1
;
...
...
@@ -24,7 +27,7 @@ export class LockState extends State {
//要不要把动画放在这里,这种移除动效最好统一外面,常驻动效才
recover
()
{
egret
.
Tween
.
get
(
this
)
Tween
.
get
(
this
)
.
to
({
alpha
:
0
},
750
)
.
call
(()
=>
{
if
(
this
.
parent
)
this
.
parent
.
removeChild
(
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