Commit 133766d7 authored by 杨一航's avatar 杨一航

fix

parent 407bbe0c
This diff is collapsed.
......@@ -7,7 +7,7 @@ export class AI {
playerData: any;
_status = {
state: -1,// -1:未开始 0 准备阶段 1 roll 2 判定
Red: 0,
Red: -1,
Blue: 0,
step: 0,
current: "Blue",
......@@ -30,6 +30,8 @@ export class AI {
if (!this._status.step) {
await asyncDelay(Math.random() * 3 + 2);
console.log("AI rolling");
this.networkHelper.sendFrame({
type: "roll",
uuid: this.playerData.uuid,
......
......@@ -63,7 +63,7 @@ export class GameServer {
name: this.nameList.splice(0, 1)[0],
uuid: player.uuid,
color:
player.uuid == this.networkHelper.room.roomInfo.owner ? "Blue" : "Red",
player.uuid == this.networkHelper.room.roomInfo.owner ? "Red" : "Blue",
isAI: player.isAI,
headUrl: this.headUrls.splice(0, 1)[0],
});
......@@ -89,7 +89,7 @@ export class GameServer {
Red: -1,
Blue: -1,
step: 0,
current: "Blue",
current: "Red",
jump: false,
};
startGame() {
......@@ -116,7 +116,7 @@ export class GameServer {
const playerInfo = {
uuid: "ai_" + i,
isAI: true,
color: "Red",
color: "Blue",
};
this._aiPlayerList.push(new AI(this.networkHelper, playerInfo));
this.addPlayer(playerInfo);
......
{
"ver": "2.3.5",
"uuid": "1d19ae44-77bd-4229-980e-c4fa0a2a860d",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1068,
"height": 416,
"platformSettings": {},
"subMetas": {
"goodjob": {
"ver": "1.0.4",
"uuid": "47463393-d587-4980-8a9e-f75b57508c92",
"rawTextureUuid": "1d19ae44-77bd-4229-980e-c4fa0a2a860d",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1068,
"height": 416,
"rawWidth": 1068,
"rawHeight": 416,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "7b91b72a-a9bf-4f5b-a4da-7ac44a4c0362",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1068,
"height": 416,
"platformSettings": {},
"subMetas": {
"niceTry": {
"ver": "1.0.4",
"uuid": "fa41ade1-0f59-4d1e-8ea0-90736fb67521",
"rawTextureUuid": "7b91b72a-a9bf-4f5b-a4da-7ac44a4c0362",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1068,
"height": 416,
"rawWidth": 1068,
"rawHeight": 416,
"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