AndroidRecordItem.js 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. cc.Class({
  2. extends: cc.BaseClass,
  3. properties: {
  4. },
  5. InitPre: function () {
  6. if(this.m_userCtrl == null){
  7. this.m_userCtrl = this.$('@UserCtrl');
  8. this.m_LbIndex = this.$('LbIndex@Label');
  9. this.m_LbWinCnt = this.$('LbWinCnt@Label');
  10. this.m_LbDrawCnt = this.$('LbDrawCnt@Label');
  11. this.m_LbScore1 = this.$('LbScore1@Label');
  12. this.m_LbScore2 = this.$('LbScore2@Label');
  13. this.m_LbScore3 = this.$('LbScore3@Label');
  14. }
  15. },
  16. SetPreInfo: function (InfoArr) {
  17. this.m_LbIndex.string = parseInt(InfoArr[0])+1;
  18. this.m_LbWinCnt.string = InfoArr[1][1];
  19. this.m_LbDrawCnt.string = InfoArr[1][2];
  20. this.m_LbScore1.string = Score2Str(InfoArr[1][3]);
  21. this.m_LbScore2.string = Score2Str(InfoArr[1][4]);
  22. this.m_LbScore3.string = Score2Str(parseInt(InfoArr[1][5]));
  23. this.m_userCtrl.SetUserByID(InfoArr[1][0]);
  24. this._userID = InfoArr[1][0];
  25. },
  26. });