RecordUserItem.js 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. cc.Class({
  2. extends: cc.BaseClass,
  3. properties: {
  4. m_FontArr:[cc.Font],
  5. },
  6. ctor:function(){
  7. },
  8. InitPre:function(){
  9. this.$('@UserCtrl').SetUserByID(0);
  10. this.$('Score@Label').string = '0';
  11. this.node.active = false;
  12. },
  13. SetPreInfo:function(ParaArr){//0 UserID 1 Info 2 gamedef 3ID
  14. this.node.active = true;
  15. this.m_dwUserID = ParaArr[0];
  16. this.m_Info = ParaArr[1];
  17. this.m_RecordID = ParaArr[3];
  18. this.$('@UserCtrl').SetUserByID(this.m_dwUserID);
  19. this.$('@UserCtrl').SetShowFullName(false);
  20. // console.log("录像",(this.m_Info[8][this.m_dwUserID][0]),window.TransitionScore((this.m_Info[8][this.m_dwUserID][0])));
  21. if (this.m_Info[8][this.m_dwUserID][0] >= 0) {
  22. this.$('Score@Label').string = '+' + ((this.m_Info[8][this.m_dwUserID][0]));
  23. this.$('Score@Label').font = this.m_FontArr[0];
  24. } else {
  25. this.$('Score@Label').string = ((this.m_Info[8][this.m_dwUserID][0]));
  26. this.$('Score@Label').font = this.m_FontArr[1];
  27. }
  28. },
  29. });