2016-03-09 17:18:49 +00:00
|
|
|
\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}
|
2016-03-28 17:33:12 +00:00
|
|
|
\umlclass{Manager}{
|
|
|
|
window : fenêtre\\
|
2016-03-18 23:01:45 +00:00
|
|
|
clock : horloge\\
|
2016-03-28 17:33:12 +00:00
|
|
|
elapsed\_time : flottant\\
|
|
|
|
resource\_manager : \texttt{ResourceManager}\\
|
|
|
|
keys : \texttt{[booléen]}\\
|
|
|
|
view : \texttt{View}
|
2016-03-09 17:18:49 +00:00
|
|
|
}{
|
2016-03-18 23:01:45 +00:00
|
|
|
start() : vide\\
|
2016-03-28 17:33:12 +00:00
|
|
|
getWindow() : fenêtre\\
|
|
|
|
getElapsedTime() : flottant\\
|
|
|
|
getResourceManager() : \texttt{ResourceManager}\\
|
|
|
|
isKeyPressed(key : touche) : booléen
|
2016-03-09 17:18:49 +00:00
|
|
|
}
|
|
|
|
|
2016-03-28 17:33:12 +00:00
|
|
|
\umlabstract[x=-4,y=-4.5]{View}{}{
|
|
|
|
\umlvirt{frame(manager : \texttt{Manager}) : vide}
|
|
|
|
}
|
|
|
|
\umluniassoc{Manager}{View}
|
2016-03-09 17:18:49 +00:00
|
|
|
|
2016-03-28 17:33:12 +00:00
|
|
|
\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}{
|
2016-03-18 23:01:45 +00:00
|
|
|
acceleration : vecteur\\
|
2016-03-09 17:18:49 +00:00
|
|
|
velocity : vecteur\\
|
2016-03-18 23:01:45 +00:00
|
|
|
position : vecteur\\
|
|
|
|
mass : flottant\\
|
|
|
|
charge : flottant\\
|
|
|
|
restitution : flottant\\
|
2016-03-28 17:33:12 +00:00
|
|
|
static\_friction : flottant\\
|
|
|
|
dynamic\_friction : flottant\\
|
2016-03-18 23:01:45 +00:00
|
|
|
layer : entier
|
2016-03-09 17:18:49 +00:00
|
|
|
}{
|
2016-03-18 23:01:45 +00:00
|
|
|
\umlvirt{draw() : vide}\\
|
2016-03-28 17:33:12 +00:00
|
|
|
\umlvirt{getForces(manager : \texttt{Manager}, objects : \texttt{[Object]}) : vecteur}\\
|
|
|
|
\umlvirt{draw(manager : \texttt{Manager}) : vide}\\
|
2016-03-18 23:01:45 +00:00
|
|
|
\umlvirt{getAABB() : boîte}\\
|
2016-03-28 17:33:12 +00:00
|
|
|
\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\\
|
2016-03-09 17:18:49 +00:00
|
|
|
}
|
2016-03-28 17:33:12 +00:00
|
|
|
\umlunicompo{Game}{Object}
|
2016-03-09 17:18:49 +00:00
|
|
|
|
2016-03-28 17:33:12 +00:00
|
|
|
\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
|
2016-03-09 17:18:49 +00:00
|
|
|
}
|
2016-03-28 17:33:12 +00:00
|
|
|
\umlinherit{Object}{Player}
|
2016-03-09 17:18:49 +00:00
|
|
|
|
2016-03-28 17:33:12 +00:00
|
|
|
\umlclass[y=-22]{Block}{}{
|
|
|
|
draw(manager : \texttt{Manager}) : vide\\
|
|
|
|
getAABB() : boîte
|
2016-03-09 17:18:49 +00:00
|
|
|
}
|
|
|
|
\umlinherit{Object}{Block}
|
|
|
|
\end{tikzpicture}
|
|
|
|
\end{document}
|