pub struct IntEvent {
pub def_value: i32,
pub value: i32,
pub cur_time: i32,
pub end_time: i32,
pub delay_time: i32,
pub start_value: i32,
pub cur_value: i32,
pub end_value: i32,
pub loop_type: i32,
pub speed_type: i32,
pub real_flag: i32,
}Fields§
§def_value: i32§value: i32§cur_time: i32§end_time: i32§delay_time: i32§start_value: i32§cur_value: i32§end_value: i32§loop_type: i32-1: none, 0: oneshot, 1: loop, 2: turn
speed_type: i32-1: none, 0: linear, 1: speed_up, 2: speed_down
real_flag: i320: game time, 1: real time
Implementations§
Source§impl IntEvent
impl IntEvent
pub fn new(def_value: i32) -> Self
pub fn reinit(&mut self)
pub fn set_value(&mut self, v: i32)
pub fn get_value(&self) -> i32
pub fn get_total_value(&self) -> i32
pub fn set_event( &mut self, value: i32, total_time: i32, delay_time: i32, speed_type: i32, real_flag: i32, )
pub fn loop_event( &mut self, start_value: i32, end_value: i32, loop_time: i32, delay_time: i32, speed_type: i32, real_flag: i32, )
pub fn turn_event( &mut self, start_value: i32, end_value: i32, loop_time: i32, delay_time: i32, speed_type: i32, real_flag: i32, )
pub fn end_event(&mut self)
pub fn check_event(&self) -> bool
pub fn update_time(&mut self, past_game_time: i32, past_real_time: i32)
pub fn frame(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IntEvent
impl RefUnwindSafe for IntEvent
impl Send for IntEvent
impl Sync for IntEvent
impl Unpin for IntEvent
impl UnsafeUnpin for IntEvent
impl UnwindSafe for IntEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.