update
This commit is contained in:
parent
5628b0403e
commit
dc8ce750ff
@ -1,10 +1,11 @@
|
|||||||
import { _decorator, Component, Node, Label } from "cc"
|
import { _decorator, Component, Node, Label } from "cc"
|
||||||
|
import { IPlayer } from "../Common"
|
||||||
import DataManager from "../Global/DataManager"
|
import DataManager from "../Global/DataManager"
|
||||||
const { ccclass, property } = _decorator
|
const { ccclass, property } = _decorator
|
||||||
|
|
||||||
@ccclass("PlayerManager")
|
@ccclass("PlayerManager")
|
||||||
export class PlayerManager extends Component {
|
export class PlayerManager extends Component {
|
||||||
init({ id, nickname, rid }: { id: number; nickname: string; rid: number }) {
|
init({ id, nickname, rid }: IPlayer) {
|
||||||
const label = this.getComponent(Label)
|
const label = this.getComponent(Label)
|
||||||
let str = nickname
|
let str = nickname
|
||||||
if (DataManager.Instance.myPlayerId === id) {
|
if (DataManager.Instance.myPlayerId === id) {
|
||||||
|
Loading…
Reference in New Issue
Block a user