Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
VendorColorProfile.cs
Go to the documentation of this file.
1using System;
2using System.Linq;
4using Newtonsoft.Json;
5
7
9{
10 private readonly DeviceColorProfile[] _profiles = new DeviceColorProfile[Enum.GetValues(typeof(RgbDeviceType)).Cast<int>().Max() + 1];
11
12 [JsonProperty]
14 {
15 get
16 {
17 return _profiles[0];
18 }
19 private set
20 {
21 _profiles[0] = value;
22 }
23 }
24
25 [JsonProperty]
27 {
28 get
29 {
30 return _profiles[1];
31 }
32 private set
33 {
34 _profiles[1] = value;
35 }
36 }
37
38 [JsonProperty]
40 {
41 get
42 {
43 return _profiles[2];
44 }
45 private set
46 {
47 _profiles[2] = value;
48 }
49 }
50
51 [JsonProperty]
53 {
54 get
55 {
56 return _profiles[3];
57 }
58 private set
59 {
60 _profiles[3] = value;
61 }
62 }
63
64 [JsonProperty]
66 {
67 get
68 {
69 return _profiles[4];
70 }
71 private set
72 {
73 _profiles[4] = value;
74 }
75 }
76
77 [JsonProperty]
78 public DeviceColorProfile Generic
79 {
80 get
81 {
82 return _profiles[5];
83 }
84 private set
85 {
86 _profiles[5] = value;
87 }
88 }
89
90 [JsonProperty]
92 {
93 get
94 {
95 return _profiles[6];
96 }
97 private set
98 {
99 _profiles[6] = value;
100 }
101 }
102
104
106 {
107 for (int i = 0; i < _profiles.Length; i++)
108 {
109 _profiles[i] = new DeviceColorProfile();
110 }
111 }
112
113 public VendorColorProfile(Vector3 multiplier)
114 {
115 //IL_0037: Unknown result type (might be due to invalid IL or missing references)
116 for (int i = 0; i < _profiles.Length; i++)
117 {
118 _profiles[i] = new DeviceColorProfile(multiplier);
119 }
120 }
121
123 {
124 _profiles[(int)type] = profile;
125 }
126}
void SetColorMultiplier(RgbDeviceType type, DeviceColorProfile profile)
static Array GetValues(Type enumType)
Definition Enum.cs:323