Skip to content

Commit

Permalink
修改对比条件
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoyuexing committed Jul 26, 2018
1 parent 09d1f6a commit 006500a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/src/scene/Room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,15 +406,15 @@ class Room extends eui.Component implements eui.UIComponent {
public addUser(userPlayer:any) {
var user:GUser = new GUser;
var arr = JSON.parse(userPlayer.userProfile);
console.log(arr.nickName+'有'+arr.pointValue+'id是'+arr.id);
console.log(arr.nickName+'有'+arr.pointValue+'id是'+userPlayer.userID);
user.nickName =arr.nickName;
user.avator = arr.avator;
console.log('第二次传过来的信息'+JSON.stringify(this.restartRoomInfo));
if (this.restartRoomInfo.length > 0) {
for (var a = 0; a < this.restartRoomInfo.length; a++) {
console.log('a是:'+a);
console.log('我的id是'+arr.id,'对比的id是'+this.restartRoomInfo[a].userID);
if (arr.userID == this.restartRoomInfo[a].userID) {
console.log('我的id是'+userPlayer.id,'对比的id是'+this.restartRoomInfo[a].userID);
if (userPlayer.userID == this.restartRoomInfo[a].userID) {
user.pointValue = this.restartRoomInfo[a].pointValue;
console.log('第二次重新开始,我的分数是'+ this.restartRoomInfo[a].pointValue);
}
Expand Down

0 comments on commit 006500a

Please sign in to comment.