Merge branch 'card0515' of git.eoxnet.com:pan/pixelheros into card0515
This commit is contained in:
@@ -62,7 +62,8 @@ export class HInfoComp extends CCComp {
|
||||
/** 英雄名字节点 */
|
||||
@property(Node)
|
||||
Name_node=null!
|
||||
/** 高品质边框 */
|
||||
|
||||
/** 技能信息节点 */
|
||||
@property(Node)
|
||||
info_node=null!
|
||||
|
||||
@@ -89,6 +90,8 @@ export class HInfoComp extends CCComp {
|
||||
private previewPoolLv: number = 1;
|
||||
/** 英雄名字标签缓存引用 */
|
||||
private nameLabel: Label | null = null;
|
||||
/** 技能信息标签缓存引用 */
|
||||
private infoLabel: Label | null = null;
|
||||
/** AP 标签缓存引用 */
|
||||
private apLabel: Label | null = null;
|
||||
/** AP 加成标签缓存引用 */
|
||||
@@ -271,6 +274,12 @@ export class HInfoComp extends CCComp {
|
||||
this.nameLabel.string = this.model.hero_name ?? "";
|
||||
}
|
||||
|
||||
// ---- 技能信息标签 ----
|
||||
if (this.infoLabel) {
|
||||
const heroData = HeroInfo[heroUuid];
|
||||
this.infoLabel.string = heroData?.info ?? "";
|
||||
}
|
||||
|
||||
// ---- 数值标签 ----
|
||||
if (this.apLabel) {
|
||||
const currentAp = Math.max(0, Math.floor(this.model.ap ?? 0));
|
||||
@@ -317,6 +326,9 @@ export class HInfoComp extends CCComp {
|
||||
if (!this.nameLabel && this.Name_node) {
|
||||
this.nameLabel = this.Name_node.getComponent(Label) || this.Name_node.getComponentInChildren(Label);
|
||||
}
|
||||
if (!this.infoLabel && this.info_node) {
|
||||
this.infoLabel = this.info_node.getComponent(Label) || this.info_node.getComponentInChildren(Label);
|
||||
}
|
||||
if (!this.apLabel && this.ap_node) {
|
||||
this.apLabel = this.ap_node.getChildByName("val")?.getComponent(Label) || null;
|
||||
this.apPlusLabel = this.ap_node.getChildByName("plus")?.getComponent(Label) || null;
|
||||
|
||||
@@ -33,7 +33,8 @@ import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/modu
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
import { HeroAttrsComp } from "../hero/HeroAttrsComp";
|
||||
import { GameEvent, SkillTriggerType } from "../common/config/GameEvent";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { SkillTriggerType } from "../common/config/heroSet";
|
||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
import { SkillTriggerHelper } from "../hero/SkillTriggerHelper";
|
||||
import { UIID } from "../common/config/GameUIConfig";
|
||||
|
||||
Reference in New Issue
Block a user