Skip to content

Commit e94841b

Browse files
committed
Org log.
1 parent fd50e04 commit e94841b

File tree

1 file changed

+44
-105
lines changed

1 file changed

+44
-105
lines changed

Assets/JCSUnity/Scripts/JCS_UnityObject.cs

Lines changed: 44 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,19 @@ public virtual void UpdateUnityData()
9898
}
9999
}
100100

101+
/// <summary>
102+
/// Check if TYPE is current object type.
103+
/// </summary>
104+
/// <param name="type"> Object type you want to confirm. </param>
105+
/// <returns>
106+
/// Return true, if TYPE is this object type.
107+
/// Return false, if TYPE isn't this object type.
108+
/// </returns>
109+
public bool IsObjectType(JCS_UnityObjectType type)
110+
{
111+
return this.GetObjectType() == type;
112+
}
113+
101114
/// <summary>
102115
/// Get/Set the local type.
103116
///
@@ -176,9 +189,7 @@ public Transform LocalTransform
176189
#endif
177190
}
178191

179-
JCS_Debug.LogError(
180-
"Return default local position...(This should not happens...)");
181-
192+
JCS_Debug.LogError("Return default local position (This should not happens)");
182193
return this.transform;
183194
}
184195
}
@@ -205,9 +216,7 @@ public Vector3 Position
205216
#endif
206217
}
207218

208-
JCS_Debug.LogError(
209-
"Return default local position...(This should not happens...)");
210-
219+
JCS_Debug.LogError("Return default local position (This should not happens)");
211220
return this.transform.position;
212221
}
213222

@@ -232,8 +241,7 @@ public Vector3 Position
232241
#endif
233242
}
234243

235-
JCS_Debug.LogError(
236-
"Set default local position...(This should not happens...)");
244+
JCS_Debug.LogError("Set default local position (This should not happens)");
237245
}
238246
}
239247

@@ -258,10 +266,7 @@ public Vector3 LocalPosition
258266
return this.mTextMesh.transform.localPosition;
259267
#endif
260268
}
261-
262-
JCS_Debug.LogError(
263-
"Return default local position...(This should not happens...)");
264-
269+
JCS_Debug.LogError("Return default local position (This should not happens)");
265270
return this.transform.localPosition;
266271
}
267272

@@ -286,8 +291,7 @@ public Vector3 LocalPosition
286291
#endif
287292
}
288293

289-
JCS_Debug.LogError(
290-
"Set default local position...(This should not happens...)");
294+
JCS_Debug.LogError("Set default local position (This should not happens)");
291295
}
292296
}
293297

@@ -313,9 +317,7 @@ public Vector3 EulerAngles
313317
#endif
314318
}
315319

316-
JCS_Debug.LogError(
317-
"Return default local rotation...(This should not happens...)");
318-
320+
JCS_Debug.LogError("Return default local rotation (This should not happens)");
319321
return this.transform.eulerAngles;
320322
}
321323

@@ -340,8 +342,7 @@ public Vector3 EulerAngles
340342
#endif
341343
}
342344

343-
JCS_Debug.LogError(
344-
"Set default local rotation...(This should not happens...)");
345+
JCS_Debug.LogError("Set default local rotation (This should not happens)");
345346
}
346347
}
347348

@@ -367,9 +368,7 @@ public Vector3 LocalEulerAngles
367368
#endif
368369
}
369370

370-
JCS_Debug.LogError(
371-
"Return default local rotation...(This should not happens...)");
372-
371+
JCS_Debug.LogError("Return default local rotation (This should not happens)");
373372
return this.transform.localEulerAngles;
374373
}
375374

@@ -394,8 +393,7 @@ public Vector3 LocalEulerAngles
394393
#endif
395394
}
396395

397-
JCS_Debug.LogError(
398-
"Set default local rotation...(This should not happens...)");
396+
JCS_Debug.LogError("Set default local rotation (This should not happens)");
399397
}
400398
}
401399

