mirror of
https://github.com/szrpf/DataBoardDemo.git
synced 2025-11-01 20:05:35 +00:00
Signed-off-by: szrpf <27185709@qq.com>
This commit is contained in:
@@ -598,7 +598,7 @@
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": "aeYV8DmBZGCYbgx+zLugPE"
|
||||
"_id": "f8ojtV5RxJyppxJXTwvRbA"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
@@ -660,7 +660,7 @@
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": "a1JNI4SG5OhIdvR9MemsPN"
|
||||
"_id": "28JdLs6QFKdplow4Vcop4h"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
@@ -690,7 +690,7 @@
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": "30b4ew0lNNAJUraMYHr2em"
|
||||
"_id": "6a5nzBAKFG/Y3sA2e8abM6"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
@@ -752,7 +752,7 @@
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": "73cTu6JRJHDZSOsZC/GNSq"
|
||||
"_id": "96kbAXXyNK1akIGWmV2D4E"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
@@ -782,7 +782,7 @@
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": "18T8mT1QNNb4iywy66/ir1"
|
||||
"_id": "c634mO6m9DAoGcrT9u7GG3"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
@@ -844,7 +844,7 @@
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": "33suo2+BdAA4yg7KMOhBfo"
|
||||
"_id": "fbmT0N5IlBPaXEuSFKjmJS"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
@@ -874,7 +874,7 @@
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": "e8cMOeGBFLaod8gecauS1T"
|
||||
"_id": "d4fxTpMidJcZF86bFkr4G1"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
@@ -939,7 +939,7 @@
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": "7eLOi10ORGRZAw4OSS/YX3"
|
||||
"_id": "75V74ndIVEt4kNrIEmp+Wg"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Label",
|
||||
@@ -956,8 +956,8 @@
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_string": "坐标:\t0,\t50\n角度:\t80°,\t弧度:\t0π\n世界坐标:\t(540,\t1010)\nhp:\t100 \t \t \tmp:\t60\n世界矩阵\n\t\t\t0\t\t-1\t\t\t0\t\t\t540\n\t\t\t1\t\t\t0\t\t\t0\t\t\t1010\n\t\t\t0\t\t\t0\t\t\t1\t\t\t0\n\t\t\t0\t\t\t0\t\t\t0\t\t\t1",
|
||||
"_N$string": "坐标:\t0,\t50\n角度:\t80°,\t弧度:\t0π\n世界坐标:\t(540,\t1010)\nhp:\t100 \t \t \tmp:\t60\n世界矩阵\n\t\t\t0\t\t-1\t\t\t0\t\t\t540\n\t\t\t1\t\t\t0\t\t\t0\t\t\t1010\n\t\t\t0\t\t\t0\t\t\t1\t\t\t0\n\t\t\t0\t\t\t0\t\t\t0\t\t\t1",
|
||||
"_string": "坐标:\t0,\t50\n角度:\t80°,\t弧度:\t0π\n世界坐标:\t(540,\t1010)\nhp:\t100 \t \t \tmp:\t60\n变换矩阵\n\t\t\t0\t\t-1\t\t\t0\t\t\t540\n\t\t\t1\t\t\t0\t\t\t0\t\t\t1010\n\t\t\t0\t\t\t0\t\t\t1\t\t\t0\n\t\t\t0\t\t\t0\t\t\t0\t\t\t1",
|
||||
"_N$string": "坐标:\t0,\t50\n角度:\t80°,\t弧度:\t0π\n世界坐标:\t(540,\t1010)\nhp:\t100 \t \t \tmp:\t60\n变换矩阵\n\t\t\t0\t\t-1\t\t\t0\t\t\t540\n\t\t\t1\t\t\t0\t\t\t0\t\t\t1010\n\t\t\t0\t\t\t0\t\t\t1\t\t\t0\n\t\t\t0\t\t\t0\t\t\t0\t\t\t1",
|
||||
"_fontSize": 60,
|
||||
"_lineHeight": 72,
|
||||
"_enableWrapText": true,
|
||||
@@ -972,7 +972,7 @@
|
||||
"_N$fontFamily": "Arial",
|
||||
"_N$overflow": 0,
|
||||
"_N$cacheMode": 0,
|
||||
"_id": "afXYt/MIdCsYdZHdLaQrZM"
|
||||
"_id": "e3V1vuYdNIJJ/UR4RFFYQo"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.LabelOutline",
|
||||
@@ -990,7 +990,7 @@
|
||||
"a": 255
|
||||
},
|
||||
"_width": 6,
|
||||
"_id": "4dY0mNgt5AAa2eTyR5SyuI"
|
||||
"_id": "8c+vc5pnVMCZbBEgPSGytG"
|
||||
},
|
||||
{
|
||||
"__type__": "9285eM4YhBJhL8+C569X294",
|
||||
@@ -1030,7 +1030,7 @@
|
||||
"_collideBoxOpacity": 100,
|
||||
"_isCustomLabelActive": true,
|
||||
"customComponentName": "Hero",
|
||||
"_customLabelString": "坐标:x,y\n角度:angle,弧度:radian\n世界坐标:wp\nhp:#hp mp:#mp\n世界矩阵\nmatrix",
|
||||
"_customLabelString": "坐标:x,y\n角度:angle,弧度:radian\n世界坐标:wp\nhp:#hp mp:#mp\n变换矩阵\nmatrix",
|
||||
"_customLabelOffset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
|
@@ -16,9 +16,11 @@
|
||||
* children: 子节点
|
||||
* 自身属性: scale,width,opacity等
|
||||
* 脚本属性: 脚本实例对象的属性
|
||||
* ↓↓参数可以用3种分隔符隔开↓↓
|
||||
* 英文逗号、英文冒号、空格
|
||||
* ————————————————————————举个栗子————————————————————————
|
||||
* 脚本: Hero
|
||||
* 参数: wp,scale,angle,#angle,#hp(用英文逗号或回车分隔)
|
||||
* 参数: wp,scale,angle,#angle,#hp
|
||||
* 显示结果:世界坐标,节点scale,节点angle,Hero对象的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,节点angle,Hero对象的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,节点angle,Hero对象的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
|
||||
|
Reference in New Issue
Block a user