-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimple_example.dc
More file actions
30 lines (25 loc) · 965 Bytes
/
simple_example.dc
File metadata and controls
30 lines (25 loc) · 965 Bytes
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
// An abstraction for readability
typedef uint32 doId;
typedef uint32 zoneId;
typedef uint64 channel;
// Associate Python mappings with these classes.
from simple_example import LoginManager/AI/UD
from simple_example import DistributedMaproot/AI/UD
from simple_example import DistributedAvatar/AI/OV
// A simple DOG for username/password authentication.
dclass LoginManager {
set_maproot(doId maproot);
login(string username, string password) clsend;
};
// The root object of the map, container for the DistributedAvatars
dclass DistributedMaproot {
createAvatar(channel client) airecv;
};
// The actual class for avatar control.
// The idea is that a Client can set its intention for its heading
// and speed, but only the controlling AI can set its actual
// position and heading.
dclass DistributedAvatar {
setXYZH(int16 / 1000, int16 / 1000, int16 / 1000, int16 / 50) broadcast required;
indicateIntent(int16 / 10, int16 / 10) ownsend airecv;
};