1 [
EntityEditorProps(
category:
"GameScripted/Spectating", description:
"This brief script description.", color:
"0 0 255 255")]
10 static bool s_bShapeUseAlpha =
true;
12 static bool s_bShapeUseScaling =
true;
14 static bool s_bShapeUseText =
true;
16 static bool s_bShapeUseHealthbar =
true;
18 static float s_fShapeTextDistance = 15.0;
20 static float s_fShapeTextHeightOffset = 2.35;
22 static float s_fShapeTextSize = 0.1;
24 static float s_fShapeHeightOffset = 2.15;
26 static float s_fShapeHealthbarWidth = 1.5;
28 static float s_fShapeHealthbarHeight = 0.03;
31 static float s_fShapeRadius = 0.125;
33 static float s_fShapeSizeGoal = 15.0;
34 static float s_fShapeSizeMinimum = 1.0;
35 static float s_fShapeSizeMaximum = 17.5;
42 [
Attribute(
"1", UIWidgets.CheckBox,
"Whether shape should use alpha directly from faction color.",
"")]
43 bool m_bShapeUseAlpha;
44 [
Attribute(
"1", UIWidgets.CheckBox,
"Whether shape should scale based on camera distance.",
"")]
45 bool m_bShapeUseScaling;
46 [
Attribute(
"1", UIWidgets.CheckBox,
"Whether info text should be drawn when close to a unit.",
"")]
48 [
Attribute(
"1", UIWidgets.CheckBox,
"Whether health bar should be drawn when close to a unit.",
"")]
49 bool m_bShapeUseHealthbar;
50 [
Attribute(
"15.0", UIWidgets.Slider,
"Maximum distance in metres at which text will be shown (if enabled)",
"0 100 0.1")]
51 float m_fShapeTextDistance;
52 [
Attribute(
"2.35", UIWidgets.Slider,
"Offset of the text from entity's origin in Y axis",
"0 100 0.1")]
53 float m_fShapeTextHeightOffset;
55 [
Attribute(
"0.12", UIWidgets.Slider,
"Size of the text. (0.1, 0.2 are good values example)",
"0 1 0.01")]
56 float m_fShapeTextSize;
57 [
Attribute(
"2.15", UIWidgets.Slider,
"Offset of the shape from entity's origin in Y axis",
"0 100 0.1")]
58 float m_fShapeHeightOffset;
60 [
Attribute(
"1.5", UIWidgets.Slider,
"Health bar width, 1.5 is a fair value",
"0 10 0.01")]
61 float m_fShapeHealthbarWidth;
62 [
Attribute(
"0.03", UIWidgets.Slider,
"Health bar height, 0.03, 0.05 are a fair value",
"0 1 0.0025")]
63 float m_fShapeHealthbarHeight;
65 [
Attribute(
"0.125", UIWidgets.Slider,
"Radius of the shape, a value of 0.125 is fine",
"0 1 0.0025")]
69 [
Attribute(
"15", UIWidgets.Slider,
"The distance in metres from camera at which (and below) the shape will retain it's minimum size",
"0 100 0.1")]
70 float m_fShapeSizeGoal;
71 [
Attribute(
"1.0", UIWidgets.Slider,
"Shape's minimum size",
"0 10 0.1")]
72 float m_fShapeSizeMinimum;
73 [
Attribute(
"17.5", UIWidgets.Slider,
"Shape's maximum size",
"0 100 0.1")]
74 float m_fShapeSizeMaximum;
77 override void EOnInit(IEntity owner)
100 SetEventMask(EntityEvent.INIT);