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
d5821064
Commit
d5821064
authored
Jul 20, 2020
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
3a9c0c89
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
8552 additions
and
30131 deletions
+8552
-30131
output.js
output.js
+1
-29932
待领取.png
resource/TaskPanel/待领取.png
+0
-0
res.json
resource/res.json
+49
-49
mergeJs.js
scripts/mergeJs.js
+1
-1
ResJson.ts
src/ResJson.ts
+8249
-55
CreditsOutPanel.ts
src/panels/CreditsOutPanel.ts
+3
-1
TaskPanel.ts
src/panels/TaskPanel.ts
+195
-69
PlayScene.ts
src/scene/PlayScene.ts
+53
-24
aaa.ts
src/something/logic/aaa.ts
+1
-0
No files found.
output.js
View file @
d5821064
This diff is collapsed.
Click to expand it.
resource/TaskPanel/待领取.png
0 → 100644
View file @
d5821064
7.62 KB
resource/res.json
View file @
d5821064
This diff is collapsed.
Click to expand it.
scripts/mergeJs.js
View file @
d5821064
...
...
@@ -9,6 +9,6 @@ var endPath = './released/';
fs
.
writeFileSync
(
endPath
+
"output.js"
,
'import * as FYGE from "fyge-tbmini";
\
n'
+
'import * as SvgaParser from "svga-parser";
\
n'
+
//
'import * as SvgaParser from "svga-parser";\n' +
fs
.
readFileSync
(
"./output.js"
));
console
.
log
(
"js生成"
)
src/ResJson.ts
View file @
d5821064
This diff is collapsed.
Click to expand it.
src/panels/CreditsOutPanel.ts
View file @
d5821064
...
...
@@ -17,7 +17,9 @@ export class CreditsOutPanel extends Panel {
super
.
initEvents
();
this
.
earnBtn
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
()
=>
{
Tools
.
btnDelay
(
this
);
sendTbNet
(
TbNetName
.
navigateToOutside
,
{
url
:
""
})
//TODO 赚积分路径待写
sendTbNet
(
TbNetName
.
navigateToOutside
,
{
url
:
"https://market.m.taobao.com/app/tb-source-app/shopact/pages/index?wh_weex=true&pathInfo=shop/activity&userId=2275046294&shopId=114637892&pageId=187145736&alisite=true"
})
//赚积分路径
},
this
)
}
removeEvents
()
{
...
...
src/panels/TaskPanel.ts
View file @
d5821064
This diff is collapsed.
Click to expand it.
src/scene/PlayScene.ts
View file @
d5821064
...
...
@@ -189,13 +189,10 @@ export class PlayScene extends Scene {
*/
connectState
:
number
=
2
;
//皮肤上的 //注意都需要重写
public
settingGroup
:
FYGE
.
Container
;
public
settingbg
:
FYGE
.
Sprite
;
public
soundBtn
:
FYGE
.
Sprite
;
public
musicBtn
:
FYGE
.
Sprite
;
public
questionBtn
:
FYGE
.
Sprite
;
public
quitBtn
:
FYGE
.
Sprite
;
public
settingBtn
:
FYGE
.
Button
;
public
settingBtn
:
SettingBtn
;
/**
* 分数为目标时的文案
*/
targetScoreTxt
:
FYGE
.
BitmapText
;
/**
* 剩余步数
...
...
@@ -268,8 +265,9 @@ export class PlayScene extends Scene {
//通关目标分数
this
.
targetScoreTxt
=
this
.
addChild
(
new
FYGE
.
BitmapText
(
commonTextArr
));
this
.
targetScoreTxt
.
position
.
set
(
375
,
193
);
//设置,待定
this
.
addChild
(
FYGE
.
Sprite
.
fromFrame
(
"settingBtn.png"
)).
position
.
set
(
618
,
16
)
//设置
this
.
settingBtn
=
this
.
addChild
(
new
SettingBtn
())
this
.
settingBtn
.
position
.
set
(
618
,
16
)
}
data
:
{
chapter
:
number
}
start
(
data
:
{
chapter
:
number
})
{
...
...
@@ -298,7 +296,7 @@ export class PlayScene extends Scene {
//重置基础元素类型及特效
this
.
initBaseElement
();
//设置栏置顶
this
.
addChild
(
this
[
"settingAll"
]
)
// this.addChild(this.settingBtn
)
//先判断是否添加节日元素,如果加节日元素,就按initFestivalEle里的来
if
(
!
this
.
initFestivalEle
())
{
//检查一次三消
...
...
@@ -322,6 +320,12 @@ export class PlayScene extends Scene {
this
.
initSvgas
();
//AiControl初始化,
AiControl
.
ins
.
init
(
this
.
lattices
);
//测试波纹
// let fun = ()=>{
// RectsWaveAni(this.lattices,this.map,fun);
// }
// fun()
}
/**
...
...
@@ -782,22 +786,10 @@ export class PlayScene extends Scene {
//侦听事件
initEvents
()
{
this
.
addEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
// this.settingBtn.addEventListener(FYGE.MouseEvent.CLICK, this.onTap_settingBtn, this)
// this.questionBtn.addEventListener(FYGE.MouseEvent.CLICK, this.onTap_questionBtn, this)
// this.soundBtn.addEventListener(FYGE.MouseEvent.CLICK, this.onTap_soundBtnn, this)
// this.musicBtn.addEventListener(FYGE.MouseEvent.CLICK, this.onTap_musicBtn, this)
// this.quitBtn.addEventListener(FYGE.MouseEvent.CLICK, this.onTap_quitBtn, this)
}
removeEvents
()
{
this
.
removeEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
// this.settingBtn.removeEventListener(FYGE.MouseEvent.CLICK, this.onTap_settingBtn, this);
// this.questionBtn.removeEventListener(FYGE.MouseEvent.CLICK, this.onTap_questionBtn, this)
// this.soundBtn.removeEventListener(FYGE.MouseEvent.CLICK, this.onTap_soundBtnn, this)
// this.musicBtn.removeEventListener(FYGE.MouseEvent.CLICK, this.onTap_musicBtn, this)
// this.quitBtn.removeEventListener(FYGE.MouseEvent.CLICK, this.onTap_quitBtn, this)
this
.
propBtnCon
.
boomBtn
.
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onTap_boomBtn
,
this
)
this
.
propBtnCon
.
hammerBtn
.
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onTap_hammerBtn
,
this
)
...
...
@@ -1850,7 +1842,10 @@ export class PlayScene extends Scene {
this
.
addChild
(
movieClips
.
bonusTime
);
movieClips
.
bonusTime
.
play
(
1
,
()
=>
{
this
.
removeChild
(
movieClips
.
bonusTime
)
this
.
terminateSteps
();
//来个波纹
RectsWaveAni
(
this
.
lattices
,
this
.
map
,
()
=>
{
this
.
terminateSteps
();
})
})
return
}
...
...
@@ -2661,7 +2656,6 @@ export class PlayScene extends Scene {
ani
.
y
=
p
[
1
];
ani
.
play
();
if
(
name
==
RecoverName
.
MAGICLION_ANI
)
{
console
.
log
(
this
.
getChildIndex
(
this
.
map
))
//具体索引还要改
// console.log()
this
.
addChildAt
(
ani
,
this
.
getChildIndex
(
this
.
map
)
+
1
);
...
...
@@ -2868,3 +2862,38 @@ export class PlayScene extends Scene {
// }
// return currentTarget
// }
class
SettingBtn
extends
FYGE
.
Container
{
constructor
()
{
super
()
//背景
var
bg
=
this
.
addChild
(
new
FYGE
.
Sprite
(
RES
.
getRes
(
"settingBg.png"
)))
bg
.
position
.
set
(
6
,
50
)
bg
.
visible
=
false
;
//音乐
var
musicBtn
=
this
.
addChild
(
new
class
extends
FYGE
.
Sprite
{
private
isOn
:
boolean
;
constructor
()
{
var
t
=
RES
.
getRes
(
"musicOn.png"
)
super
(
t
)
this
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
()
=>
{
this
.
isOn
=
!
this
.
isOn
;
this
.
texture
=
RES
.
getRes
(
this
.
isOn
?
"musicOn.png"
:
"musicOff.png"
);
//播放或暂停音乐接口
},
this
);
}
});
musicBtn
.
position
.
set
(
11
,
97
);
musicBtn
.
visible
=
false
;
//主按钮
var
btn
=
this
.
addChild
(
new
FYGE
.
Button
(
RES
.
getRes
(
"settingBtn.png"
)))
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
()
=>
{
console
.
log
(
9999
)
musicBtn
.
visible
=
!
musicBtn
.
visible
bg
.
visible
=
!
bg
.
visible
},
this
)
console
.
log
(
btn
)
}
}
\ No newline at end of file
src/something/logic/aaa.ts
View file @
d5821064
...
...
@@ -23,6 +23,7 @@ export function drawBg(paths: PathData[], lattices?: number[]) {
// }
}
}
bg
.
updateShape
()
//只有这样之后bounds才是正确的,注意引擎有时间修改
//缓存掉
var
bounds
=
bg
.
getLocalBounds
();
let
w
:
number
=
bounds
.
width
;
...
...
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