18 lines
315 B
ActionScript
18 lines
315 B
ActionScript
class ActiveEntity : ServiceScript {
|
|
Entity entity;
|
|
|
|
void onInit() {
|
|
entity = Engine::getMainEnvironment().getRootEntity();
|
|
}
|
|
|
|
[ServiceAPI]
|
|
Entity getActiveEntity() {
|
|
return entity;
|
|
}
|
|
|
|
[ServiceAPI]
|
|
void setActiveEntity(Entity ent) {
|
|
entity = ent;
|
|
}
|
|
}
|