Commit 9beace3b authored by 杨一航's avatar 杨一航

add. v.1.0

parent 4520561b
This diff is collapsed.
{
"ver": "1.2.9",
"uuid": "3640d4f7-1ea8-468f-a18b-26ab9bd18276",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
......@@ -16,10 +16,10 @@ export default class BoardCardItem extends cc.Component {
_word: string;
letter: string = '';
set cardData(data: { id: number, rjumpId: number, wJumpId?: number, url: string, word: "string" }) {
set cardData(data: { id: number, rJumpId: number, wJumpId?: number, url: string, word: "string" }) {
this._cardId = data.id;
this._rjumpId = data.rjumpId;
this._rjumpId = data.rJumpId;
this._wjumpId = data.wJumpId;
this._cardUrl = data.url;
this._word = data.word;
......
This diff is collapsed.
cc.Class({
extends: cc.Component,
properties: {
},
start() {
const BtnExit = cc.find('BtnFrame/BtnExit', this.node);
this.buttonOnClick(BtnExit, () => {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer');
if (middleLayerComponent.onClickExitBtn) {
middleLayerComponent.onClickExitBtn();
}
} else {
cc.director.getScene().destroy();
cc.audioEngine.stopAll();
if (window.courseware) {
window.courseware.freeAllOcMethod();
}
var bundle = cc.assetManager.bundles.find((obj) => {
return obj.getSceneInfo('debug_shell');
});
if (bundle) {
cc.director.loadScene("debug_shell", null, null, (err, scene) => { });
} else {
cc.director.loadScene("OXFORDCORE", null, null, (err, scene) => { });
}
}
});
const BtnPlayAgain = cc.find('BtnFrame/BtnPlayAgain', this.node);
this.buttonOnClick(BtnPlayAgain, () => {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer');
if (middleLayerComponent) {
middleLayerComponent.reloadBundle();
}
} else {
const sceneName = cc.director.getScene().name;
cc.director.getScene().destroy();
cc.audioEngine.stopAll();
if (window.courseware) {
window.courseware.freeAllOcMethod();
}
cc.director.loadScene(sceneName, null, null, (err, scene) => { });
}
});
},
buttonOnClick(button, callback, scale = 1.0) {
button.on('click', () => {
if (button['cantClick']) {
return;
}
button['cantClick'] = true;
cc.tween(button)
.to(0.1, { scale: scale * 1.1 })
.to(0.1, { scale: scale })
.call(() => {
button['cantClick'] = false;
callback && callback();
})
.start();
});
}
});
{
"ver": "1.0.8",
"uuid": "72d2fadf-ee6a-43f2-b21a-5a1087fde153",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
......@@ -86,11 +86,11 @@ export class GameServer {
gameStatus = {
state: 0,// -1:未开始 0 准备阶段 1 roll 2 判定
Red: 0,
Blue: 0,
Red: -1,
Blue: -1,
step: 0,
current: "Blue",
jump: 0,
jump: false,
};
startGame() {
this.networkHelper.sendFrame({
......@@ -157,7 +157,12 @@ export class GameServer {
let nowStep = this.gameStatus[this.gameStatus.current];
let index = Math.floor(Math.random() * this.randomList.length)
let step = this.randomList[index];
step = Math.min(step, this._totalStep - nowStep);
// if (nowStep < 5) {
// step = 3;
// } else {
// step = 1;
// }
step = Math.min(step, this._totalStep - 1 - nowStep);
console.log("random step ===" + step);
this.gameStatus.step = step;
......@@ -172,12 +177,18 @@ export class GameServer {
}
}
else if (data.type == "right") {
let nowStep = this.gameStatus[this.gameStatus.current];
const jump = this.jumpList.find(jump => parseInt(jump.from) == parseInt(data.idx));
let nowStep: number = this.gameStatus[this.gameStatus.current];
console.log("nowStep === " + nowStep);
const jump = this.jumpList.find(jump => parseInt(jump.from) == nowStep + this.gameStatus.step);
this.gameStatus[this.gameStatus.current] = jump ? parseInt(jump.to) : nowStep + this.gameStatus.step;
if (this.gameStatus[this.gameStatus.current] < this._totalStep) {
if (jump) {
console.log("jump=============" + jump);
}
if (this.gameStatus[this.gameStatus.current] < this._totalStep - 1) {
this.gameStatus.step = null;
this.gameStatus.state = 2;
this.gameStatus.jump = !!jump;
this.networkHelper.sendFrame({
type: "SERVER_playerRight",
status: this.gameStatus,
......@@ -194,8 +205,14 @@ export class GameServer {
} else if (data.type == "wrong") {
console.log("data = " + JSON.stringify(data));
let nowStep: number = this.gameStatus[this.gameStatus.current];
console.log("nowStep === " + nowStep);
const jump = this.jumpList.find(jump => parseInt(jump.to) == nowStep + this.gameStatus.step);
this.gameStatus[this.gameStatus.current] = jump ? parseInt(jump.from) : nowStep;
this.gameStatus.step = null;
this.gameStatus.state = 2;
this.gameStatus.jump = !!jump;
this.networkHelper.sendFrame({
type: "SERVER_playerWrong",
status: this.gameStatus,
......
......@@ -12,76 +12,76 @@ export const defaultData = {
cardDatas: [
{
id: 1, rJumpId: null, wJumpId: null, word: "bat", url: "",
id: 0, rJumpId: null, wJumpId: null, word: "bat", url: "",
},
{
id: 2, rJumpId: 6, wJumpId: null, word: "man", url: "",
id: 1, rJumpId: 5, wJumpId: null, word: "man", url: "",
},
{
id: 3, rJumpId: null, wJumpId: null, word: "pad", url: "",
id: 2, rJumpId: null, wJumpId: null, word: "pad", url: "",
},
{
id: 4, rJumpId: null, wJumpId: null, word: "dam", url: "",
id: 3, rJumpId: null, wJumpId: null, word: "dam", url: "",
},
{
id: 5, rJumpId: null, wJumpId: null, word: "map", url: "",
id: 4, rJumpId: null, wJumpId: null, word: "map", url: "",
},
{
id: 6, rJumpId: null, wJumpId: null, word: "ant", url: "",
id: 5, rJumpId: null, wJumpId: null, word: "ant", url: "",
},
{
id: 7, rJumpId: null, wJumpId: null, word: "can", url: "",
id: 6, rJumpId: null, wJumpId: null, word: "can", url: "",
},
{
id: 8, rJumpId: 13, wJumpId: null, word: "cam", url: "",
id: 7, rJumpId: 12, wJumpId: null, word: "cam", url: "",
},
{
id: 9, rJumpId: null, wJumpId: null, word: "mat", url: "",
id: 8, rJumpId: null, wJumpId: null, word: "mat", url: "",
},
{
id: 10, rJumpId: null, wJumpId: null, word: "cat", url: "",
id: 9, rJumpId: null, wJumpId: null, word: "cat", url: "",
},
{
id: 11, rJumpId: null, wJumpId: null, word: "fan", url: "",
id: 10, rJumpId: null, wJumpId: null, word: "fan", url: "",
},
{
id: 12, rJumpId: 21, wJumpId: null, word: "tap", url: "",
id: 11, rJumpId: 19, wJumpId: null, word: "tap", url: "",
},
{
id: 13, rJumpId: null, wJumpId: null, word: "cap", url: "",
id: 12, rJumpId: null, wJumpId: null, word: "cap", url: "",
},
{
id: 14, rJumpId: null, wJumpId: null, word: "bag", url: "",
id: 13, rJumpId: null, wJumpId: null, word: "bag", url: "",
},
{
id: 15, rJumpId: 19, wJumpId: null, word: "yam", url: "",
id: 14, rJumpId: 18, wJumpId: null, word: "yam", url: "",
},
{
id: 16, rJumpId: null, wJumpId: null, word: "yak", url: "",
id: 15, rJumpId: null, wJumpId: null, word: "yak", url: "",
},
{
id: 17, rJumpId: null, wJumpId: null, word: "rat", url: "",
id: 16, rJumpId: null, wJumpId: null, word: "rat", url: "",
},
{
id: 18, rJumpId: null, wJumpId: null, word: "rag", url: "",
id: 17, rJumpId: null, wJumpId: null, word: "rag", url: "",
},
{
id: 19, rJumpId: null, wJumpId: null, word: "pan", url: "",
id: 18, rJumpId: null, wJumpId: null, word: "pan", url: "",
},
{
id: 20, rJumpId: 24, wJumpId: null, word: "dad", url: "",
id: 19, rJumpId: 23, wJumpId: null, word: "dad", url: "",
},
{
id: 21, rJumpId: null, wJumpId: null, word: "jam", url: "",
id: 20, rJumpId: 22, wJumpId: null, word: "jam", url: "",
},
{
id: 22, rJumpId: null, wJumpId: null, word: "ax", url: "",
id: 21, rJumpId: null, wJumpId: null, word: "ax", url: "",
},
{
id: 23, rJumpId: null, wJumpId: null, word: "hat", url: "",
id: 22, rJumpId: null, wJumpId: null, word: "hat", url: "",
},
{
id: 24, rJumpId: null, wJumpId: null, word: "map", url: "",
id: 23, rJumpId: null, wJumpId: null, word: "map", url: "",
},
]
......
{
"ver": "2.3.5",
"uuid": "cad89ca0-36b3-4714-94d2-d9ef3df6b4ba",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 158,
"height": 60,
"platformSettings": {},
"subMetas": {
"BtnExit": {
"ver": "1.0.4",
"uuid": "2b5dd43a-655a-4ac5-8116-f646a0e03ef9",
"rawTextureUuid": "cad89ca0-36b3-4714-94d2-d9ef3df6b4ba",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 158,
"height": 60,
"rawWidth": 158,
"rawHeight": 60,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "43b4e521-9123-4fb9-8d0f-3fe09b4bc3bd",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 684,
"height": 244,
"platformSettings": {},
"subMetas": {
"BtnFrame": {
"ver": "1.0.4",
"uuid": "8cd35174-8a10-4be2-ae94-bb979d92c001",
"rawTextureUuid": "43b4e521-9123-4fb9-8d0f-3fe09b4bc3bd",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 684,
"height": 244,
"rawWidth": 684,
"rawHeight": 244,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "a78958f5-493f-480c-ab6b-5b144fe67fe8",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 158,
"height": 60,
"platformSettings": {},
"subMetas": {
"BtnPlayAgain": {
"ver": "1.0.4",
"uuid": "627f41fc-5bc7-4455-bde4-d8192ec8c1cb",
"rawTextureUuid": "a78958f5-493f-480c-ab6b-5b144fe67fe8",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 158,
"height": 60,
"rawWidth": 158,
"rawHeight": 60,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "75a7e8fc-f054-4b5f-815a-5b1252befbcc",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 2176,
"height": 485,
"platformSettings": {},
"subMetas": {
"endbg": {
"ver": "1.0.4",
"uuid": "bfd75cec-a666-460c-b3a2-28b3e782be4c",
"rawTextureUuid": "75a7e8fc-f054-4b5f-815a-5b1252befbcc",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 2176,
"height": 485,
"rawWidth": 2176,
"rawHeight": 485,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "913b6562-93ac-4b3b-9f6e-06235ca3d194",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1064,
"height": 451,
"platformSettings": {},
"subMetas": {
"labelLoss": {
"ver": "1.0.4",
"uuid": "d188142c-57dc-4634-8de7-8e487f6ec2bc",
"rawTextureUuid": "913b6562-93ac-4b3b-9f6e-06235ca3d194",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1064,
"height": 451,
"rawWidth": 1064,
"rawHeight": 451,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "8632104b-7c73-4d3e-b5e0-7e8982cb24ed",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1070,
"height": 451,
"platformSettings": {},
"subMetas": {
"labelWin": {
"ver": "1.0.4",
"uuid": "a6b2490f-93b2-4033-9bab-2d21030a8733",
"rawTextureUuid": "8632104b-7c73-4d3e-b5e0-7e8982cb24ed",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1070,
"height": 451,
"rawWidth": 1070,
"rawHeight": 451,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
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