lawless/client/assets/scripts/scenes/SocialScene.ts

40 行
969 B
TypeScript

import { _decorator, Component, Button } from 'cc';
import { GameManager } from '../core/GameManager';
const { ccclass, property } = _decorator;
/**
* SocialScene ///
*/
@ccclass('SocialScene')
export class SocialScene extends Component {
@property({ type: Button })
public backButton: Button | null = null;
onLoad() {
this.backButton?.node.on(Button.EventType.CLICK, this.onBack, this);
this.loadGuildInfo();
this.loadRelations();
}
private async loadGuildInfo() {
// TODO: SocialService/GetOrganization
}
private async loadRelations() {
// TODO: 查询关系请求列表
}
public onPublishBounty() {
// TODO: 打开悬赏发布面板
}
private onBack() {
GameManager.getInstance().switchScene('LobbyScene');
}
onDestroy() {
this.backButton?.node.off(Button.EventType.CLICK, this.onBack, this);
}
}