rpgmxp_types/
animation.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use crate::AnimationFrame;
use crate::AnimationTiming;

#[derive(
    Debug,
    serde::Serialize,
    serde::Deserialize,
    ruby_marshal_derive::FromValue,
    ruby_marshal_derive::IntoValue,
)]
#[ruby_marshal(object = b"RPG::Animation")]
pub struct Animation {
    pub id: i32,
    #[ruby_marshal(
        from_value = "crate::util::ruby_string2string",
        into_value = "crate::util::string2ruby_string"
    )]
    pub name: String,
    #[ruby_marshal(
        from_value = "crate::util::ruby_string2string",
        into_value = "crate::util::string2ruby_string"
    )]
    pub animation_name: String,
    pub animation_hue: i32,
    pub position: i32,
    pub frame_max: i32,
    pub frames: Vec<AnimationFrame>,
    pub timings: Vec<AnimationTiming>,
}