UEHomeRole.ts 831 B

12345678910111213141516171819202122232425262728293031
  1. import ResSpine from "../../frameWork/compment/ResSpine";
  2. import UEBase from "../../frameWork/compment/UEBase";
  3. import { HcType } from "../../shared/hc/PtlHcInfo";
  4. const { ccclass, property } = cc._decorator;
  5. export interface I_HomeRoleData {
  6. type: HcType;
  7. id: number;
  8. }
  9. @ccclass
  10. export default class UEHomeRole extends UEBase {
  11. static readonly BundleKey: string = "gridMap";
  12. static readonly PrefabUrl: string = "UEHomeRole";
  13. static readonly CLS: string = "UEHomeRole";
  14. @property(ResSpine)
  15. private node_spine: ResSpine = null!;
  16. data: I_HomeRoleData = null!;
  17. Init(data: I_HomeRoleData) {
  18. if (data.type == HcType.user) {
  19. } else if (data.type == HcType.monster) {
  20. this.node_spine.setSpineData('spine', `mon/10001`, null, false, 'stand', true);
  21. }
  22. }
  23. }