@startuml !include theme.ipuml skinparam Linetype ortho skinparam Nodesep 75 skinparam Ranksep 30 class ComponentManager <> package api { class Component <> class Script { # init() <> # update() <> -- - Script() } class BehaviorScript { # BehaviorScript() + ~BehaviorScript() -- + set_script() : this & -- # script : Script * } BehaviorScript -u-|> Component Script .u.> BehaviorScript } class System <> class ScriptSystem <> { + get_instance() : ScriptSystem & <> + update() -- - ScriptSystem() - ~ScriptSystem() } System <|-- ScriptSystem ScriptSystem .[norank]> ComponentManager ScriptSystem .[norank]> api.Script : < friend ScriptSystem .[norank]> api.BehaviorScript : < friend ComponentManager .[norank]> api.BehaviorScript : < friend @enduml