mirror of
https://github.com/szrpf/DataBoardDemo.git
synced 2025-11-03 04:45:43 +00:00
v2.2
This commit is contained in:
@@ -532,7 +532,7 @@
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "DataBoard",
|
||||
"_objFlags": 512,
|
||||
"_objFlags": 1536,
|
||||
"_parent": {
|
||||
"__id__": 8
|
||||
},
|
||||
@@ -598,7 +598,7 @@
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": "85BlQuDb9HZKuhEJxwyGF+"
|
||||
"_id": "3bJREBcbZKLqDSz4LhRHLJ"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
@@ -660,7 +660,7 @@
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": "49+qljSBFDb61/iC62OrLE"
|
||||
"_id": "bcSyBGvI1Plqe/WzYr3VDx"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
@@ -690,7 +690,7 @@
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": "6axJdFuntK570hv44oHwcH"
|
||||
"_id": "e4rWXBZIdL3I37yOiMLUkp"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
@@ -752,7 +752,7 @@
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": "66fiagvGZM17jxJS3e3R/O"
|
||||
"_id": "d2mriWi19PIq4Szy+gixHz"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
@@ -782,7 +782,7 @@
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": "e7StEP5C5EIY76/7RYAGaS"
|
||||
"_id": "57C42kzTlNG6EIZG27BGvo"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
@@ -844,7 +844,7 @@
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": "67uLDk0kNPMLrmc4a+2Lcz"
|
||||
"_id": "86jFRLVFRCEZKk+7T7UNZp"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
@@ -874,7 +874,7 @@
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": "19kjTk6vxDsqYAK8l1jO+n"
|
||||
"_id": "3f+lBF49pJWLH2L7X5jaEt"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
@@ -939,7 +939,7 @@
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": "930hpjvLBPHbYO0z9MngLs"
|
||||
"_id": "4fBx2G8glEe4Xv4ozR+OYB"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Label",
|
||||
@@ -972,7 +972,7 @@
|
||||
"_N$fontFamily": "Arial",
|
||||
"_N$overflow": 0,
|
||||
"_N$cacheMode": 0,
|
||||
"_id": "357EdNN/VPTaPJCzr51Jj0"
|
||||
"_id": "b9AHQFFjJI0q9XNZUOYi0T"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.LabelOutline",
|
||||
@@ -990,7 +990,7 @@
|
||||
"a": 255
|
||||
},
|
||||
"_width": 6,
|
||||
"_id": "b4ov1ei1RJaZNO5PGzLCHc"
|
||||
"_id": "6d1Kd0iBJCHptcQsvN7S7E"
|
||||
},
|
||||
{
|
||||
"__type__": "9285eM4YhBJhL8+C569X294",
|
||||
@@ -1000,7 +1000,7 @@
|
||||
"__id__": 8
|
||||
},
|
||||
"_enabled": true,
|
||||
"_id": "1b9viFHsFJHrX+D1PV5q6g"
|
||||
"_id": "98YtBkfwdHMbzYr7nANfcY"
|
||||
},
|
||||
{
|
||||
"__type__": "1c152bUhQpJ6J1jGhQVUYf8",
|
||||
|
||||
@@ -235,11 +235,13 @@ export default class DataBoard extends cc.Component {
|
||||
protected update() {
|
||||
if (!this.isCustomLabelActive) return;
|
||||
if (!this.customLabelStringSplit) return;
|
||||
let radian = -this.node.angle * Math.PI / 180;
|
||||
let cos = Math.cos(radian);
|
||||
let sin = Math.sin(radian);
|
||||
this.customLabelNode.x = this.customLabelOffset.x * cos - this.customLabelOffset.y * sin;
|
||||
this.customLabelNode.y = this.customLabelOffset.x * sin + this.customLabelOffset.y * cos;
|
||||
if(this.customLabelOffset.x !== 0 || this.customLabelOffset.y !== 0){
|
||||
let radian = -this.node.angle * Math.PI / 180;
|
||||
let cos = Math.cos(radian);
|
||||
let sin = Math.sin(radian);
|
||||
this.customLabelNode.x = this.customLabelOffset.x * cos - this.customLabelOffset.y * sin;
|
||||
this.customLabelNode.y = this.customLabelOffset.x * sin + this.customLabelOffset.y * cos;
|
||||
}
|
||||
let str = '';
|
||||
let strs = this.customLabelStringSplit;
|
||||
if (!this.monitorComp && this.customComponentName) {
|
||||
|
||||
Reference in New Issue
Block a user