您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

18 行
336 B

  1. use serde::{Deserialize, Serialize};
  2. use specs::{Component, HashMapStorage};
  3. #[derive(Clone, Debug, Serialize, Deserialize)]
  4. pub struct Asteroid {
  5. pub type_: Type,
  6. }
  7. #[derive(Clone, Debug, Serialize, Deserialize)]
  8. pub enum Type {
  9. Metal,
  10. Crystal,
  11. }
  12. impl Component for Asteroid {
  13. type Storage = HashMapStorage<Self>;
  14. }