Commit f9927fbf authored by unknown's avatar unknown

增加食物派对关卡

parent 1210959f
......@@ -315,7 +315,7 @@
"_priority": 1073741824,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight": 418.6192468619247,
"_orthoHeight": 414.4124472573839,
"_near": 1,
"_far": 2000,
"_color": {
......@@ -4628,7 +4628,7 @@
},
"_enabled": true,
"__prefab": null,
"pipName": "蓝色管道",
"pipName": "绿色管道",
"pipColor": {
"__type__": "cc.Color",
"r": 3,
......@@ -4682,7 +4682,7 @@
"__id__": 322
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 328
......@@ -10752,9 +10752,6 @@
"pips": [
{
"__id__": 173
},
{
"__id__": 330
}
],
"cdPgBar": {
......@@ -10771,6 +10768,7 @@
},
"oneScore": 10,
"succScore": 100,
"foodCount": 2,
"totalTime": 120,
"evaluationPercents": [
0.8,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{"ver":"1.1.27","importer":"scene","imported":true,"uuid":"8a787276-9d38-4401-b13f-b39f1cb0a145","files":[".json"],"subMetas":{},"userData":{}}
......@@ -64,6 +64,9 @@ export class FoodForThePartyCtr extends Component {
@property(CCInteger)
succScore: number = 0;
@property(CCInteger)
foodCount: number = 0;
@property(CCFloat)
totalTime: number = 10;
......@@ -82,6 +85,30 @@ export class FoodForThePartyCtr extends Component {
private costTime = 0;
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() {
let outGameTime = Utils.getValueFromHref("gameTime");
if (outGameTime !== null) {
......@@ -94,7 +121,7 @@ export class FoodForThePartyCtr extends Component {
});
director.on("finish_game", () => {
});
director.on("begin_countdown_end", () => {
......@@ -108,7 +135,7 @@ export class FoodForThePartyCtr extends Component {
this.gameStart();
}
onDestroy(){
onDestroy() {
director.off("issue_end");
director.off("continue_game");
director.off("begin_countdown_end");
......@@ -252,7 +279,8 @@ export class FoodForThePartyCtr extends Component {
setPipsFoodImgNames() {
this.clearPips();
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[] = [];
while (names.length < maxCount) {
let name = foodNameArr[Math.floor(Math.random() * foodNameArr.length)];
......
......@@ -514,10 +514,223 @@ export const levelCfg: OneVarLevelItf[] = [
levelArr: [{
gameId: 10001,
sceneUnitIfo: SCENE_DEF.FoodForTheParty_1,
comName: "FoodForTheParty_1",
comName: "FoodForThePartyCtr",
level: 1,
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
}
}
]
......
......@@ -73,6 +73,7 @@ interface ScenePathItf {
PasswordMatrix_1: ScenePathUnitItf,
//食物派对
FoodForTheParty_1: ScenePathUnitItf,
FoodForTheParty_2: ScenePathUnitItf,
//快问快答
QuickQuiz_1: ScenePathUnitItf,
}
......@@ -302,6 +303,11 @@ export const SCENE_DEF: ScenePathItf = {
sceneName: "FoodForTheParty_1",
desc: "食物派对,第一个版本"
},
FoodForTheParty_2: {
bundleName: "sceneBundle",
sceneName: "FoodForTheParty_2",
desc: "食物派对,第一个版本,两个管道"
},
QuickQuiz_1: {
bundleName: "sceneBundle",
sceneName: "QuickQuiz_1",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment