forked from neurotechcenter/UnityBCI2000
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCustomVariableSnippet.xml
51 lines (51 loc) · 1.72 KB
/
CustomVariableSnippet.xml
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
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title></Title>
</Header>
<Snippet>
<Code Language="CSharp">
<![CDATA[public class $ClassName$ : CustomVariableBase
{
public override void AddCustomVariables()
{
customVariables.Add(new CustomVariable(
"$Name$",
new Func<float>(() => $Value$),
$Scale$,
UnityBCI2000.StateType.$Type$
));
}
}]]>
</Code>
<Declarations>
<Literal>
<ID>ClassName</ID>
<ToolTip>Name of the Custom Variable supplier</ToolTip>
<Default>CustomVariableSupplier</Default>
</Literal>
<Literal>
<ID>Name</ID>
<ToolTip>Name of the custom variable to add</ToolTip>
<Default>Variable</Default>
</Literal>
<Literal>
<ID>Value</ID>
<ToolTip>Method or code which supplies the value of the custom variable</ToolTip>
<Default>{return 0;}</Default>
</Literal>
<Literal>
<ID>Scale</ID>
<ToolTip>What to scale the custom variable by</ToolTip>
<Default>1</Default>
</Literal>
<Literal>
<ID>Type</ID>
<ToolTip>The type of the variable. These are found in UnityBCI2000.cs</ToolTip>
<Default>UnsignedInt32</Default>
</Literal>
</Declarations>
</Snippet>
</CodeSnippet>
</CodeSnippets>