RecordUserItem2.js 733 B

1234567891011121314151617181920212223242526
  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 = '';
  11. this.node.active = false;
  12. },
  13. SetPreInfo:function(ParaArr){
  14. this.node.active = true;
  15. this.$('@UserCtrl').SetUserByID(ParaArr[0]);
  16. if (ParaArr[1] >= 0) {
  17. this.$('Score@Label').string = '+' +(ParaArr[1]);
  18. this.$('Score@Label').font = this.m_FontArr[0];
  19. } else {
  20. this.$('Score@Label').string = (ParaArr[1]);
  21. this.$('Score@Label').font = this.m_FontArr[1];
  22. }
  23. },
  24. });