(a6437298b) Added LightComponent.IsOn to the SerializableProperties that can be accessed without reflection.
This commit is contained in:
@@ -443,6 +443,9 @@ namespace Barotrauma
|
|||||||
case "IsDead":
|
case "IsDead":
|
||||||
{ if (parentObject is Character character) { return character.IsDead; } }
|
{ if (parentObject is Character character) { return character.IsDead; } }
|
||||||
break;
|
break;
|
||||||
|
case "IsOn":
|
||||||
|
{ if (parentObject is LightComponent lightComponent) { return lightComponent.IsOn; } }
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@@ -488,6 +491,9 @@ namespace Barotrauma
|
|||||||
case "SpeedMultiplier":
|
case "SpeedMultiplier":
|
||||||
{ if (parentObject is Character character && value is float) { character.SpeedMultiplier = (float)value; return true; } }
|
{ if (parentObject is Character character && value is float) { character.SpeedMultiplier = (float)value; return true; } }
|
||||||
break;
|
break;
|
||||||
|
case "IsOn":
|
||||||
|
{ if (parentObject is LightComponent lightComponent && value is bool) { lightComponent.IsOn = (bool)value; return true; } }
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user