diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-10-23 21:17:37 +0200 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-10-23 21:17:37 +0200 |
commit | b935677c8bd2bbda35c08b50caabb952f79e8e0b (patch) | |
tree | 8c27888020b2fdc4c950b82cd01661d90fdcc99b /img/class-scripts.puml | |
parent | da846dea2906ae2395ebc6351cae1ca8f8d3313b (diff) | |
parent | fe0ad1db3a166da0ff706c33cbcd4d8a52514f29 (diff) |
Merge branch 'master' of https://github.com/lonkaars/crepe-docs into wouter/gameloop-design
merge
Diffstat (limited to 'img/class-scripts.puml')
-rw-r--r-- | img/class-scripts.puml | 48 |
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 |