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
f9927fbf
Commit
f9927fbf
authored
Sep 18, 2021
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加食物派对关卡
parent
1210959f
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
256 additions
and
10 deletions
+256
-10
FoodForTheParty_1.scene
...undle/games/foodForTheParty/scene/FoodForTheParty_1.scene
+4
-6
FoodForTheParty_2.scene
...undle/games/foodForTheParty/scene/FoodForTheParty_2.scene
+0
-0
FoodForTheParty_2.scene.meta
.../games/foodForTheParty/scene/FoodForTheParty_2.scene.meta
+1
-0
FoodForThePartyCtr.ts
...Bundle/games/foodForTheParty/script/FoodForThePartyCtr.ts
+30
-2
LevelCfg.ts
assets/startFolder/script/LevelCfg.ts
+215
-2
SceneDef.ts
assets/startFolder/script/common/SceneDef.ts
+6
-0
No files found.
assets/sceneBundle/games/foodForTheParty/scene/FoodForTheParty_1.scene
View file @
f9927fbf
...
@@ -315,7 +315,7 @@
...
@@ -315,7 +315,7 @@
"_priority": 1073741824,
"_priority": 1073741824,
"_fov": 45,
"_fov": 45,
"_fovAxis": 0,
"_fovAxis": 0,
"_orthoHeight": 41
8.6192468619247
,
"_orthoHeight": 41
4.4124472573839
,
"_near": 1,
"_near": 1,
"_far": 2000,
"_far": 2000,
"_color": {
"_color": {
...
@@ -4628,7 +4628,7 @@
...
@@ -4628,7 +4628,7 @@
},
},
"_enabled": true,
"_enabled": true,
"__prefab": null,
"__prefab": null,
"pipName": "
蓝
色管道",
"pipName": "
绿
色管道",
"pipColor": {
"pipColor": {
"__type__": "cc.Color",
"__type__": "cc.Color",
"r": 3,
"r": 3,
...
@@ -4682,7 +4682,7 @@
...
@@ -4682,7 +4682,7 @@
"__id__": 322
"__id__": 322
}
}
],
],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 328
"__id__": 328
...
@@ -10752,9 +10752,6 @@
...
@@ -10752,9 +10752,6 @@
"pips": [
"pips": [
{
{
"__id__": 173
"__id__": 173
},
{
"__id__": 330
}
}
],
],
"cdPgBar": {
"cdPgBar": {
...
@@ -10771,6 +10768,7 @@
...
@@ -10771,6 +10768,7 @@
},
},
"oneScore": 10,
"oneScore": 10,
"succScore": 100,
"succScore": 100,
"foodCount": 2,
"totalTime": 120,
"totalTime": 120,
"evaluationPercents": [
"evaluationPercents": [
0.8,
0.8,
...
...
assets/sceneBundle/games/foodForTheParty/scene/FoodForTheParty_2.scene
0 → 100644
View file @
f9927fbf
This source diff could not be displayed because it is too large. You can
view the blob
instead.
assets/sceneBundle/games/foodForTheParty/scene/FoodForTheParty_2.scene.meta
0 → 100644
View file @
f9927fbf
{"ver":"1.1.27","importer":"scene","imported":true,"uuid":"8a787276-9d38-4401-b13f-b39f1cb0a145","files":[".json"],"subMetas":{},"userData":{}}
assets/sceneBundle/games/foodForTheParty/script/FoodForThePartyCtr.ts
View file @
f9927fbf
...
@@ -64,6 +64,9 @@ export class FoodForThePartyCtr extends Component {
...
@@ -64,6 +64,9 @@ export class FoodForThePartyCtr extends Component {
@
property
(
CCInteger
)
@
property
(
CCInteger
)
succScore
:
number
=
0
;
succScore
:
number
=
0
;
@
property
(
CCInteger
)
foodCount
:
number
=
0
;
@
property
(
CCFloat
)
@
property
(
CCFloat
)
totalTime
:
number
=
10
;
totalTime
:
number
=
10
;
...
@@ -82,6 +85,30 @@ export class FoodForThePartyCtr extends Component {
...
@@ -82,6 +85,30 @@ export class FoodForThePartyCtr extends Component {
private
costTime
=
0
;
private
costTime
=
0
;
private
isPlayCountdownMus
=
false
;
private
isPlayCountdownMus
=
false
;
setGameData
(
resData
:
object
)
{
console
.
log
(
`kkkkkkttttttttt`
);
//@ts-ignore
if
(
resData
.
totalTime
)
{
//@ts-ignore
this
.
totalTime
=
resData
.
totalTime
;
}
//@ts-ignore
if
(
resData
.
foodCount
)
{
//@ts-ignore
this
.
foodCount
=
resData
.
foodCount
;
}
//@ts-ignore
if
(
resData
.
succScore
)
{
//@ts-ignore
this
.
succScore
=
resData
.
succScore
;
}
//@ts-ignore
if
(
resData
.
oneScore
)
{
//@ts-ignore
this
.
oneScore
=
resData
.
oneScore
;
}
}
start
()
{
start
()
{
let
outGameTime
=
Utils
.
getValueFromHref
(
"gameTime"
);
let
outGameTime
=
Utils
.
getValueFromHref
(
"gameTime"
);
if
(
outGameTime
!==
null
)
{
if
(
outGameTime
!==
null
)
{
...
@@ -108,7 +135,7 @@ export class FoodForThePartyCtr extends Component {
...
@@ -108,7 +135,7 @@ export class FoodForThePartyCtr extends Component {
this
.
gameStart
();
this
.
gameStart
();
}
}
onDestroy
(){
onDestroy
()
{
director
.
off
(
"issue_end"
);
director
.
off
(
"issue_end"
);
director
.
off
(
"continue_game"
);
director
.
off
(
"continue_game"
);
director
.
off
(
"begin_countdown_end"
);
director
.
off
(
"begin_countdown_end"
);
...
@@ -252,7 +279,8 @@ export class FoodForThePartyCtr extends Component {
...
@@ -252,7 +279,8 @@ export class FoodForThePartyCtr extends Component {
setPipsFoodImgNames
()
{
setPipsFoodImgNames
()
{
this
.
clearPips
();
this
.
clearPips
();
for
(
let
i
=
0
;
i
<
this
.
pips
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
pips
.
length
;
++
i
)
{
let
maxCount
=
Math
.
floor
(
Math
.
random
()
*
5
)
+
1
;
// let maxCount = Math.floor(Math.random() * 5) + 1;
let
maxCount
=
this
.
foodCount
;
let
names
:
string
[]
=
[];
let
names
:
string
[]
=
[];
while
(
names
.
length
<
maxCount
)
{
while
(
names
.
length
<
maxCount
)
{
let
name
=
foodNameArr
[
Math
.
floor
(
Math
.
random
()
*
foodNameArr
.
length
)];
let
name
=
foodNameArr
[
Math
.
floor
(
Math
.
random
()
*
foodNameArr
.
length
)];
...
...
assets/startFolder/script/LevelCfg.ts
View file @
f9927fbf
...
@@ -514,10 +514,223 @@ export const levelCfg: OneVarLevelItf[] = [
...
@@ -514,10 +514,223 @@ export const levelCfg: OneVarLevelItf[] = [
levelArr
:
[{
levelArr
:
[{
gameId
:
10001
,
gameId
:
10001
,
sceneUnitIfo
:
SCENE_DEF
.
FoodForTheParty_1
,
sceneUnitIfo
:
SCENE_DEF
.
FoodForTheParty_1
,
comName
:
"FoodForTheParty
_1
"
,
comName
:
"FoodForTheParty
Ctr
"
,
level
:
1
,
level
:
1
,
resData
:
{
resData
:
{
totalTime
:
120
totalTime
:
36
,
foodCount
:
2
,
succScore
:
30
,
oneScore
:
6
}
}
,
{
gameId
:
10002
,
sceneUnitIfo
:
SCENE_DEF
.
FoodForTheParty_1
,
comName
:
"FoodForThePartyCtr"
,
level
:
2
,
resData
:
{
totalTime
:
40
,
foodCount
:
3
,
succScore
:
30
,
oneScore
:
6
}
}
,
{
gameId
:
10003
,
sceneUnitIfo
:
SCENE_DEF
.
FoodForTheParty_1
,
comName
:
"FoodForThePartyCtr"
,
level
:
3
,
resData
:
{
totalTime
:
40
,
foodCount
:
3
,
succScore
:
40
,
oneScore
:
6
}
}
,
{
gameId
:
10004
,
sceneUnitIfo
:
SCENE_DEF
.
FoodForTheParty_1
,
comName
:
"FoodForThePartyCtr"
,
level
:
4
,
resData
:
{
totalTime
:
60
,
foodCount
:
4
,
succScore
:
40
,
oneScore
:
6
}
}
,
{
gameId
:
10005
,
sceneUnitIfo
:
SCENE_DEF
.
FoodForTheParty_1
,
comName
:
"FoodForThePartyCtr"
,
level
:
5
,
resData
:
{
totalTime
:
60
,
foodCount
:
4
,
succScore
:
48
,
oneScore
:
6
}
}
,
{
gameId
:
10006
,
sceneUnitIfo
:
SCENE_DEF
.
FoodForTheParty_1
,
comName
:
"FoodForThePartyCtr"
,
level
:
6
,
resData
:
{
totalTime
:
120
,
foodCount
:
5
,
succScore
:
30
,
oneScore
:
6
}
}
,
{
gameId
:
10007
,
sceneUnitIfo
:
SCENE_DEF
.
FoodForTheParty_1
,
comName
:
"FoodForThePartyCtr"
,
level
:
7
,
resData
:
{
totalTime
:
120
,
foodCount
:
5
,
succScore
:
36
,
oneScore
:
6
}
}
,
{
gameId
:
10008
,
sceneUnitIfo
:
SCENE_DEF
.
FoodForTheParty_1
,
comName
:
"FoodForThePartyCtr"
,
level
:
8
,
resData
:
{
totalTime
:
120
,
foodCount
:
5
,
succScore
:
42
,
oneScore
:
6
}
}
,
{
gameId
:
10009
,
sceneUnitIfo
:
SCENE_DEF
.
FoodForTheParty_1
,
comName
:
"FoodForThePartyCtr"
,
level
:
9
,
resData
:
{
totalTime
:
150
,
foodCount
:
5
,
succScore
:
60
,
oneScore
:
6
}
}
]
}
,
{
gameIdHead
:
101
,
title
:
"食物派对"
,
desc
:
"食物派对,两个管道"
,
levelArr
:
[{
gameId
:
10101
,
sceneUnitIfo
:
SCENE_DEF
.
FoodForTheParty_2
,
comName
:
"FoodForThePartyCtr"
,
level
:
1
,
resData
:
{
totalTime
:
36
,
foodCount
:
2
,
succScore
:
30
,
oneScore
:
6
}
}
,
{
gameId
:
10102
,
sceneUnitIfo
:
SCENE_DEF
.
FoodForTheParty_2
,
comName
:
"FoodForThePartyCtr"
,
level
:
2
,
resData
:
{
totalTime
:
40
,
foodCount
:
3
,
succScore
:
30
,
oneScore
:
6
}
}
,
{
gameId
:
10103
,
sceneUnitIfo
:
SCENE_DEF
.
FoodForTheParty_2
,
comName
:
"FoodForThePartyCtr"
,
level
:
3
,
resData
:
{
totalTime
:
40
,
foodCount
:
3
,
succScore
:
40
,
oneScore
:
6
}
}
,
{
gameId
:
10104
,
sceneUnitIfo
:
SCENE_DEF
.
FoodForTheParty_2
,
comName
:
"FoodForThePartyCtr"
,
level
:
4
,
resData
:
{
totalTime
:
60
,
foodCount
:
4
,
succScore
:
40
,
oneScore
:
6
}
}
,
{
gameId
:
10105
,
sceneUnitIfo
:
SCENE_DEF
.
FoodForTheParty_2
,
comName
:
"FoodForThePartyCtr"
,
level
:
5
,
resData
:
{
totalTime
:
60
,
foodCount
:
4
,
succScore
:
48
,
oneScore
:
6
}
}
,
{
gameId
:
10106
,
sceneUnitIfo
:
SCENE_DEF
.
FoodForTheParty_2
,
comName
:
"FoodForThePartyCtr"
,
level
:
6
,
resData
:
{
totalTime
:
120
,
foodCount
:
5
,
succScore
:
30
,
oneScore
:
6
}
}
,
{
gameId
:
10107
,
sceneUnitIfo
:
SCENE_DEF
.
FoodForTheParty_2
,
comName
:
"FoodForThePartyCtr"
,
level
:
7
,
resData
:
{
totalTime
:
120
,
foodCount
:
5
,
succScore
:
36
,
oneScore
:
6
}
}
,
{
gameId
:
10108
,
sceneUnitIfo
:
SCENE_DEF
.
FoodForTheParty_2
,
comName
:
"FoodForThePartyCtr"
,
level
:
8
,
resData
:
{
totalTime
:
120
,
foodCount
:
5
,
succScore
:
42
,
oneScore
:
6
}
}
,
{
gameId
:
10109
,
sceneUnitIfo
:
SCENE_DEF
.
FoodForTheParty_2
,
comName
:
"FoodForThePartyCtr"
,
level
:
9
,
resData
:
{
totalTime
:
150
,
foodCount
:
5
,
succScore
:
60
,
oneScore
:
6
}
}
}
}
]
]
...
...
assets/startFolder/script/common/SceneDef.ts
View file @
f9927fbf
...
@@ -73,6 +73,7 @@ interface ScenePathItf {
...
@@ -73,6 +73,7 @@ interface ScenePathItf {
PasswordMatrix_1
:
ScenePathUnitItf
,
PasswordMatrix_1
:
ScenePathUnitItf
,
//食物派对
//食物派对
FoodForTheParty_1
:
ScenePathUnitItf
,
FoodForTheParty_1
:
ScenePathUnitItf
,
FoodForTheParty_2
:
ScenePathUnitItf
,
//快问快答
//快问快答
QuickQuiz_1
:
ScenePathUnitItf
,
QuickQuiz_1
:
ScenePathUnitItf
,
}
}
...
@@ -302,6 +303,11 @@ export const SCENE_DEF: ScenePathItf = {
...
@@ -302,6 +303,11 @@ export const SCENE_DEF: ScenePathItf = {
sceneName
:
"FoodForTheParty_1"
,
sceneName
:
"FoodForTheParty_1"
,
desc
:
"食物派对,第一个版本"
desc
:
"食物派对,第一个版本"
},
},
FoodForTheParty_2
:
{
bundleName
:
"sceneBundle"
,
sceneName
:
"FoodForTheParty_2"
,
desc
:
"食物派对,第一个版本,两个管道"
},
QuickQuiz_1
:
{
QuickQuiz_1
:
{
bundleName
:
"sceneBundle"
,
bundleName
:
"sceneBundle"
,
sceneName
:
"QuickQuiz_1"
,
sceneName
:
"QuickQuiz_1"
,
...
...
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