Signed-off-by: szrpf <27185709@qq.com>

This commit is contained in:
szrpf
2023-04-22 07:47:46 +08:00
parent 59723fbd8e
commit 907df34479
13 changed files with 80 additions and 70 deletions

View File

@@ -16,9 +16,11 @@
* children 子节点
* 自身属性: scale,width,opacity等
* 脚本属性: 脚本实例对象的属性
* ↓↓参数可以用3种分隔符隔开↓↓
* 英文逗号、英文冒号、空格
* ————————————————————————举个栗子————————————————————————
* 脚本: Hero
* 参数: wp,scale,angle,#angle,#hp(用英文逗号或回车分隔)
* 参数: wp,scale,angle,#angle,#hp
* 显示结果:世界坐标,节点scale,节点angleHero对象的angle,Hero对象的hp
* ————————————————————————温馨提示————————————————————————
* 初始化的时候设置全局变量window['DATABOARD'] = false可屏蔽本项目所有DataBoard不会产生任何额外开销\n
@@ -91,7 +93,7 @@ export default class DataBoard extends cc.Component {
private customComponentName: string = '';
@property
private _customLabelString: string = 'x,y';
@property({ multiline: true, displayName: CC_DEV && '······参数', tooltip: CC_DEV && "—————支持的参数————\nwp世界坐标\nradian角度单位π\nmatrix变换矩阵\nparent父节点\nchildren子节点\n自身属性scale,width,opacity等\n脚本属性脚本实例对象的属性\n————举个栗子————\n脚本Hero\n参数wp,scale,angle,#angle,#hp\n↑↑↑用英文逗号或回车分隔↑↑↑\n显示结果:\n世界坐标,节点scale,节点angleHero对象的angle,Hero对象的hp\n————温馨提示————\n初始化的时候设置全局变量\nwindow['DATABOARD'] = false\n可屏蔽本项目所有DataBoard不会产生任何额外开销", visible() { return this.isCustomLabelActive } })
@property({ multiline: true, displayName: CC_DEV && '······参数', tooltip: CC_DEV && "—————支持的参数————\nwp世界坐标\nradian角度单位π\nmatrix变换矩阵\nparent父节点\nchildren子节点\n自身属性scale,width,opacity等\n脚本属性脚本实例对象的属性\n↓↓参数可以用3种分隔符隔开↓↓\n英文逗号、英文冒号、空格\n————举个栗子————\n脚本Hero\n参数wp,scale,angle,#angle,#hp\n显示结果\n世界坐标,节点scale,节点angleHero对象的angle,Hero对象的hp\n————温馨提示————\n初始化的时候设置全局变量\nwindow['DATABOARD'] = false\n可屏蔽本项目所有DataBoard不会产生任何额外开销", visible() { return this.isCustomLabelActive } })
private get customLabelString() { return this._customLabelString };
private set customLabelString(value: string) {
this._customLabelString = value;
@@ -126,7 +128,7 @@ export default class DataBoard extends cc.Component {
private set customLabelSize(value: number) {
this._customLabelSize = value;
this.customLabel.fontSize = value;
this.customLabel.lineHeight = value*LINEHEIGHT;
this.customLabel.lineHeight = value * LINEHEIGHT;
this.customLabelNode.getComponent(cc.LabelOutline).width = value * 0.1;
}
@property