pub struct LuaPlayerCreateLocalFlyingTextParams {
pub color: Color,
pub create_at_cursor: bool,
pub position: MapPosition,
pub speed: f64,
pub surface: LuaAny,
pub text: String,
pub time_to_live: u32,
}Expand description
Spawn flying text that is only visible to this player. Either position or create_at_cursor are required. When create_at_cursor is true, all parameters other than text are ignored.
If no custom speed is set and the text is longer than 25 characters, its time_to_live and speed are dynamically adjusted to give the player more time to read it.
Local flying text is not saved, which means it will disappear after a save/load-cycle.
Fields§
§color: ColorThe color of the flying text. Defaults to white text.
create_at_cursor: boolIf true, the flying text is created at the player’s cursor. Defaults to false.
position: MapPositionThe location on the map at which to show the flying text.
speed: f64The speed at which the text rises upwards in tiles/second. Can’t be a negative value.
surface: LuaAnyThe surface which this text will be shown on. Defaults to player surface.
text: StringThe flying text to show.
time_to_live: u32The amount of ticks that the flying text will be shown for. Defaults to 80.
Trait Implementations§
Source§impl Clone for LuaPlayerCreateLocalFlyingTextParams
impl Clone for LuaPlayerCreateLocalFlyingTextParams
Source§fn clone(&self) -> LuaPlayerCreateLocalFlyingTextParams
fn clone(&self) -> LuaPlayerCreateLocalFlyingTextParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more