Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
interactiveGames_Level
Project
Project
Details
Activity
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
xuxing@jiuaoedu.com
interactiveGames_Level
Commits
86a9a25e
Commit
86a9a25e
authored
Sep 24, 2021
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
准备加入关卡成功信息发送
parent
537a65c6
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
19 additions
and
172 deletions
+19
-172
FaceRecognitionCtr.ts
...Bundle/games/FaceRecognition/script/FaceRecognitionCtr.ts
+0
-12
BombDisposalExpertCtr.ts
.../games/bombDisposalExpert/script/BombDisposalExpertCtr.ts
+0
-12
BuyTicketCtr.ts
assets/sceneBundle/games/buyTicket/script/BuyTicketCtr.ts
+0
-12
ClassifyCtr_1.ts
...s/sceneBundle/games/classify-star/script/ClassifyCtr_1.ts
+0
-12
ClassifyCtr.ts
assets/sceneBundle/games/classify/script/ClassifyCtr.ts
+0
-12
ChallengeSuccView.ts
.../sceneBundle/games/commonView/script/ChallengeSuccView.ts
+17
-3
FoodForThePartyCtr.ts
...Bundle/games/foodForTheParty/script/FoodForThePartyCtr.ts
+0
-12
QuickQuizCtr.ts
assets/sceneBundle/games/quickQuiz/script/QuickQuizCtr.ts
+0
-12
SchultePoem_9.scene
assets/sceneBundle/games/schulte/scene/SchultePoem_9.scene
+1
-1
SchulteCtr.ts
assets/sceneBundle/games/schulte/script/SchulteCtr.ts
+0
-24
SiHaiShiYiCtr.ts
assets/sceneBundle/games/siHaiShiYi/script/SiHaiShiYiCtr.ts
+0
-12
TransientCtr_1.ts
assets/sceneBundle/games/transient/script/TransientCtr_1.ts
+0
-12
UniqueCtr_1.ts
assets/sceneBundle/games/unique-1/script/UniqueCtr_1.ts
+0
-12
UniqueCtr_2.ts
assets/sceneBundle/games/unique-2/script/UniqueCtr_2.ts
+0
-12
UniqueCtr.ts
assets/sceneBundle/games/unique/script/UniqueCtr.ts
+0
-12
HtmlSendDataMgr.ts
assets/startFolder/script/HtmlSendDataMgr.ts
+1
-0
No files found.
assets/sceneBundle/games/FaceRecognition/script/FaceRecognitionCtr.ts
View file @
86a9a25e
...
...
@@ -226,18 +226,6 @@ export class FaceRecognitionCtr extends Component {
node
?.
getComponent
(
ChallengeFailView
);
},
VIEW_INDEX
.
TOP
);
}
//把数据发给包裹游戏的容器
let
sendOutData
:
GameEndDataItf
=
{
gameId
:
this
.
gameId
,
gameScore
:
this
.
curScore
,
gameEvaluation
:
this
.
getEvaluation
(
this
.
curScore
),
durTime
:
Math
.
floor
(
this
.
costTime
*
1000
),
totalTime
:
Math
.
floor
(
this
.
costTime
*
1000
),
finishRate
:
<
number
><
any
>
(
this
.
curScore
/
this
.
succScore
).
toFixed
(
4
),
type
:
"cocos_game"
}
htmlSendDataMgr
.
sendDataOut
(
JSON
.
stringify
(
sendOutData
));
//************************** */
}
//随机生成一个人物信息
...
...
assets/sceneBundle/games/bombDisposalExpert/script/BombDisposalExpertCtr.ts
View file @
86a9a25e
...
...
@@ -376,18 +376,6 @@ export class BombDisposalExpertCtr extends Component {
node
?.
getComponent
(
ChallengeFailView
);
},
VIEW_INDEX
.
TOP
);
}
//把数据发给包裹游戏的容器
let
sendOutData
:
GameEndDataItf
=
{
gameId
:
this
.
gameId
,
gameScore
:
this
.
curScore
,
gameEvaluation
:
this
.
getEvaluation
(
this
.
curScore
),
durTime
:
Math
.
floor
(
this
.
costTime
*
1000
),
totalTime
:
Math
.
floor
(
this
.
costTime
*
1000
),
finishRate
:
<
number
><
any
>
(
this
.
curScore
/
this
.
succScore
).
toFixed
(
4
),
type
:
"cocos_game"
}
htmlSendDataMgr
.
sendDataOut
(
JSON
.
stringify
(
sendOutData
));
//************************** */
}
isGameOver
()
{
...
...
assets/sceneBundle/games/buyTicket/script/BuyTicketCtr.ts
View file @
86a9a25e
...
...
@@ -149,18 +149,6 @@ export class BuyTicketCtr extends Component {
node
?.
getComponent
(
ChallengeFailView
);
},
VIEW_INDEX
.
TOP
);
}
//把数据发给包裹游戏的容器
let
sendOutData
:
GameEndDataItf
=
{
gameId
:
this
.
gameId
,
gameScore
:
this
.
curScore
,
gameEvaluation
:
this
.
getEvaluation
(
this
.
curScore
),
durTime
:
Math
.
floor
(
this
.
costTime
*
1000
),
totalTime
:
Math
.
floor
(
this
.
costTime
*
1000
),
finishRate
:
<
number
><
any
>
(
this
.
curScore
/
this
.
succScore
).
toFixed
(
4
),
type
:
"cocos_game"
}
htmlSendDataMgr
.
sendDataOut
(
JSON
.
stringify
(
sendOutData
));
//************************** */
}
//列出火车表
...
...
assets/sceneBundle/games/classify-star/script/ClassifyCtr_1.ts
View file @
86a9a25e
...
...
@@ -313,18 +313,6 @@ export class ClassifyCtr_1 extends Component {
},
VIEW_INDEX
.
TOP
);
find
(
"Audio"
)?.
getComponent
(
AudioCtr
)?.
playOneShot
(
this
.
failMus
);
}
//把数据发给包裹游戏的容器
let
sendOutData
:
GameEndDataItf
=
{
type
:
"cocos_game"
,
gameId
:
this
.
gameId
,
gameScore
:
this
.
curScore
,
gameEvaluation
:
this
.
getEvaluation
(
this
.
curScore
),
durTime
:
curTime
-
this
.
beginTime
,
totalTime
:
curTime
-
this
.
beginTime
,
finishRate
:
<
number
><
any
>
(
this
.
curScore
/
this
.
succScore
).
toFixed
(
4
)
}
htmlSendDataMgr
.
sendDataOut
(
JSON
.
stringify
(
sendOutData
));
//************************** */
}
else
{
this
.
timeLab
.
string
=
ClassifyUtils_1
.
formatTime
(
this
.
totalTime
*
1000
-
(
curTime
-
this
.
beginTime
));
...
...
assets/sceneBundle/games/classify/script/ClassifyCtr.ts
View file @
86a9a25e
...
...
@@ -280,18 +280,6 @@ export class ClassifyCtr extends Component {
},
VIEW_INDEX
.
TOP
);
find
(
"Audio"
)?.
getComponent
(
AudioCtr
)?.
playOneShot
(
this
.
failMus
);
}
//把数据发给包裹游戏的容器
let
sendOutData
:
GameEndDataItf
=
{
type
:
"cocos_game"
,
gameId
:
this
.
gameId
,
gameScore
:
this
.
curScore
,
gameEvaluation
:
this
.
getEvaluation
(
this
.
curScore
),
durTime
:
curTime
-
this
.
beginTime
,
totalTime
:
curTime
-
this
.
beginTime
,
finishRate
:
<
number
><
any
>
(
this
.
curScore
/
this
.
succScore
).
toFixed
(
4
)
}
htmlSendDataMgr
.
sendDataOut
(
JSON
.
stringify
(
sendOutData
));
//************************** */
}
else
{
this
.
timeLab
.
string
=
ClassifyUtils
.
formatTime
(
this
.
totalTime
*
1000
-
(
curTime
-
this
.
beginTime
));
...
...
assets/sceneBundle/games/commonView/script/ChallengeSuccView.ts
View file @
86a9a25e
import
{
_decorator
,
Component
,
Node
,
Label
,
director
}
from
'cc'
;
import
{
Utils
}
from
'../../../../startFolder/script/common/Utils'
;
import
{
GameEndDataItf
,
htmlSendDataMgr
}
from
'../../../../startFolder/script/HtmlSendDataMgr'
;
import
{
levelMgr
}
from
'../../../../startFolder/script/LevelMgr'
;
const
{
ccclass
,
property
}
=
_decorator
;
...
...
@@ -21,6 +22,19 @@ export class ChallengeSuccView extends Component {
this
.
countdownLab
!
.
string
=
"(5)"
;
this
.
costTime
=
0
;
this
.
isClickOnce
=
false
;
//把数据发给包裹游戏的容器
if
(
levelMgr
.
unLockCount
>=
levelMgr
.
getLevelCount
(
levelMgr
.
gameIdHead
))
return
;
// let sendOutData: GameEndDataItf = {
// gameId: levelMgr.gameIdHead * 100 + (),
// gameScore: this.curScore,
// gameEvaluation: this.getEvaluation(this.curScore),
// durTime: Math.floor(this.costTime * 1000),
// totalTime: Math.floor(this.costTime * 1000),
// finishRate: <number><any>(this.curScore / this.succScore).toFixed(4),
// type: "cocos_game"
// }
// htmlSendDataMgr.sendDataOut(JSON.stringify(sendOutData));
//************************** */
}
update
(
deltaTime
:
number
)
{
...
...
@@ -35,13 +49,13 @@ export class ChallengeSuccView extends Component {
}
onBackBtnClick
()
{
if
(
levelMgr
.
unLockCount
<=
levelMgr
.
runLevel
)
levelMgr
.
unLockCount
+=
1
;
if
(
levelMgr
.
unLockCount
<=
levelMgr
.
runLevel
)
levelMgr
.
unLockCount
+=
1
;
levelMgr
.
backLevelHome
();
}
onContinueBtnClick
()
{
if
(
levelMgr
.
unLockCount
<=
levelMgr
.
runLevel
)
levelMgr
.
unLockCount
+=
1
;
levelMgr
.
runLevel
+=
1
;
if
(
levelMgr
.
unLockCount
<=
levelMgr
.
runLevel
)
levelMgr
.
unLockCount
+=
1
;
levelMgr
.
runLevel
+=
1
;
levelMgr
.
loadLevel
();
}
...
...
assets/sceneBundle/games/foodForTheParty/script/FoodForThePartyCtr.ts
View file @
86a9a25e
...
...
@@ -181,18 +181,6 @@ export class FoodForThePartyCtr extends Component {
node
?.
getComponent
(
ChallengeFailView
);
},
VIEW_INDEX
.
TOP
);
}
//把数据发给包裹游戏的容器
let
sendOutData
:
GameEndDataItf
=
{
gameId
:
this
.
gameId
,
gameScore
:
this
.
curScore
,
gameEvaluation
:
this
.
getEvaluation
(
this
.
curScore
),
durTime
:
Math
.
floor
(
this
.
costTime
*
1000
),
totalTime
:
Math
.
floor
(
this
.
costTime
*
1000
),
finishRate
:
<
number
><
any
>
(
this
.
curScore
/
this
.
succScore
).
toFixed
(
4
),
type
:
"cocos_game"
}
htmlSendDataMgr
.
sendDataOut
(
JSON
.
stringify
(
sendOutData
));
//************************** */
}
//倒计时
...
...
assets/sceneBundle/games/quickQuiz/script/QuickQuizCtr.ts
View file @
86a9a25e
...
...
@@ -128,18 +128,6 @@ export class QuickQuizCtr extends Component {
view
?.
getComponent
(
ChallengeFailView
);
},
VIEW_INDEX
.
TOP
);
}
//把数据发给包裹游戏的容器
let
sendOutData
:
GameEndDataItf
=
{
gameId
:
this
.
gameId
,
gameScore
:
this
.
curScore
,
gameEvaluation
:
this
.
getEvaluation
(
this
.
curScore
),
durTime
:
Math
.
floor
(
this
.
costTime
*
1000
),
totalTime
:
Math
.
floor
(
this
.
costTime
*
1000
),
finishRate
:
<
number
><
any
>
(
this
.
curScore
/
this
.
succScore
).
toFixed
(
4
),
type
:
"cocos_game"
}
htmlSendDataMgr
.
sendDataOut
(
JSON
.
stringify
(
sendOutData
));
//************************** */
}
roundStart
()
{
...
...
assets/sceneBundle/games/schulte/scene/SchultePoem_9.scene
View file @
86a9a25e
...
...
@@ -321,7 +321,7 @@
"_priority": 1073741824,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight": 41
4.4124472573839
,
"_orthoHeight": 41
8.6192468619247
,
"_near": 1,
"_far": 2000,
"_color": {
...
...
assets/sceneBundle/games/schulte/script/SchulteCtr.ts
View file @
86a9a25e
...
...
@@ -169,18 +169,6 @@ export class SchulteCtr extends Component {
node
?.
getComponent
(
ChallengeSuccView
)?.
init
();
find
(
"Audio"
)?.
getComponent
(
AudioCtr
)?.
playOneShot
(
this
.
endMus
);
},
VIEW_INDEX
.
TOP
);
//把数据发给包裹游戏的容器
let
sendOutData
:
GameEndDataItf
=
{
type
:
"cocos_game"
,
gameId
:
this
.
gameId
,
gameScore
:
<
number
><
any
>
(
1
/
(
Math
.
round
((
this
.
gameEndTime
-
this
.
beginTime
)
/
1000
)
/
this
.
totalTime
)).
toFixed
(
4
)
*
10000
,
gameEvaluation
:
this
.
getEvaluation
(
this
.
gameEndTime
-
this
.
beginTime
),
durTime
:
this
.
gameEndTime
-
this
.
beginTime
,
totalTime
:
this
.
gameEndTime
-
this
.
beginTime
,
finishRate
:
1
/
<
number
><
any
>
(
Math
.
round
((
this
.
gameEndTime
-
this
.
beginTime
)
/
1000
)
/
this
.
totalTime
).
toFixed
(
4
)
}
htmlSendDataMgr
.
sendDataOut
(
JSON
.
stringify
(
sendOutData
));
//************************** */
}
});
director
.
on
(
"continue_game"
,
()
=>
{
...
...
@@ -262,18 +250,6 @@ export class SchulteCtr extends Component {
find
(
"Audio"
)?.
getComponent
(
AudioCtr
)?.
playOneShot
(
this
.
endMus
);
find
(
"Audio"
)?.
getComponent
(
AudioCtr
)?.
playOneShot
(
this
.
failMus
);
},
VIEW_INDEX
.
TOP
);
//把数据发给包裹游戏的容器
let
sendOutData
:
GameEndDataItf
=
{
type
:
"cocos_game"
,
gameId
:
this
.
gameId
,
gameScore
:
<
number
><
any
>
(
1
/
(
Math
.
round
((
this
.
gameEndTime
-
this
.
beginTime
)
/
1000
)
/
this
.
totalTime
)).
toFixed
(
4
)
*
10000
,
gameEvaluation
:
this
.
getEvaluation
(
this
.
gameEndTime
-
this
.
beginTime
),
durTime
:
this
.
gameEndTime
-
this
.
beginTime
,
totalTime
:
this
.
gameEndTime
-
this
.
beginTime
,
finishRate
:
<
number
><
any
>
(
Math
.
round
((
this
.
gameEndTime
-
this
.
beginTime
)
/
1000
)
/
this
.
totalTime
).
toFixed
(
4
)
}
htmlSendDataMgr
.
sendDataOut
(
JSON
.
stringify
(
sendOutData
));
//************************** */
}
this
.
timeLab
.
string
=
SchulteUtils
.
formatTime
(
this
.
totalTime
*
1000
-
(
endTime
-
this
.
beginTime
));
}
...
...
assets/sceneBundle/games/siHaiShiYi/script/SiHaiShiYiCtr.ts
View file @
86a9a25e
...
...
@@ -228,18 +228,6 @@ export class SiHaiShiYiCtr extends Component {
node
?.
getComponent
(
ChallengeFailView
);
},
VIEW_INDEX
.
TOP
);
}
//把数据发给包裹游戏的容器
let
sendOutData
:
GameEndDataItf
=
{
gameId
:
this
.
gameId
,
gameScore
:
this
.
curScore
,
gameEvaluation
:
this
.
getEvaluation
(
this
.
curScore
),
durTime
:
Math
.
floor
(
this
.
costTime
*
1000
),
totalTime
:
Math
.
floor
(
this
.
costTime
*
1000
),
finishRate
:
<
number
><
any
>
(
this
.
curScore
/
this
.
succScore
).
toFixed
(
4
),
type
:
"cocos_game"
}
htmlSendDataMgr
.
sendDataOut
(
JSON
.
stringify
(
sendOutData
));
//************************** */
}
//获取每一轮应该展示的图片,注意是所有老图片加三张新图片
...
...
assets/sceneBundle/games/transient/script/TransientCtr_1.ts
View file @
86a9a25e
...
...
@@ -331,18 +331,6 @@ export class TransientCtr_1 extends Component {
node
?.
getComponent
(
ChallengeFailView
);
},
VIEW_INDEX
.
TOP
);
}
//把数据发给包裹游戏的容器
let
sendOutData
:
GameEndDataItf
=
{
gameId
:
this
.
gameId
,
gameScore
:
this
.
curScore
,
gameEvaluation
:
this
.
getEvaluation
(
this
.
curScore
),
durTime
:
Math
.
floor
(
this
.
costTime
*
1000
),
totalTime
:
Math
.
floor
(
this
.
costTime
*
1000
),
finishRate
:
<
number
><
any
>
(
this
.
curScore
/
this
.
succScore
).
toFixed
(
4
),
type
:
"cocos_game"
}
htmlSendDataMgr
.
sendDataOut
(
JSON
.
stringify
(
sendOutData
));
//************************** */
}
isGameOver
()
{
...
...
assets/sceneBundle/games/unique-1/script/UniqueCtr_1.ts
View file @
86a9a25e
...
...
@@ -538,18 +538,6 @@ export class UniqueCtr_1 extends Component {
this
.
gameState
=
GameState
.
END
;
log
(
`游戏已经失败`
);
}
//把数据发给包裹游戏的容器
let
sendOutData
:
GameEndDataItf
=
{
gameId
:
this
.
gameId
,
gameScore
:
this
.
curScore
,
gameEvaluation
:
this
.
getEvaluation
(
this
.
curScore
),
durTime
:
endTime
-
this
.
beginTime
,
totalTime
:
endTime
-
this
.
beginTime
,
finishRate
:
<
number
><
any
>
(
this
.
curScore
/
this
.
succScore
).
toFixed
(
4
),
type
:
"cocos_game"
}
htmlSendDataMgr
.
sendDataOut
(
JSON
.
stringify
(
sendOutData
));
//************************** */
}
this
.
timeLab
.
string
=
UniqueUtils_1
.
formatTime
(
this
.
totalTime
*
1000
-
(
endTime
-
this
.
beginTime
));
}
...
...
assets/sceneBundle/games/unique-2/script/UniqueCtr_2.ts
View file @
86a9a25e
...
...
@@ -542,18 +542,6 @@ export class UniqueCtr_2 extends Component {
this
.
gameState
=
GameState
.
END
;
log
(
`游戏已经失败`
);
}
//把数据发给包裹游戏的容器
let
sendOutData
:
GameEndDataItf
=
{
gameId
:
this
.
gameId
,
gameScore
:
this
.
curScore
,
gameEvaluation
:
this
.
getEvaluation
(
this
.
curScore
),
durTime
:
endTime
-
this
.
beginTime
,
totalTime
:
endTime
-
this
.
beginTime
,
finishRate
:
<
number
><
any
>
(
this
.
curScore
/
this
.
succScore
).
toFixed
(
4
),
type
:
"cocos_game"
}
htmlSendDataMgr
.
sendDataOut
(
JSON
.
stringify
(
sendOutData
));
//************************** */
}
this
.
timeLab
.
string
=
UniqueUtils_2
.
formatTime
(
this
.
totalTime
*
1000
-
(
endTime
-
this
.
beginTime
));
}
...
...
assets/sceneBundle/games/unique/script/UniqueCtr.ts
View file @
86a9a25e
...
...
@@ -548,18 +548,6 @@ export class UniqueCtr extends Component {
this
.
gameState
=
GameState
.
END
;
log
(
`游戏已经失败`
);
}
//把数据发给包裹游戏的容器
let
sendOutData
:
GameEndDataItf
=
{
gameId
:
this
.
gameId
,
gameScore
:
this
.
curScore
,
gameEvaluation
:
this
.
getEvaluation
(
this
.
curScore
),
durTime
:
endTime
-
this
.
beginTime
,
totalTime
:
endTime
-
this
.
beginTime
,
finishRate
:
<
number
><
any
>
(
this
.
curScore
/
this
.
succScore
).
toFixed
(
4
),
type
:
"cocos_game"
}
htmlSendDataMgr
.
sendDataOut
(
JSON
.
stringify
(
sendOutData
));
//************************** */
}
this
.
timeLab
.
string
=
UniqueUtils
.
formatTime
(
this
.
totalTime
*
1000
-
(
endTime
-
this
.
beginTime
));
}
...
...
assets/startFolder/script/HtmlSendDataMgr.ts
View file @
86a9a25e
...
...
@@ -37,6 +37,7 @@ class HtmlSendDataMgr {
if
(
HTML5
||
PREVIEW
)
{
console
.
log
(
`xuhang发送postMessage数据:`
);
console
.
log
(
data
);
//@ts-ignore
window
.
top
.
postMessage
(
data
,
this
.
targetOrigin
);
//@ts-ignore
if
(
typeof
wx
!=
"undefined"
)
{
...
...
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