351 |
set_orientation(dir); |
set_orientation(dir); |
352 |
} |
} |
353 |
|
|
354 |
Direction get_orientation() const { |
Direction get_orientation() const { |
355 |
return Direction(int_attrib("orientation")); |
return Direction(int_attrib("orientation")); |
356 |
} |
} |
357 |
void set_orientation(Direction dir) { |
void set_orientation(Direction dir) { |
358 |
set_attrib("orientation", Value(dir)); |
set_attrib("orientation", Value(dir)); |
359 |
} |
} |
365 |
string mname = get_kind(); |
string mname = get_kind(); |
366 |
mname += to_suffix(get_orientation()); |
mname += to_suffix(get_orientation()); |
367 |
set_model (mname); |
set_model (mname); |
368 |
} |
} |
369 |
|
|
370 |
virtual bool actor_may_pass (Actor *a) = 0; |
virtual bool actor_may_pass (Actor *a) = 0; |
371 |
|
|
372 |
|
void message(const string& msg, const Value &val) { |
373 |
|
if (msg == "direction" && val.get_type() == Value::DOUBLE) { |
374 |
|
Direction dir = static_cast<Direction>((int)val.get_double()); |
375 |
|
set_orientation(dir); |
376 |
|
init_model(); |
377 |
|
} |
378 |
|
} |
379 |
}; |
}; |
380 |
} |
} |
381 |
|
|
553 |
ACTIVE, // may send trigger into direction |
ACTIVE, // may send trigger into direction |
554 |
IDLE, // already sent trigger w/o success |
IDLE, // already sent trigger w/o success |
555 |
MOVING, // inside move |
MOVING, // inside move |
556 |
FALLING // falling into abyss/water |
FALLING // falling into abyss |
557 |
} state; |
} state; |
558 |
|
|
559 |
void set_alarm() { |
void set_alarm() { |