Slash-The-Hordes/assets/Scripts/Game/Player/PlayerUI/PlayerUI.ts

14 lines
410 B
TypeScript
Raw Normal View History

2022-11-08 18:45:57 +00:00
import { Component, _decorator } from "cc";
import { UnitHealth } from "../UnitHealth";
import { PlayerHealthUI } from "./PlayerHealthUI";
const { ccclass, property } = _decorator;
@ccclass("PlayerUI")
export class PlayerUI extends Component {
@property(PlayerHealthUI) private healthUI: PlayerHealthUI;
public init(playerHealth: UnitHealth): void {
this.healthUI.init(playerHealth);
}
}