-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathbevy.code-snippets
68 lines (68 loc) · 1.65 KB
/
bevy.code-snippets
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
"Bevy: New top-level function Plugin": {
"scope": "rust",
"prefix": "plugin",
"body": [
"use bevy::prelude::*;",
"",
"pub(super) fn plugin(app: &mut App) {",
"\t$0",
"}"
]
},
"Bevy: New Component": {
"scope": "rust",
"prefix": "component",
"body": [
"#[derive(Component, Reflect, Debug)]",
"#[reflect(Component)]",
"struct $1;"
]
},
"Bevy: New Resource": {
"scope": "rust",
"prefix": "resource",
"body": [
"#[derive(Resource, Reflect, Debug, Default)]",
"#[reflect(Resource)]",
"struct $1;"
]
},
"Bevy: New Event": {
"scope": "rust",
"prefix": "event",
"body": [
"#[derive(Event, Debug)]",
"struct $1;"
]
},
"Bevy: New SystemSet": {
"scope": "rust",
"prefix": "systemset",
"body": [
"#[derive(SystemSet, Copy, Clone, Eq, PartialEq, Hash, Debug)]",
"enum $1 {",
"\t$0",
"}"
]
},
"Bevy: New Schedule": {
"scope": "rust",
"prefix": "schedule",
"body": [
"#[derive(ScheduleLabel, Copy, Clone, Eq, PartialEq, Hash, Debug)]",
"struct $1;"
]
},
"Bevy: New States": {
"scope": "rust",
"prefix": "states",
"body": [
"#[derive(States, Copy, Clone, Eq, PartialEq, Hash, Debug, Default)]",
"enum $1 {",
"\t#[default]",
"\t$0",
"}"
]
}
}