| 123456789101112131415161718192021222324252627282930313233343536373839 |
- cc.Class({
- extends: cc.BaseClass,
- properties: {
- },
- ctor:function(){
- this.m_ItemControl = new Array();
- },
- // use this for initialization
- onLoad: function () {
- this.m_pEndInfo = null;
- },
- SetEndInfo(pRoomEnd){
- this.m_pEndInfo = pRoomEnd;
- if(this.m_ListCtrl == null) this.m_ListCtrl = this.node.getComponent('CustomListCtrl');
- this.m_ListCtrl.InitList(0, 'BigResultItem_'+GameDef.KIND_ID);
- for(var i=0;i<GameDef.GAME_PLAYER;++i) {
- if(pRoomEnd.UserID[i] == null) continue;
- this.m_ListCtrl.InsertListInfo(0, [i, pRoomEnd]);
- }
- },
- //分享信息
- GetShareInfo: function() {
- var ShareInfo = new Object();
- ShareInfo.title = '【對局記錄】';
- ShareInfo.desc = '';
- for(var i = 0;i<GameDef.GAME_PLAYER;i++){
- if(this.m_pEndInfo.UserID[i] == null) continue;
- if(ShareInfo.desc != '') ShareInfo.desc += '/'
- ShareInfo.desc += '【'+ g_GlobalUserInfo.m_UserInfoMap[this.m_pEndInfo.UserID[i]].NickName+'】';
- ShareInfo.desc += (this.m_pEndInfo.lTotalScore[i] >= 0?'+':'')+this.m_pEndInfo.lTotalScore[i];
- }
- ShareInfo.link = cc.share.MakeLink_GameEnd();
- return ShareInfo;
- },
- });
|