89 lines
2.8 KiB
TeX
89 lines
2.8 KiB
TeX
\documentclass[tikz,border=30pt]{standalone}
|
|
|
|
\usepackage[utf8]{inputenc}
|
|
\usepackage[T1]{fontenc}
|
|
\usepackage{lmodern}
|
|
\usepackage{tikz}
|
|
\usepackage{tikz-uml}
|
|
\usepackage[french]{babel}
|
|
|
|
\begin{document}
|
|
\begin{tikzpicture}
|
|
\umlclass{Manager}{
|
|
window : fenêtre\\
|
|
clock : horloge\\
|
|
elapsed\_time : flottant\\
|
|
resource\_manager : \texttt{ResourceManager}\\
|
|
keys : \texttt{[booléen]}\\
|
|
view : \texttt{View}
|
|
}{
|
|
start() : vide\\
|
|
getWindow() : fenêtre\\
|
|
getElapsedTime() : flottant\\
|
|
getResourceManager() : \texttt{ResourceManager}\\
|
|
isKeyPressed(key : touche) : booléen
|
|
}
|
|
|
|
\umlabstract[x=-4,y=-4.5]{View}{}{
|
|
\umlvirt{frame(manager : \texttt{Manager}) : vide}
|
|
}
|
|
\umluniassoc{Manager}{View}
|
|
|
|
\umlclass[x=4,y=-4.5]{ResourceManager}{
|
|
textures : dictionnaire \texttt{string -> texture}
|
|
}{
|
|
getTexture(name : string) : texture
|
|
}
|
|
\umluniassoc{Manager}{ResourceManager}
|
|
|
|
\umlclass[x=-4,y=-8]{Game}{
|
|
accumulator : flottant\\
|
|
objects : \texttt{[Object]}
|
|
}{
|
|
frame(manager : \texttt{Manager}) : vide\\
|
|
update(manager : \texttt{Manager}) : vide\\
|
|
draw(manager : \texttt{Manager}) : vide
|
|
}
|
|
\umlinherit{View}{Game}
|
|
|
|
\umlabstract[x=-4,y=-15]{Object}{
|
|
acceleration : vecteur\\
|
|
velocity : vecteur\\
|
|
position : vecteur\\
|
|
mass : flottant\\
|
|
charge : flottant\\
|
|
restitution : flottant\\
|
|
static\_friction : flottant\\
|
|
dynamic\_friction : flottant\\
|
|
layer : entier
|
|
}{
|
|
\umlvirt{draw() : vide}\\
|
|
\umlvirt{getForces(manager : \texttt{Manager}, objects : \texttt{[Object]}) : vecteur}\\
|
|
\umlvirt{draw(manager : \texttt{Manager}) : vide}\\
|
|
\umlvirt{getAABB() : boîte}\\
|
|
\hfill\\
|
|
updateVelocity(manager : \texttt{Manager}, objects : \texttt{[Object]}, delta : flottant) : vide\\
|
|
updatePosition(manager : \texttt{Manager}, objects : \texttt{[Object]}, delta : flottant) : vide\\
|
|
detectCollision(object : \texttt{Object}) : \texttt{CollisionData}\\
|
|
solveCollision(object : \texttt{Object}, normal : vecteur) : vide\\
|
|
positionalCorrection(object : \texttt{Object}, normal : vecteur, depth : flottant) : vide\\
|
|
}
|
|
\umlunicompo{Game}{Object}
|
|
|
|
\umlclass[x=-8,y=-22]{Player}{
|
|
player\_number : entier non-signé
|
|
}{
|
|
getForces(manager : \texttt{Manager}, objects : \texttt{[Object]}) : vecteur\\
|
|
draw(manager : \texttt{Manager}) : vide\\
|
|
getAABB() : boîte
|
|
}
|
|
\umlinherit{Object}{Player}
|
|
|
|
\umlclass[y=-22]{Block}{}{
|
|
draw(manager : \texttt{Manager}) : vide\\
|
|
getAABB() : boîte
|
|
}
|
|
\umlinherit{Object}{Block}
|
|
\end{tikzpicture}
|
|
\end{document}
|