@@ -420,10 +418,7 @@ public Vector3 LocalScale
420418
return this.mTextMesh.transform.localScale;
421419
#endif
422420
}
423-
424-
JCS_Debug.LogError(
425-
"Return default local scale...(This should not happens...)");
426-
421+
JCS_Debug.LogError("Return default local scale (This should not happens)");
427422
return this.transform.localScale;
428423
}
429424

@@ -447,9 +442,7 @@ public Vector3 LocalScale
447442
return;
448443
#endif
449444
}
450-
451-
JCS_Debug.LogError(
452-
"Set default local scale...(This should not happens...)");
445+
JCS_Debug.LogError("Set default local scale (This should not happens)");
453446
}
454447
}
455448

@@ -475,12 +468,7 @@ public bool LocalEnabled
475468
return this.mTextMesh.enabled;
476469
#endif
477470
}
478-
479-
JCS_Debug.LogError(
480-
"Return default visible...(This should not happens...)");
481-
482-
483-
// return default
471+
JCS_Debug.LogError("Return default visible (This should not happens)");
484472
return false;
485473
}
486474

@@ -532,9 +520,7 @@ public Color LocalColor
532520
#endif
533521
}
534522

535-
JCS_Debug.LogError(
536-
"Return default Local Red...(This should not happens...)");
537-
523+
JCS_Debug.LogError("Return default Local Red (This should not happens)");
538524
return new Color(255, 128, 64, 32);
539525
}
540526

@@ -561,9 +547,7 @@ public Color LocalColor
561547
#endif
562548

563549
}
564-
565-
JCS_Debug.LogError(
566-
"Set default Local Red...(This should not happens...)");
550+
JCS_Debug.LogError("Set default Local Red (This should not happens)");
567551
}
568552
}
569553

@@ -589,10 +573,7 @@ public float LocalAlpha
589573
return this.mTextMesh.color.a;
590574
#endif
591575
}
592-
593-
JCS_Debug.LogError(
594-
"Return default Local Alpha...(This should not happens...)");
595-
576+
JCS_Debug.LogError("Return default Local Alpha (This should not happens)");
596577
return 0;
597578
}
598579

@@ -640,9 +621,7 @@ public float LocalAlpha
640621
return;
641622
#endif
642623
}
643-
644-
JCS_Debug.LogError(
645-
"Set default Local Alpha...(This should not happens...)");
624+
JCS_Debug.LogError("Set default Local Alpha (This should not happens)");
646625
}
647626
}
648627

@@ -668,10 +647,7 @@ public float LocalRed
668647
return this.mTextMesh.color.r;
669648
#endif
670649
}
671-
672-
JCS_Debug.LogError(
673-
"Return default Local Red...(This should not happens...)");
674-
650+
JCS_Debug.LogError("Return default Local Red (This should not happens)");
675651
return 0;
676652
}
677653

@@ -719,9 +695,7 @@ public float LocalRed
719695
return;
720696
#endif
721697
}
722-
723-
JCS_Debug.LogError(
724-
"Set default Local Red...(This should not happens...)");
698+
JCS_Debug.LogError("Set default Local Red (This should not happens)");
725699
}
726700
}
727701

@@ -747,10 +721,7 @@ public float LocalGreen
747721
return this.mTextMesh.color.g;
748722
#endif
749723
}
750-
751-
JCS_Debug.LogError(
752-
"Return default Local Green...(This should not happens...)");
753-
724+
JCS_Debug.LogError("Return default Local Green (This should not happens)");
754725
return 0;
755726
}
756727

@@ -798,9 +769,7 @@ public float LocalGreen
798769
return;
799770
#endif
800771
}
801-
802-
JCS_Debug.LogError(
803-
"Set default Local Blue...(This should not happens...)");
772+
JCS_Debug.LogError("Set default Local Blue (This should not happens)");
804773
}
805774
}
806775

@@ -826,10 +795,7 @@ public float LocalBlue
826795
return this.mTextMesh.color.b;
827796
#endif
828797
}
829-
830-
JCS_Debug.LogError(
831-
"Return default Local Blue...(This should not happens...)");
832-
798+
JCS_Debug.LogError("Return default Local Blue (This should not happens)");
833799
return 0;
834800
}
835801

