-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcsharp.json
150 lines (145 loc) · 3.82 KB
/
csharp.json
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
{
// Place your snippets for csharp here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"Entitas Component": {
"prefix": "e_component",
"body": [
"using Entitas;",
"",
"public sealed class $1 : IComponent {",
"}"
],
"description": "Entitas Component Template"
},
"Entitas Feature": {
"prefix": "e_feature",
"body": [
"using Entitas;",
"",
"public sealed class $1 : Feature {",
" public $1(Contexts contexts) {",
" // Add systems here",
" }",
"}"
],
"description": "Entitas Feature Template"
},
"Entitas Execute System": {
"prefix": "e_execute",
"body": [
"using Entitas;",
"",
"public class $1 : IExecuteSystem {",
" private Contexts _contexts;",
"",
" public $1(Contexts contexts) {",
" _contexts = contexts;",
" }",
"",
" public void Execute() {",
" // per-frame code goes here",
" }",
"}"
],
"description": "Entitas Execute System Template"
},
"Entitas Cleanup System": {
"prefix": "e_cleanup",
"body": [
"using Entitas;",
"",
"public class $1 : ICleanupSystem {",
" private Contexts _contexts;",
"",
" public $1(Contexts contexts) {",
" _contexts = contexts;",
" }",
"",
" public void Cleanup() {",
" // cleanup code here",
" // runs after every execute and reactive system has completed",
" }",
"}"
],
"description": "Entitas Cleanup System Template"
},
"Entitas Initialize System": {
"prefix": "e_initalize",
"body": [
"using Entitas;",
"",
"public class $1 : IInitializeSystem {",
" private Contexts _contexts;",
"",
" public $1(Contexts contexts) {",
" _contexts = contexts;",
" }",
"",
" public void Initialize() {",
" // Initialization code here",
" }",
"}"
],
"description": "Entitas Initialize System Template"
},
"Entitas Reactive System": {
"prefix": "e_react",
"body": [
"using Entitas;",
"using System.Collections.Generic;",
"",
"public class $1 : ReactiveSystem<GameEntity> {",
" private Contexts _contexts;",
"",
" public $1(Contexts contexts) : base(contexts.game) {",
" _contexts = contexts;",
" }",
"",
" protected override ICollector<GameEntity> GetTrigger(IContext<GameEntity> context) {",
" return context.CreateCollector();",
" }",
"",
" protected override bool Filter(GameEntity entity) {",
" throw new System.NotImplementedException();",
" }",
"",
" protected override void Execute(List<GameEntity> entities) {",
" foreach (var e in entities) {",
" // do stuff to the matched entities",
" }",
" }",
"}"
],
"description": "Entitas Reactive System Template"
},
"Entitas TearDown System": {
"prefix": "e_teardown",
"body": [
"using Entitas;",
"",
"public class $1 : ITearDownSystem {",
" private Contexts _contexts;",
"",
" public $1(Contexts contexts) {",
" _contexts = contexts;",
" }",
"",
" public void TearDown() {",
" // Teardown code here",
" }",
"}"
],
"description": "Entitas TearDown System Template"
}
}