40 行
969 B
TypeScript
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);
|
|
}
|
|
}
|