@@ -877,9 +843,7 @@ public float LocalBlue
877843
return;
878844
#endif
879845
}
880-
881-
JCS_Debug.LogError(
882-
"Set default Local Blue...(This should not happens...)");
846+
JCS_Debug.LogError("Set default Local Blue (This should not happens)");
883847
}
884848
}
885849

@@ -905,10 +869,7 @@ public Texture LocalMainTexture
905869
return this.mTextMesh.material.mainTexture;
906870
#endif
907871
}
908-
909-
JCS_Debug.LogError(
910-
"Return default Local Blue...(This should not happens...)");
911-
872+
JCS_Debug.LogError("Return default Local Blue (This should not happens)");
912873
return null;
913874
}
914875

@@ -934,9 +895,7 @@ public Texture LocalMainTexture
934895
return;
935896
#endif
936897
}
937-
938-
JCS_Debug.LogError(
939-
"Set default Local Blue...(This should not happens...)");
898+
JCS_Debug.LogError("Set default Local Blue (This should not happens)");
940899
}
941900
}
942901

@@ -954,10 +913,7 @@ public Sprite LocalSprite
954913
case JCS_UnityObjectType.UI:
955914
return this.mImage.sprite;
956915
}
957-
958-
JCS_Debug.LogError(
959-
"Failed to get sprite composite cuz current unity object setting does not have it.");
960-
916+
JCS_Debug.LogError("Failed to get sprite composite cuz current unity object setting does not have it.");
961917
return null;
962918
}
963919

@@ -972,9 +928,7 @@ public Sprite LocalSprite
972928
this.mImage.sprite = value;
973929
return;
974930
}
975-
976-
JCS_Debug.LogError(
977-
"Failed to set the sprite cuz the current unity object setting does not have sprite coposite.");
931+
JCS_Debug.LogError("Failed to set the sprite cuz the current unity object setting does not have sprite coposite.");
978932
}
979933
}
980934

@@ -997,10 +951,7 @@ public bool LocalIsVisible
997951
case JCS_UnityObjectType.SPRITE:
998952
return this.mSpriteRenderer.isVisible;
999953
}
1000-
1001-
JCS_Debug.LogError(
1002-
"Return default Local isVisible...(This should not happens...)");
1003-
954+
JCS_Debug.LogError("Return default Local isVisible (This should not happens)");
1004955
return false;
1005956
}
1006957

@@ -1027,10 +978,7 @@ public bool LocalFlipX
1027978
#endif
1028979
return JCS_Mathf.IsPositive(this.mRectTransform.localScale.x);
1029980
}
1030-
1031-
JCS_Debug.LogError(
1032-
"Return default Local FlipX...(This should not happens...)");
1033-
981+
JCS_Debug.LogError("Return default Local FlipX (This should not happens)");
1034982
return false;
1035983
}
1036984

@@ -1072,10 +1020,7 @@ public bool LocalFlipX
10721020
}
10731021
return;
10741022
}
1075-
1076-
JCS_Debug.LogError(
1077-
"Set default Local FlipX...(This should not happens...)");
1078-
1023+
JCS_Debug.LogError("Set default Local FlipX (This should not happens)");
10791024
}
10801025
}
10811026

@@ -1100,10 +1045,7 @@ public bool LocalFlipY
11001045
#endif
11011046
return JCS_Mathf.IsPositive(this.mRectTransform.localScale.y);
11021047
}
1103-
1104-
JCS_Debug.LogError(
1105-
"Return default Local FlipY...(This should not happens...)");
1106-
1048+
JCS_Debug.LogError("Return default Local FlipY (This should not happens)");
11071049
return false;
11081050
}
11091051

@@ -1145,10 +1087,7 @@ public bool LocalFlipY
11451087
}
11461088
return;
11471089
}
1148-
1149-
JCS_Debug.LogError(
1150-
"Set default Local FlipY...(This should not happens...)");
1151-
1090+
JCS_Debug.LogError("Set default Local FlipY (This should not happens)");
11521091
}
11531092
}
11541093
}

0 commit comments

Comments
 (0)