pub struct TileNode { /* private fields */ }Expand description
The TileNode class to render Tilemaps from TMX file in game scene tree hierarchy.
Implementations§
Source§impl TileNode
impl TileNode
Sourcepub fn set_depth_write(&mut self, val: bool)
pub fn set_depth_write(&mut self, val: bool)
Sets whether the depth buffer should be written to when rendering the tilemap.
Sourcepub fn is_depth_write(&self) -> bool
pub fn is_depth_write(&self) -> bool
Gets whether the depth buffer should be written to when rendering the tilemap.
Sourcepub fn set_blend_func(&mut self, val: BlendFunc)
pub fn set_blend_func(&mut self, val: BlendFunc)
Sets the blend function for the tilemap.
Sourcepub fn get_blend_func(&self) -> BlendFunc
pub fn get_blend_func(&self) -> BlendFunc
Gets the blend function for the tilemap.
Sourcepub fn set_effect(&mut self, val: &SpriteEffect)
pub fn set_effect(&mut self, val: &SpriteEffect)
Sets the tilemap shader effect.
Sourcepub fn get_effect(&self) -> SpriteEffect
pub fn get_effect(&self) -> SpriteEffect
Gets the tilemap shader effect.
Sourcepub fn set_filter(&mut self, val: TextureFilter)
pub fn set_filter(&mut self, val: TextureFilter)
Sets the texture filtering mode for the tilemap.
Sourcepub fn get_filter(&self) -> TextureFilter
pub fn get_filter(&self) -> TextureFilter
Gets the texture filtering mode for the tilemap.
Sourcepub fn get_layer(&self, layer_name: &str) -> Option<Dictionary>
pub fn get_layer(&self, layer_name: &str) -> Option<Dictionary>
Sourcepub fn new(tmx_file: &str) -> Option<TileNode>
pub fn new(tmx_file: &str) -> Option<TileNode>
Creates a TileNode object that will render the tile layers from a TMX file.
§Arguments
tmxFile- The TMX file for the tilemap. This should be a file created with the Tiled Map Editor (http://www.mapeditor.org) and must be in XML format.
§Returns
Returns a new instance of the TileNode class. If the tilemap file is not found, it will return None.
Sourcepub fn with_with_layer(tmx_file: &str, layer_name: &str) -> Option<TileNode>
pub fn with_with_layer(tmx_file: &str, layer_name: &str) -> Option<TileNode>
Creates a TileNode object that will render the specified tile layer from a TMX file.
§Arguments
tmxFile- The TMX file for the tilemap. This should be a file created with the Tiled Map Editor (http://www.mapeditor.org) and must be in XML format.layerName- The name of the layer in the TMX file.
§Returns
Returns a new instance of the TileNode class. If the tilemap file is not found, it will return None.
Sourcepub fn with_with_layers(
tmx_file: &str,
layer_names: &Vec<&str>,
) -> Option<TileNode>
pub fn with_with_layers( tmx_file: &str, layer_names: &Vec<&str>, ) -> Option<TileNode>
Creates a TileNode object that will render the specified tile layers from a TMX file.
§Arguments
tmxFile- The TMX file for the tilemap. This should be a file created with the Tiled Map Editor (http://www.mapeditor.org) and must be in XML format.layerNames- A vector of names of the layers in the TMX file.
§Returns
Returns a new instance of the TileNode class. If the tilemap file is not found, it will return None.
Trait Implementations§
Source§impl INode for TileNode
impl INode for TileNode
Source§fn set_angle_x(&mut self, val: f32)
fn set_angle_x(&mut self, val: f32)
Source§fn get_angle_x(&self) -> f32
fn get_angle_x(&self) -> f32
Source§fn set_angle_y(&mut self, val: f32)
fn set_angle_y(&mut self, val: f32)
Source§fn get_angle_y(&self) -> f32
fn get_angle_y(&self) -> f32
Source§fn set_scale_x(&mut self, val: f32)
fn set_scale_x(&mut self, val: f32)
Source§fn get_scale_x(&self) -> f32
fn get_scale_x(&self) -> f32
Source§fn set_scale_y(&mut self, val: f32)
fn set_scale_y(&mut self, val: f32)
Source§fn get_scale_y(&self) -> f32
fn get_scale_y(&self) -> f32
Source§fn set_position(&mut self, val: &Vec2)
fn set_position(&mut self, val: &Vec2)
Source§fn get_position(&self) -> Vec2
fn get_position(&self) -> Vec2
Source§fn set_skew_x(&mut self, val: f32)
fn set_skew_x(&mut self, val: f32)
Source§fn get_skew_x(&self) -> f32
fn get_skew_x(&self) -> f32
Source§fn set_skew_y(&mut self, val: f32)
fn set_skew_y(&mut self, val: f32)
Source§fn get_skew_y(&self) -> f32
fn get_skew_y(&self) -> f32
Source§fn set_visible(&mut self, val: bool)
fn set_visible(&mut self, val: bool)
Source§fn is_visible(&self) -> bool
fn is_visible(&self) -> bool
Source§fn set_anchor(&mut self, val: &Vec2)
fn set_anchor(&mut self, val: &Vec2)
Source§fn get_anchor(&self) -> Vec2
fn get_anchor(&self) -> Vec2
Source§fn set_height(&mut self, val: f32)
fn set_height(&mut self, val: f32)
Source§fn get_height(&self) -> f32
fn get_height(&self) -> f32
Source§fn set_opacity(&mut self, val: f32)
fn set_opacity(&mut self, val: f32)
Source§fn get_opacity(&self) -> f32
fn get_opacity(&self) -> f32
Source§fn set_color3(&mut self, val: &Color3)
fn set_color3(&mut self, val: &Color3)
Source§fn get_color3(&self) -> Color3
fn get_color3(&self) -> Color3
Source§fn set_pass_opacity(&mut self, val: bool)
fn set_pass_opacity(&mut self, val: bool)
Source§fn is_pass_opacity(&self) -> bool
fn is_pass_opacity(&self) -> bool
Source§fn set_pass_color3(&mut self, val: bool)
fn set_pass_color3(&mut self, val: bool)
Source§fn is_pass_color3(&self) -> bool
fn is_pass_color3(&self) -> bool
Source§fn set_transform_target(&mut self, val: &dyn INode)
fn set_transform_target(&mut self, val: &dyn INode)
Source§fn get_transform_target(&self) -> Option<Node>
fn get_transform_target(&self) -> Option<Node>
Source§fn set_scheduler(&mut self, val: &Scheduler)
fn set_scheduler(&mut self, val: &Scheduler)
Source§fn get_scheduler(&self) -> Scheduler
fn get_scheduler(&self) -> Scheduler
Source§fn get_children(&self) -> Option<Array>
fn get_children(&self) -> Option<Array>
Source§fn get_parent(&self) -> Option<Node>
fn get_parent(&self) -> Option<Node>
Source§fn is_running(&self) -> bool
fn is_running(&self) -> bool
Source§fn is_scheduled(&self) -> bool
fn is_scheduled(&self) -> bool
Source§fn get_action_count(&self) -> i32
fn get_action_count(&self) -> i32
Source§fn get_data(&self) -> Dictionary
fn get_data(&self) -> Dictionary
Source§fn set_touch_enabled(&mut self, val: bool)
fn set_touch_enabled(&mut self, val: bool)
Source§fn is_touch_enabled(&self) -> bool
fn is_touch_enabled(&self) -> bool
Source§fn set_swallow_touches(&mut self, val: bool)
fn set_swallow_touches(&mut self, val: bool)
Source§fn is_swallow_touches(&self) -> bool
fn is_swallow_touches(&self) -> bool
Source§fn set_swallow_mouse_wheel(&mut self, val: bool)
fn set_swallow_mouse_wheel(&mut self, val: bool)
Source§fn is_swallow_mouse_wheel(&self) -> bool
fn is_swallow_mouse_wheel(&self) -> bool
Source§fn set_keyboard_enabled(&mut self, val: bool)
fn set_keyboard_enabled(&mut self, val: bool)
Source§fn is_keyboard_enabled(&self) -> bool
fn is_keyboard_enabled(&self) -> bool
Source§fn set_controller_enabled(&mut self, val: bool)
fn set_controller_enabled(&mut self, val: bool)
Source§fn is_controller_enabled(&self) -> bool
fn is_controller_enabled(&self) -> bool
Source§fn set_render_group(&mut self, val: bool)
fn set_render_group(&mut self, val: bool)
Source§fn is_render_group(&self) -> bool
fn is_render_group(&self) -> bool
Source§fn set_show_debug(&mut self, val: bool)
fn set_show_debug(&mut self, val: bool)
Source§fn is_show_debug(&self) -> bool
fn is_show_debug(&self) -> bool
Source§fn set_render_order(&mut self, val: i32)
fn set_render_order(&mut self, val: i32)
Source§fn get_render_order(&self) -> i32
fn get_render_order(&self) -> i32
Source§fn add_child_with_order_tag(&mut self, child: &dyn INode, order: i32, tag: &str)
fn add_child_with_order_tag(&mut self, child: &dyn INode, order: i32, tag: &str)
Source§fn add_child_with_order(&mut self, child: &dyn INode, order: i32)
fn add_child_with_order(&mut self, child: &dyn INode, order: i32)
Source§fn add_to_with_order_tag(
&mut self,
parent: &dyn INode,
order: i32,
tag: &str,
) -> Node
fn add_to_with_order_tag( &mut self, parent: &dyn INode, order: i32, tag: &str, ) -> Node
Source§fn add_to_with_order(&mut self, parent: &dyn INode, order: i32) -> Node
fn add_to_with_order(&mut self, parent: &dyn INode, order: i32) -> Node
Source§fn add_to(&mut self, parent: &dyn INode) -> Node
fn add_to(&mut self, parent: &dyn INode) -> Node
Source§fn remove_child(&mut self, child: &dyn INode, cleanup: bool)
fn remove_child(&mut self, child: &dyn INode, cleanup: bool)
Source§fn remove_child_by_tag(&mut self, tag: &str, cleanup: bool)
fn remove_child_by_tag(&mut self, tag: &str, cleanup: bool)
Source§fn remove_all_children(&mut self, cleanup: bool)
fn remove_all_children(&mut self, cleanup: bool)
Source§fn remove_from_parent(&mut self, cleanup: bool)
fn remove_from_parent(&mut self, cleanup: bool)
Source§fn move_to_parent(&mut self, parent: &dyn INode)
fn move_to_parent(&mut self, parent: &dyn INode)
Source§fn schedule(&mut self, update_func: Box<dyn FnMut(f64) -> bool>)
fn schedule(&mut self, update_func: Box<dyn FnMut(f64) -> bool>)
Source§fn unschedule(&mut self)
fn unschedule(&mut self)
Source§fn convert_to_node_space(&mut self, world_point: &Vec2) -> Vec2
fn convert_to_node_space(&mut self, world_point: &Vec2) -> Vec2
Source§fn convert_to_world_space(&mut self, node_point: &Vec2) -> Vec2
fn convert_to_world_space(&mut self, node_point: &Vec2) -> Vec2
Source§fn convert_to_window_space(
&mut self,
node_point: &Vec2,
callback: Box<dyn FnMut(&Vec2)>,
)
fn convert_to_window_space( &mut self, node_point: &Vec2, callback: Box<dyn FnMut(&Vec2)>, )
Source§fn each_child(
&mut self,
visitor_func: Box<dyn FnMut(&dyn INode) -> bool>,
) -> bool
fn each_child( &mut self, visitor_func: Box<dyn FnMut(&dyn INode) -> bool>, ) -> bool
Source§fn traverse(&mut self, visitor_func: Box<dyn FnMut(&dyn INode) -> bool>) -> bool
fn traverse(&mut self, visitor_func: Box<dyn FnMut(&dyn INode) -> bool>) -> bool
TraverseEnabled flag are not visited. Read more