pub struct LuaRenderingDrawLightParams {Show 16 fields
pub blink_interval: u16,
pub color: Color,
pub forces: ForceSet,
pub intensity: f32,
pub minimum_darkness: f32,
pub only_in_alt_mode: bool,
pub orientation: RealOrientation,
pub oriented: bool,
pub players: Vec<PlayerIdentification>,
pub render_mode: ScriptRenderMode,
pub scale: f32,
pub sprite: SpritePath,
pub surface: SurfaceIdentification,
pub target: ScriptRenderTarget,
pub time_to_live: u32,
pub visible: bool,
}Expand description
Create a gradient light which is not occluded by any sprites. It is rendered at lower resolution, so it takes less GPU power. The same technique is used for lights drawn by LightDefinition.
The base game uses the utility sprites light_medium and light_small for lights.
Fields§
§blink_interval: u16In ticks. Defaults to 0 (no blinking). Game alerts use 30.
color: ColorDefaults to white (no tint).
forces: ForceSetThe forces that this object is rendered to. Passing nil or an empty table will render it to all forces.
intensity: f32Default is 1.
minimum_darkness: f32The minimum darkness at which this light is rendered. Default is 0.
only_in_alt_mode: boolIf this should only be rendered in alt mode. Defaults to false.
orientation: RealOrientationThe orientation of the light. Default is 0.
oriented: boolIf this light has the same orientation as the entity target, default is false. Note that orientation is still applied to the sprite.
players: Vec<PlayerIdentification>The players that this object is rendered to. Passing nil or an empty table will render it to all players.
render_mode: ScriptRenderModeMode which this object should render in. Defaults to “game”.
scale: f32Default is 1.
sprite: SpritePath§surface: SurfaceIdentification§target: ScriptRenderTargetCenter of the light.
time_to_live: u32In ticks. Defaults to living forever.
visible: boolIf this is rendered to anyone at all. Defaults to true.
Trait Implementations§
Source§impl Clone for LuaRenderingDrawLightParams
impl Clone for LuaRenderingDrawLightParams
Source§fn clone(&self) -> LuaRenderingDrawLightParams
fn clone(&self) -> LuaRenderingDrawLightParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more