Struct siege::Engine
[−]
[src]
pub struct Engine { pub pos: Point<f64>, pub parts: Vec<Part>, }
A instance of a siege engine.
Fields
pos: Point<f64>
parts: Vec<Part>
Methods
impl Engine
[src]
pub fn new(x: f64, y: f64) -> Self
[src]
Place a empty siege engine at the given position with no parts.
pub fn render_to_buffer(&self, dst: &mut [u32], dst_width: usize)
[src]
Render the graphics of the siege engine to a buffer.
pub fn add_beam(
&mut self,
start: (i32, i32),
end: (i32, i32),
material: Material
)
[src]
&mut self,
start: (i32, i32),
end: (i32, i32),
material: Material
)
Add a beam with the material.
pub fn add_wheel(
&mut self,
start: (i32, i32),
end: (i32, i32),
material: Material
)
[src]
&mut self,
start: (i32, i32),
end: (i32, i32),
material: Material
)
Add a wheel with the material.