Glossary script

livingobject.js

Living objects like character, light & heavy weapon are derived from a template class livingobject.

Each livingobject in a scene is self- managed: he is responsible for managing his own position and states; and only he can change his states.

This will create hassles in programming, such that even a character is being held and is conceptually passive, still, his states can only be managed by the catcher via inter- process protocal.

However, this architecture ensures that the livingobject- derived class is atomic, that it can possibly be integrated into other engine implementations. Conversely, it is easy to implement custom character classes with different behaviours then integrate it back into LF engine.

所有活的東西, 包括人物, 輕重武器 都是衍生自 模板類別livingobject.

場景中的每個人及物都是自治的, 他(及只有他)能改變自己的位置及狀態.

有時候, 這會造成編程上的困難. 因為, 即使一個人物進入了被動狀態, 例如被捉, 他的狀態仍然是由他自己控制的, 捉住他的人只能透過 協定 間接操控.

但是, 這個設計在 軟件架構上是優秀的, 因為這逼使livingobject衍生的類別自適應, 令他可以被整合到其他引擎之中. 反過來, 人們可以建設新的人物類別, 整合到LF引擎之中.

0 comments:

Post a Comment