/
CHMessage.cs
40 lines (34 loc) · 936 Bytes
/
CHMessage.cs
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
// Copyright Jacob Niedzwiecki, 2019
// Released under the MIT License (see /LICENSE)
using System.Collections.Generic;
namespace Cohort {
public class CHMessage {
public List<string> targetTags;
public MediaDomain mediaDomain;
public float cueNumber;
public CueAction cueAction;
public int id;
public static string FormattedMessage(CHMessage msg) {
string tagsForPrint = "";
msg.targetTags.ForEach(tag => tagsForPrint = tagsForPrint + tag + ", ");
return " " + "cohort message: "
+ "\n tags: " + tagsForPrint
+ "\n media domain: " + msg.mediaDomain
+ "\n cue #: " + msg.cueNumber
+ "\n action: " + msg.cueAction;
}
}
public enum MediaDomain {
sound,
video,
text,
light,
haptic
}
public enum CueAction {
play, // or "on"
pause,
restart,
stop // or "off"
}
}