blob: 7d5e9264901211ef2b4f98b4af6ac385a33b70d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
NAME(delay);
PARENT(trigger);
INIT {
super("init");
super("target");
this->tick = propertyi("tick");
}
ENTER {
if (this->tick == 0) {
auto v = g_group(this->target);
repeat (i, v->size)
entity_method(v->p[i], "enter");
VecEntityP_free(v);
} else {
with (e, g_new_entity("alarm", true)) {
e->tick = this->tick;
e->target = this->target;
}
}
}
|