-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathActionLibrary.cs
More file actions
62 lines (52 loc) · 1.83 KB
/
ActionLibrary.cs
File metadata and controls
62 lines (52 loc) · 1.83 KB
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
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace Hivemind {
public enum GUIField {
BoundsField, ColorField, CurveField, EnumMaskField, EnumPopup, FloatField, IntField, IntSlider, LayerField,
RectField, TagField, TextField, Toggle, ToggleLeft, Vector2Field, Vector3Field, Vector4Field
}
[System.AttributeUsage(System.AttributeTargets.Method)]
public class ActionAttribute : System.Attribute {
public ActionAttribute() {}
}
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)]
public class ParameterAttribute : System.Attribute {
public string name;
public System.Type type;
public GUIField guiField;
public ParameterAttribute(string parameterName, System.Type parameterType) {
name = parameterName;
type = parameterType;
throw new System.NotImplementedException("ParameterAttribute not implemented");
}
public ParameterAttribute(string parameterName, System.Type parameterType, GUIField parameterGUIField) {
name = parameterName;
type = parameterType;
guiField = parameterGUIField;
throw new System.NotImplementedException("ParameterAttribute not implemented");
}
}
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)]
public class ExpectsAttribute : System.Attribute {
public string key;
public System.Type type;
public ExpectsAttribute(string inputKey, System.Type inputType) {
key = inputKey;
type = inputType;
}
}
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)]
public class OutputsAttribute : System.Attribute {
public string key;
public System.Type type;
public OutputsAttribute(string outputKey, System.Type outputType) {
key = outputKey;
type = outputType;
}
}
public abstract class ActionLibrary {
public GameObject agent;
public Context context;
}
}