ClubRecordUserItem.js 1013 B

1234567891011121314151617181920212223242526272829303132
  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. if (this.m_Info[8][this.m_dwUserID][0] >= 0) {
  21. this.$('Score@Label').string = '+' +(this.m_Info[8][this.m_dwUserID][0]) ;
  22. this.$('Score@Label').font = this.m_FontArr[0];
  23. } else {
  24. this.$('Score@Label').string = (this.m_Info[8][this.m_dwUserID][0]);
  25. this.$('Score@Label').font = this.m_FontArr[1];
  26. }
  27. },
  28. });