Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
games
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
熊东起
games
Commits
e7ff8f68
Commit
e7ff8f68
authored
Nov 03, 2020
by
熊东起
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first
parent
2b77eccb
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
219 additions
and
78 deletions
+219
-78
index.html
index.html
+1
-1
layers.ts
module/views/layers.ts
+4
-0
output.js
output.js
+94
-30
output.js.map
output.js.map
+1
-1
GuideMgr.ts
src/Mgr/GuideMgr.ts
+5
-0
SoundMgr.ts
src/Mgr/SoundMgr.ts
+8
-8
ResJson.ts
src/ResJson.ts
+1
-1
Cat.ts
src/game/Cat.ts
+3
-0
GuideMask.ts
src/game/GuideMask.ts
+2
-2
HideAndSeek.ts
src/game/HideAndSeek.ts
+10
-10
TimerCount.ts
src/game/TimerCount.ts
+68
-7
MConst.ts
src/global/MConst.ts
+3
-3
GameFailPanel.ts
src/panels/GameFailPanel.ts
+10
-8
GameSuccessPanel.ts
src/panels/GameSuccessPanel.ts
+8
-7
GameScenes.ts
src/scenes/GameScenes.ts
+1
-0
No files found.
index.html
View file @
e7ff8f68
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
<script>
<script>
window
.
addEventListener
(
"load"
,
function
()
{
window
.
addEventListener
(
"load"
,
function
()
{
//是否完成新手
//是否完成新手
const
scheduleFinished
=
0
;
const
scheduleFinished
=
1
;
//目标分数
//目标分数
const
targetScore
=
120
;
const
targetScore
=
120
;
//是否音乐
//是否音乐
...
...
module/views/layers.ts
View file @
e7ff8f68
...
@@ -28,6 +28,10 @@ class Layers extends FYGE.Container {
...
@@ -28,6 +28,10 @@ class Layers extends FYGE.Container {
//有些时候,定宽的时候,部分layer置顶,部分居中,再处理
//有些时候,定宽的时候,部分layer置顶,部分居中,再处理
//为了都置顶和置左,stage的方式永远居中视窗,要么改stage永远左上为00
//为了都置顶和置左,stage的方式永远居中视窗,要么改stage永远左上为00
// this[arr[i]].y = this.stageOffsetY;
// this[arr[i]].y = this.stageOffsetY;
if
(
this
.
stageHeight
>
1624
)
{
this
[
arr
[
i
]].
scaleY
=
this
.
stageHeight
/
1624
;
this
[
arr
[
i
]].
y
=
this
.
stageOffsetY
;
}
//如果定宽这里没必要,肯定是0
//如果定宽这里没必要,肯定是0
// this[arr[i]].x = this.stageOffsetX;//去掉,定高时就居中了
// this[arr[i]].x = this.stageOffsetX;//去掉,定高时就居中了
this
.
addChild
(
this
[
arr
[
i
]]);
this
.
addChild
(
this
[
arr
[
i
]]);
...
...
output.js
View file @
e7ff8f68
This diff is collapsed.
Click to expand it.
output.js.map
View file @
e7ff8f68
This diff is collapsed.
Click to expand it.
src/Mgr/GuideMgr.ts
View file @
e7ff8f68
import
{
DataMgr
}
from
"./DataMgr"
;
import
{
DataMgr
}
from
"./DataMgr"
;
import
{
MConfigs
}
from
"../Global/MConfigs"
;
import
{
MConfigs
}
from
"../Global/MConfigs"
;
import
GuideMask
from
"../game/GuideMask"
;
import
GuideMask
from
"../game/GuideMask"
;
import
{
GDispatcher
}
from
"../HideAndSeekMain"
;
import
TimerCountMgr
from
"./TimerCountMgr"
;
// import Pot from "../game/Pot";
// import Pot from "../game/Pot";
// import Food from "../game/Food";
// import Food from "../game/Food";
...
@@ -62,10 +64,13 @@ export default class GuideMgr {
...
@@ -62,10 +64,13 @@ export default class GuideMgr {
DataMgr
.
game
.
pause
=
true
;
DataMgr
.
game
.
pause
=
true
;
this
.
currentGuideMask
=
new
GuideMask
();
this
.
currentGuideMask
=
new
GuideMask
();
this
.
currentGuideMask
.
onClick
=
(
context
)
=>
{
this
.
currentGuideMask
.
onClick
=
(
context
)
=>
{
//新手引导
GDispatcher
.
dispatchEvent
(
"new-guide"
);
//@ts-ignore
//@ts-ignore
context
.
dispose
();
context
.
dispose
();
this
.
currentGuideMask
=
null
;
this
.
currentGuideMask
=
null
;
DataMgr
.
game
.
pause
=
false
;
DataMgr
.
game
.
pause
=
false
;
TimerCountMgr
.
instance
.
drawTimerCount
();
if
(
isEnd
)
{
if
(
isEnd
)
{
this
.
guideFlag
=
false
;
this
.
guideFlag
=
false
;
}
}
...
...
src/Mgr/SoundMgr.ts
View file @
e7ff8f68
...
@@ -2,14 +2,14 @@ import { Howl } from "howler";
...
@@ -2,14 +2,14 @@ import { Howl } from "howler";
export
const
starMP3Name
=
{
export
const
starMP3Name
=
{
bgm
:
bgm
:
"https://yun.duiba.com.cn/aurora/assets/9ace0b569cbc43c61eb18a84f5d36dcd60423819.mp3"
,
"https://yun.duiba.com.cn/aurora/assets/9ace0b569cbc43c61eb18a84f5d36dcd60423819.mp3"
,
shoot
:
ready
:
"https://yun.duiba.com.cn/aurora/assets/
78d86205f37e736f922bf476a4b278dd4c5d029c
.mp3"
,
"https://yun.duiba.com.cn/aurora/assets/
ed1a835c5f52a84528059255984e0f794d550fea
.mp3"
,
c
ollect
:
c
atch
:
"https://yun.duiba.com.cn/aurora/assets/
564b39022bfe147f9eb4bdf6a6b95142186df265
.mp3"
,
"https://yun.duiba.com.cn/aurora/assets/
cf8b2b06aa17e0768b90494d70f92628efb009e0
.mp3"
,
dong
:
goout
:
"https://yun.duiba.com.cn/aurora/assets/
f259780c1de05136d15c0aa4b5a72b91ff871f16
.mp3"
,
"https://yun.duiba.com.cn/aurora/assets/
a9db68b83e3f13df12332e895d3162642ba99bdf
.mp3"
,
boom
:
start
:
"https://yun.duiba.com.cn/aurora/assets/
ed6f41a38d28e03acf791dd3672c0364e6754821
.mp3"
,
"https://yun.duiba.com.cn/aurora/assets/
513b33f7e391b6531ce2c6d51cbd94599d80978c
.mp3"
,
};
};
export
class
SoundMgr
{
export
class
SoundMgr
{
...
...
src/ResJson.ts
View file @
e7ff8f68
...
@@ -634,5 +634,5 @@ export const ResJson = {
...
@@ -634,5 +634,5 @@ export const ResJson = {
"name"
:
"hideAndSeekSvga"
"name"
:
"hideAndSeekSvga"
}
}
],
],
"path"
:
"https://yun.duiba.com.cn/db_games/activity/kickball-feile/160
1605847
/resource/"
"path"
:
"https://yun.duiba.com.cn/db_games/activity/kickball-feile/160
2989302
/resource/"
}
}
\ No newline at end of file
src/game/Cat.ts
View file @
e7ff8f68
...
@@ -3,6 +3,7 @@ import { PoolElement } from "../Component/Pool";
...
@@ -3,6 +3,7 @@ import { PoolElement } from "../Component/Pool";
import
{
MConfigs
}
from
"../Global/MConfigs"
;
import
{
MConfigs
}
from
"../Global/MConfigs"
;
import
{
MConst
}
from
"../Global/MConst"
;
import
{
MConst
}
from
"../Global/MConst"
;
import
{
DataMgr
}
from
"../Mgr/DataMgr"
;
import
{
DataMgr
}
from
"../Mgr/DataMgr"
;
import
{
SoundMgr
}
from
"../Mgr/SoundMgr"
;
import
MoveObjcet
from
"./MoveObject"
;
import
MoveObjcet
from
"./MoveObject"
;
/** 纹理宽高 */
/** 纹理宽高 */
const
textureSize
=
{
const
textureSize
=
{
...
@@ -56,6 +57,7 @@ export default class Cat extends MoveObjcet implements PoolElement {
...
@@ -56,6 +57,7 @@ export default class Cat extends MoveObjcet implements PoolElement {
y
:
initPoint
.
y
-
this
.
catSVGA
.
videoHeight
/
2
-
15
,
y
:
initPoint
.
y
-
this
.
catSVGA
.
videoHeight
/
2
-
15
,
};
};
this
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClickCat
,
this
);
this
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClickCat
,
this
);
SoundMgr
.
instance
.
playSound
(
"goout"
,
false
);
}
}
/** 猫咪上移 */
/** 猫咪上移 */
...
@@ -86,6 +88,7 @@ export default class Cat extends MoveObjcet implements PoolElement {
...
@@ -86,6 +88,7 @@ export default class Cat extends MoveObjcet implements PoolElement {
/** 点击猫咪 */
/** 点击猫咪 */
onClickCat
()
{
onClickCat
()
{
if
(
this
.
catType
==
CatType
.
COMMON
)
{
if
(
this
.
catType
==
CatType
.
COMMON
)
{
SoundMgr
.
instance
.
playSound
(
"catch"
,
false
);
this
.
isMoved
=
true
;
this
.
isMoved
=
true
;
console
.
log
(
"888"
,
this
.
id
);
console
.
log
(
"888"
,
this
.
id
);
//改变状态 TODO
//改变状态 TODO
...
...
src/game/GuideMask.ts
View file @
e7ff8f68
...
@@ -43,7 +43,7 @@ export default class GuideMask extends FYGE.Container {
...
@@ -43,7 +43,7 @@ export default class GuideMask extends FYGE.Container {
//描述
//描述
let
descText
=
Tool
.
getText
(
let
descText
=
Tool
.
getText
(
"
点击从纸箱中钻出的猫咪
\n
把猫咪从纸箱中抓出来
"
,
"
小猫咪在纸箱中钻来钻去
\n
摸到调皮的它,就能赢得金币哦~
"
,
30
,
30
,
"#ffffff"
,
"#ffffff"
,
FYGE
.
TEXT_ALIGN
.
CENTER
,
FYGE
.
TEXT_ALIGN
.
CENTER
,
...
@@ -81,7 +81,7 @@ export default class GuideMask extends FYGE.Container {
...
@@ -81,7 +81,7 @@ export default class GuideMask extends FYGE.Container {
//描述
//描述
let
descText
=
Tool
.
getText
(
let
descText
=
Tool
.
getText
(
"
在有限的时间内
\n
尽可能的达成目标分数
"
,
"
要在限定时间内
\n
达到目标分数才能获得奖励哦~
"
,
30
,
30
,
"#ffffff"
,
"#ffffff"
,
FYGE
.
TEXT_ALIGN
.
CENTER
,
FYGE
.
TEXT_ALIGN
.
CENTER
,
...
...
src/game/HideAndSeek.ts
View file @
e7ff8f68
...
@@ -308,11 +308,9 @@ export default class HideAndSeek extends FYGE.Container {
...
@@ -308,11 +308,9 @@ export default class HideAndSeek extends FYGE.Container {
/** 创建猫咪 */
/** 创建猫咪 */
private
createCats
()
{
private
createCats
()
{
//新手引导
//新手引导
if
(
if
(
MConst
.
options
.
scheduleFinished
==
0
)
{
GuideMgr
.
instance
.
guideFlag
==
true
&&
MConst
.
options
.
scheduleFinished
==
1
)
{
GuideMgr
.
instance
.
drawFirstGuide
(
true
);
GuideMgr
.
instance
.
drawFirstGuide
(
true
);
MConst
.
options
.
scheduleFinished
=
1
;
}
}
// console.log(")))", MConst.tickSeconds * 1000, this.timer);
// console.log(")))", MConst.tickSeconds * 1000, this.timer);
let
idArr
=
GameFun
.
appearRandomId
(
let
idArr
=
GameFun
.
appearRandomId
(
...
@@ -342,7 +340,7 @@ export default class HideAndSeek extends FYGE.Container {
...
@@ -342,7 +340,7 @@ export default class HideAndSeek extends FYGE.Container {
let
cat
=
this
.
catPool
.
spwan
(
id
,
currentContainer
);
let
cat
=
this
.
catPool
.
spwan
(
id
,
currentContainer
);
let
catPoint
=
MConfigs
.
catPoint
[
id
];
let
catPoint
=
MConfigs
.
catPoint
[
id
];
cat
.
init
(
catPoint
,
id
);
cat
.
init
(
catPoint
,
id
);
console
.
log
(
"猫咪位置"
,
cat
.
x
,
cat
.
y
,
id
);
//
console.log("猫咪位置", cat.x, cat.y, id);
this
.
createBubbleCD
=
MConst
.
CatGroupCd
;
this
.
createBubbleCD
=
MConst
.
CatGroupCd
;
});
});
}
}
...
@@ -367,7 +365,7 @@ export default class HideAndSeek extends FYGE.Container {
...
@@ -367,7 +365,7 @@ export default class HideAndSeek extends FYGE.Container {
}
}
/** 分数加1 */
/** 分数加1 */
onAddScore
(
catX
:
number
,
catY
:
number
)
{
onAddScore
(
catX
:
number
,
catY
:
number
)
{
var
addCount
=
Tool
.
getText
(
var
addCount
=
Tool
.
getText
(
`+1`
,
`+1`
,
40
,
40
,
...
@@ -380,10 +378,10 @@ export default class HideAndSeek extends FYGE.Container {
...
@@ -380,10 +378,10 @@ export default class HideAndSeek extends FYGE.Container {
addCount
.
alpha
=
1
;
addCount
.
alpha
=
1
;
this
.
node
.
addChild
(
addCount
);
this
.
node
.
addChild
(
addCount
);
FYGE
.
Tween
.
get
(
addCount
)
FYGE
.
Tween
.
get
(
addCount
)
.
to
({
y
:
catY
-
80
,
alpha
:
0
},
500
)
.
to
({
y
:
catY
-
80
,
alpha
:
0
},
500
)
.
call
(()
=>
{
.
call
(()
=>
{
addCount
&&
this
.
node
.
removeChild
(
addCount
);
addCount
&&
this
.
node
.
removeChild
(
addCount
);
});
});
}
}
/** 游戏暂停 */
/** 游戏暂停 */
...
@@ -408,6 +406,7 @@ export default class HideAndSeek extends FYGE.Container {
...
@@ -408,6 +406,7 @@ export default class HideAndSeek extends FYGE.Container {
if
(
result
.
data
.
leftTimes
>
0
)
{
if
(
result
.
data
.
leftTimes
>
0
)
{
showPanel
(
GameFailPanel
,
{
isAgain
:
true
});
showPanel
(
GameFailPanel
,
{
isAgain
:
true
});
GDispatcher
.
dispatchEvent
(
"showBuried"
,
{
md
:
41
});
GDispatcher
.
dispatchEvent
(
"showBuried"
,
{
md
:
41
});
GDispatcher
.
dispatchEvent
(
"showBuried"
,
{
md
:
53
});
}
else
{
}
else
{
showPanel
(
GameFailPanel
,
{
isAgain
:
false
});
showPanel
(
GameFailPanel
,
{
isAgain
:
false
});
GDispatcher
.
dispatchEvent
(
"showBuried"
,
{
md
:
43
});
GDispatcher
.
dispatchEvent
(
"showBuried"
,
{
md
:
43
});
...
@@ -426,6 +425,7 @@ export default class HideAndSeek extends FYGE.Container {
...
@@ -426,6 +425,7 @@ export default class HideAndSeek extends FYGE.Container {
glodCoin
:
result
.
data
.
goldenCorn
,
glodCoin
:
result
.
data
.
goldenCorn
,
});
});
GDispatcher
.
dispatchEvent
(
"showBuried"
,
{
md
:
42
});
GDispatcher
.
dispatchEvent
(
"showBuried"
,
{
md
:
42
});
GDispatcher
.
dispatchEvent
(
"showBuried"
,
{
md
:
54
});
}
}
}
}
}
}
...
...
src/game/TimerCount.ts
View file @
e7ff8f68
import
{
RES
}
from
"../../module/RES"
;
import
{
RES
}
from
"../../module/RES"
;
import
{
SoundMgr
}
from
"../Mgr/SoundMgr"
;
/** 倒计时 */
/** 倒计时 */
export
default
class
TimerCount
extends
FYGE
.
Container
{
export
default
class
TimerCount
extends
FYGE
.
Container
{
...
@@ -25,13 +26,73 @@ export default class TimerCount extends FYGE.Container {
...
@@ -25,13 +26,73 @@ export default class TimerCount extends FYGE.Container {
private
countDown
(
callback
:
()
=>
void
)
{
private
countDown
(
callback
:
()
=>
void
)
{
let
allIn
=
new
FYGE
.
Container
();
let
allIn
=
new
FYGE
.
Container
();
this
.
addChild
(
allIn
);
this
.
addChild
(
allIn
);
//加入SVGA
SoundMgr
.
instance
.
playSound
(
"ready"
,
false
);
let
readySvga
=
new
FYGE
.
MovieClip
(
RES
.
getRes
(
"ready-1-2-3.svga"
));
// //加入SVGA
allIn
.
addChild
(
readySvga
);
// let readySvga = new FYGE.MovieClip(RES.getRes("ready-1-2-3.svga"));
readySvga
.
stop
();
// allIn.addChild(readySvga);
// readySvga.stop();
readySvga
.
startAniRange
(
0
,
readySvga
.
totalFrames
,
1
,
()
=>
{
// readySvga.startAniRange(0, readySvga.totalFrames, 1, () => {
callback
&&
callback
();
// callback && callback();
});
// SoundMgr.instance.playSound("start",false);
// });
//背景
var
timeBg
=
new
FYGE
.
Sprite
(
RES
.
getRes
(
"timerCountBg.png"
));
timeBg
.
anchorTexture
.
set
(
0.5
,
0.5
);
timeBg
.
x
=
750
/
2
;
timeBg
.
y
=
1624
/
2
;
timeBg
.
alpha
=
1
;
allIn
.
addChild
(
timeBg
);
var
fourImages
=
[];
var
fourTextures
=
[
"cat_ready.png"
,
"cat_timer_3.png"
,
"cat_timer_2.png"
,
"cat_timer_1.png"
,
];
for
(
var
i
=
0
;
i
<
fourTextures
.
length
;
i
++
)
{
var
t
:
FYGE
.
Texture
=
RES
.
getRes
(
fourTextures
[
i
]);
var
im
=
new
FYGE
.
Sprite
(
t
);
//都需要居中
im
.
anchorTexture
.
set
(
0.5
,
0.5
);
im
.
x
=
750
/
2
;
im
.
y
=
1624
/
2
;
im
.
alpha
=
0
;
fourImages
.
push
(
im
);
allIn
.
addChild
(
im
);
}
//如果背景音乐开着的话先关闭
// if (getBgOn()) stopBg();
for
(
let
i
=
0
;
i
<
4
;
i
++
)
{
let
im
=
fourImages
[
i
];
let
delta
=
i
*
1000
;
let
t
=
FYGE
.
Tween
.
get
(
im
);
t
.
wait
(
delta
)
.
set
({
alpha
:
1
,
scaleX
:
0.1
,
scaleY
:
0.1
})
.
to
({
scaleX
:
1
,
scaleY
:
1
},
500
,
FYGE
.
Ease
.
backOut
)
.
wait
(
500
);
if
(
i
==
3
)
{
t
.
call
(()
=>
{
callback
&&
callback
();
SoundMgr
.
instance
.
playSound
(
"start"
,
false
);
})
.
to
({
alpha
:
0
},
200
)
.
call
(()
=>
{
//执行完销毁吧,浏览器自己回收吧
// allIn.destroy();
this
.
removeChild
(
allIn
);
// if (getBgOn()) playBg();
});
}
else
{
t
.
set
({
alpha
:
0
});
}
if
(
i
==
0
)
{
t
.
call
(()
=>
{
timeBg
.
alpha
=
1
;
});
}
}
}
}
}
}
src/global/MConst.ts
View file @
e7ff8f68
...
@@ -8,14 +8,14 @@ export namespace MConst {
...
@@ -8,14 +8,14 @@ export namespace MConst {
export
const
countDown
=
1
*
60
;
//倒计时时间
export
const
countDown
=
1
*
60
;
//倒计时时间
export
let
tickSeconds
=
60
;
//倒计时
export
let
tickSeconds
=
60
;
//倒计时
export
const
CatGroupCd
=
20
00
;
//貓咪出現間隔
export
const
CatGroupCd
=
18
00
;
//貓咪出現間隔
export
const
CatSplitVelocityY
=
8.8
;
//貓出現速度
export
const
CatSplitVelocityY
=
8.8
;
//貓出現速度
export
const
CatGavity
=
0.02
//猫咪加速
export
const
CatGavity
=
0.02
//猫咪加速
export
const
CatInitOffetY
=
220
;
//猫咪初始化偏移量
export
const
CatInitOffetY
=
220
;
//猫咪初始化偏移量
export
const
CatAppearProudDis
=
10
00
;
//猫咪出现嘚瑟间隔--不能点
export
const
CatAppearProudDis
=
8
00
;
//猫咪出现嘚瑟间隔--不能点
export
const
CatWaitTime
=
10
00
;
//嘚瑟-猫咪缩回去
export
const
CatWaitTime
=
3
00
;
//嘚瑟-猫咪缩回去
export
const
CatHideTime
=
800
;
//猫咪缩回去时间
export
const
CatHideTime
=
800
;
//猫咪缩回去时间
export
let
options
=
{
export
let
options
=
{
scheduleFinished
:
null
,
scheduleFinished
:
null
,
...
...
src/panels/GameFailPanel.ts
View file @
e7ff8f68
...
@@ -29,28 +29,28 @@ export class GameFailPanel extends Panel {
...
@@ -29,28 +29,28 @@ export class GameFailPanel extends Panel {
//数据
//数据
const
{
isAgain
}
=
this
.
data
;
const
{
isAgain
}
=
this
.
data
;
// var isAgain =
fals
e;//是否只有一颗 按钮
// var isAgain =
tru
e;//是否只有一颗 按钮
//描述
//描述
let
title
=
Tool
.
getText
(
let
title
=
Tool
.
getText
(
`
${
isAgain
?
"不想失去奖励"
:
"猫咪累了"
}
`
,
`
${
isAgain
?
"不想失去奖励
?
"
:
"猫咪累了"
}
`
,
38
,
38
,
"#333333"
,
"#333333"
,
FYGE
.
TEXT_ALIGN
.
CENTER
,
FYGE
.
TEXT_ALIGN
.
CENTER
,
2
3
0
2
8
0
);
);
this
.
addChild
(
title
);
this
.
addChild
(
title
);
title
.
position
.
set
(
2
6
0
,
820
);
title
.
position
.
set
(
2
4
0
,
820
);
//获得奖励
//获得奖励
let
getPrizeText
=
Tool
.
getText
(
let
getPrizeText
=
Tool
.
getText
(
`
${
isAgain
?
"
不如再试一次"
:
"等等再来玩
"
}
`
,
`
${
isAgain
?
"
那再试一次吧~"
:
"过会儿再来陪它玩吧~
"
}
`
,
32
,
32
,
`
${
isAgain
?
"#3b8edd"
:
"#333333"
}
`
,
`
${
isAgain
?
"#3b8edd"
:
"#333333"
}
`
,
FYGE
.
TEXT_ALIGN
.
CENTER
,
FYGE
.
TEXT_ALIGN
.
CENTER
,
23
0
40
0
);
);
this
.
addChild
(
getPrizeText
);
this
.
addChild
(
getPrizeText
);
getPrizeText
.
position
.
set
(
26
0
,
880
);
getPrizeText
.
position
.
set
(
18
0
,
880
);
//看猫
//看猫
this
.
seeCat
=
new
FYGE
.
Button
(
RES
.
getRes
(
"cat_seecat.png"
));
this
.
seeCat
=
new
FYGE
.
Button
(
RES
.
getRes
(
"cat_seecat.png"
));
...
@@ -86,7 +86,9 @@ export class GameFailPanel extends Panel {
...
@@ -86,7 +86,9 @@ export class GameFailPanel extends Panel {
//看猫咪
//看猫咪
onClickSeeCat
()
{
onClickSeeCat
()
{
if
(
!
this
.
againBtn
.
visible
)
{
if
(
!
this
.
againBtn
.
visible
)
{
GDispatcher
.
dispatchEvent
(
"clickBuried"
,
{
md
:
40
});
GDispatcher
.
dispatchEvent
(
"clickBuried"
,
{
md
:
43
});
}
else
{
GDispatcher
.
dispatchEvent
(
"clickBuried"
,
{
md
:
53
});
}
}
GDispatcher
.
dispatchEvent
(
"hideCat-see-cat"
);
GDispatcher
.
dispatchEvent
(
"hideCat-see-cat"
);
this
.
hidePanel
();
this
.
hidePanel
();
...
...
src/panels/GameSuccessPanel.ts
View file @
e7ff8f68
...
@@ -36,18 +36,18 @@ export class GameSuccessPanel extends Panel {
...
@@ -36,18 +36,18 @@ export class GameSuccessPanel extends Panel {
//数据
//数据
const
{
isAgain
,
glodCoin
}
=
this
.
data
;
const
{
isAgain
,
glodCoin
}
=
this
.
data
;
// var isAgain = true;
// var isAgain = true
,glodCoin=100
;
//描述
//描述
let
title
=
Tool
.
getText
(
let
title
=
Tool
.
getText
(
"
达成目标分数
"
,
"
太棒了,目标达成!
"
,
34
,
34
,
"#333333"
,
"#333333"
,
FYGE
.
TEXT_ALIGN
.
CENTER
,
FYGE
.
TEXT_ALIGN
.
CENTER
,
23
0
32
0
);
);
this
.
addChild
(
title
);
this
.
addChild
(
title
);
title
.
position
.
set
(
2
7
0
,
780
);
title
.
position
.
set
(
2
4
0
,
780
);
//获得奖励
//获得奖励
let
getPrizeText
=
Tool
.
getText
(
let
getPrizeText
=
Tool
.
getText
(
"获得奖励"
,
"获得奖励"
,
...
@@ -62,7 +62,7 @@ export class GameSuccessPanel extends Panel {
...
@@ -62,7 +62,7 @@ export class GameSuccessPanel extends Panel {
//金币
//金币
let
coin
=
new
FYGE
.
Sprite
(
RES
.
getRes
(
"cat_coin.png"
));
let
coin
=
new
FYGE
.
Sprite
(
RES
.
getRes
(
"cat_coin.png"
));
this
.
addChild
(
coin
);
this
.
addChild
(
coin
);
coin
.
position
.
set
(
3
15
,
900
);
coin
.
position
.
set
(
3
30
,
900
);
let
coinText
=
Tool
.
getText
(
let
coinText
=
Tool
.
getText
(
`x
${
glodCoin
}
`
,
`x
${
glodCoin
}
`
,
...
@@ -72,7 +72,7 @@ export class GameSuccessPanel extends Panel {
...
@@ -72,7 +72,7 @@ export class GameSuccessPanel extends Panel {
90
90
);
);
this
.
addChild
(
coinText
);
this
.
addChild
(
coinText
);
coinText
.
position
.
set
(
36
5
,
908
);
coinText
.
position
.
set
(
36
0
,
908
);
//爱心
//爱心
// let love = new FYGE.Sprite(RES.getRes("bubble_love.png"));
// let love = new FYGE.Sprite(RES.getRes("bubble_love.png"));
// this.addChild(love);
// this.addChild(love);
...
@@ -119,6 +119,7 @@ export class GameSuccessPanel extends Panel {
...
@@ -119,6 +119,7 @@ export class GameSuccessPanel extends Panel {
//等等再来玩
//等等再来玩
onClickAwait
()
{
onClickAwait
()
{
GDispatcher
.
dispatchEvent
(
"hideCat-await"
);
GDispatcher
.
dispatchEvent
(
"hideCat-await"
);
GDispatcher
.
dispatchEvent
(
"clickBuried"
,
{
md
:
54
});
this
.
hidePanel
();
this
.
hidePanel
();
}
}
...
@@ -128,7 +129,7 @@ export class GameSuccessPanel extends Panel {
...
@@ -128,7 +129,7 @@ export class GameSuccessPanel extends Panel {
if
(
this
.
againBtn
.
visible
)
{
if
(
this
.
againBtn
.
visible
)
{
GDispatcher
.
dispatchEvent
(
"clickBuried"
,
{
md
:
40
});
GDispatcher
.
dispatchEvent
(
"clickBuried"
,
{
md
:
40
});
}
else
{
}
else
{
GDispatcher
.
dispatchEvent
(
"clickBuried"
,
{
md
:
4
0
});
GDispatcher
.
dispatchEvent
(
"clickBuried"
,
{
md
:
4
2
});
}
}
GDispatcher
.
dispatchEvent
(
"hideCat-share"
);
GDispatcher
.
dispatchEvent
(
"hideCat-share"
);
...
...
src/scenes/GameScenes.ts
View file @
e7ff8f68
...
@@ -33,6 +33,7 @@ export class GameScenes extends Scene {
...
@@ -33,6 +33,7 @@ export class GameScenes extends Scene {
if
(
!
this
.
game
)
{
if
(
!
this
.
game
)
{
this
.
game
=
new
HideAndSeek
(
this
);
this
.
game
=
new
HideAndSeek
(
this
);
}
}
if
(
MConst
.
options
.
scheduleFinished
==
1
)
TimerCountMgr
.
instance
.
drawTimerCount
();
TimerCountMgr
.
instance
.
drawTimerCount
();
//设置隐藏属性和改变可见属性的事件的名称
//设置隐藏属性和改变可见属性的事件的名称
let
hidden
:
string
,
let
hidden
:
string
,
...
...
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