aboutsummaryrefslogtreecommitdiff
path: root/img
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-18 14:37:21 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-18 14:37:21 +0200
commit69f8fcfb593641174b3a83049ad4acc1abf1a102 (patch)
tree270d22cded77e3a1e5773626c891e327219c833f /img
parent4a40378f58160212c0c1c42552a1301e3a498037 (diff)
add scripting design documentation
Diffstat (limited to 'img')
-rw-r--r--img/class-scripts.puml48
1 files changed, 48 insertions, 0 deletions
diff --git a/img/class-scripts.puml b/img/class-scripts.puml
new file mode 100644
index 0000000..8fc36c9
--- /dev/null
+++ b/img/class-scripts.puml
@@ -0,0 +1,48 @@
+@startuml
+!include theme.ipuml
+skinparam Linetype ortho
+skinparam Nodesep 75
+skinparam Ranksep 30
+
+class ComponentManager <<irrelevant>>
+
+package api {
+ class Component <<irrelevant>>
+
+ class Script {
+ # init() <<virtual>>
+ # update() <<virtual>>
+ --
+ - Script()
+ }
+
+ class BehaviorScript {
+ # BehaviorScript()
+ + ~BehaviorScript()
+ --
+ + set_script<T>() : this &
+ --
+ # script : Script *
+ }
+
+ BehaviorScript -u-|> Component
+ Script .u.> BehaviorScript
+}
+
+class System <<irrelevant>>
+class ScriptSystem <<Singleton>> {
+ + get_instance() : ScriptSystem & <<static>>
+ + update()
+ --
+ - ScriptSystem()
+ - ~ScriptSystem()
+}
+
+System <|-- ScriptSystem
+ScriptSystem .[norank]> ComponentManager
+
+ScriptSystem .[norank]> api.Script : < friend
+ScriptSystem .[norank]> api.BehaviorScript : < friend
+ComponentManager .[norank]> api.BehaviorScript : < friend
+
+@enduml