cranium_core/
actionset.rs1use bevy::prelude::*;
10use crate::actions::{ActionTemplate};
11
12#[cfg(feature = "actionset_loader")]
13use serde::{Serialize, Deserialize};
14
15#[derive(Debug, Clone, Reflect)]
16#[cfg_attr(any(feature = "actionset_loader"), derive(Serialize, Deserialize, Asset))]
17pub struct ActionSet {
18 pub name: String,
19 pub actions: crate::types::CraniumList<ActionTemplate>,
20}
21
22impl ActionSet {
23 pub fn new<IS: Into<String>>(name: IS, actions: crate::types::CraniumList<ActionTemplate>) -> Self {
24 Self {
25 name: name.into(),
26 actions: actions,
27 }
28 }
29}