File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -12,25 +12,29 @@ class RGBPalette {
12
12
13
13
private function set_r (color : FlxColor ) {
14
14
r = color ;
15
- shader .r .value = [color .redFloat , color .greenFloat , color .blueFloat ];
15
+ if (shader != null )
16
+ shader .r .value = [color .redFloat , color .greenFloat , color .blueFloat ];
16
17
return color ;
17
18
}
18
19
19
20
private function set_g (color : FlxColor ) {
20
21
g = color ;
21
- shader .g .value = [color .redFloat , color .greenFloat , color .blueFloat ];
22
+ if (shader != null )
23
+ shader .g .value = [color .redFloat , color .greenFloat , color .blueFloat ];
22
24
return color ;
23
25
}
24
26
25
27
private function set_b (color : FlxColor ) {
26
28
b = color ;
27
- shader .b .value = [color .redFloat , color .greenFloat , color .blueFloat ];
29
+ if (shader != null )
30
+ shader .b .value = [color .redFloat , color .greenFloat , color .blueFloat ];
28
31
return color ;
29
32
}
30
33
31
34
private function set_mult (value : Float ) {
32
35
mult = FlxMath .bound (value , 0 , 1 );
33
- shader .mult .value = [mult ];
36
+ if (shader != null )
37
+ shader .mult .value = [mult ];
34
38
return mult ;
35
39
}
36
40
You can’t perform that action at this time.
0 commit comments