Skip to content

Commit f8c4ca1

Browse files
add intensity to SetLightColor
1 parent 87abee3 commit f8c4ca1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

MethodSystem/Methods/LightMethods/SetLightColorMethod.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,18 @@ public class SetLightColorMethod : SynchronousMethod
1313
[
1414
new RoomsArgument("rooms"),
1515
new ColorArgument("color"),
16+
new FloatArgument("intensity", 0)
17+
{
18+
DefaultValue = 1
19+
}
1620
];
1721

1822
public override void Execute()
1923
{
2024
var rooms = Args.GetRooms("rooms");
21-
var color = Args.GetColor("color");
22-
25+
var intensity = Args.GetFloat("intensity");
26+
var color = Args.GetColor("color") * intensity;
27+
2328
rooms.ForEachItem(room =>
2429
room.AllLightControllers.ForEachItem(ctrl =>
2530
ctrl.OverrideLightsColor = color

0 commit comments

Comments
 (0)