updaate
This commit is contained in:
parent
d31dcd0b19
commit
43f771fb0f
@ -11,9 +11,9 @@ pub struct StageElement{
|
|||||||
}
|
}
|
||||||
impl StageElement{
|
impl StageElement{
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn new(stage_id:u32,force:bool,behaviour:StageElementBehaviour)->Self{
|
pub const fn new(stage_id:StageId,force:bool,behaviour:StageElementBehaviour)->Self{
|
||||||
Self{
|
Self{
|
||||||
stage_id:StageId(stage_id),
|
stage_id,
|
||||||
force,
|
force,
|
||||||
behaviour,
|
behaviour,
|
||||||
}
|
}
|
||||||
@ -141,6 +141,12 @@ impl Mode{
|
|||||||
jump_limit:HashMap::new(),
|
jump_limit:HashMap::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pub const fn get_start(&self)->ModelId{
|
||||||
|
self.start
|
||||||
|
}
|
||||||
|
pub const fn get_style(&self)->&gameplay_style::StyleModifiers{
|
||||||
|
&self.style
|
||||||
|
}
|
||||||
pub fn push_stage(&mut self,stage:Stage){
|
pub fn push_stage(&mut self,stage:Stage){
|
||||||
self.stages.push(stage)
|
self.stages.push(stage)
|
||||||
}
|
}
|
||||||
@ -231,6 +237,11 @@ impl ModeUpdate{
|
|||||||
mu.jump_limit.insert(model_id,jump_limit);
|
mu.jump_limit.insert(model_id,jump_limit);
|
||||||
mu
|
mu
|
||||||
}
|
}
|
||||||
|
pub fn map_stage_element_ids<F:Fn(StageId)->StageId>(&mut self,f:F){
|
||||||
|
for (_,stage_element) in self.elements.iter_mut(){
|
||||||
|
stage_element.stage_id=f(stage_element.stage_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default,Clone)]
|
#[derive(Default,Clone)]
|
||||||
|
@ -32,6 +32,9 @@ impl PolygonList{
|
|||||||
pub const fn new(list:Vec<IndexedVertexList>)->Self{
|
pub const fn new(list:Vec<IndexedVertexList>)->Self{
|
||||||
Self(list)
|
Self(list)
|
||||||
}
|
}
|
||||||
|
pub fn extend<T:IntoIterator<Item=IndexedVertexList>>(&mut self,iter:T){
|
||||||
|
self.0.extend(iter);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
impl PolygonIter for PolygonList{
|
impl PolygonIter for PolygonList{
|
||||||
fn polys(&self)->impl Iterator<Item=&[VertexId]>{
|
fn polys(&self)->impl Iterator<Item=&[VertexId]>{
|
||||||
|
Loading…
Reference in New Issue
Block a user