skizzle/docs/diagrammes/classes/classes.tex

106 lines
3.1 KiB
TeX
Raw Normal View History

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-04-03 19:59:47 +00:00
\umlabstract[x=-4,y=-4.5]{View}{
manager : \texttt{Manager}
}{
\umlvirt{frame() : vide}
2016-03-28 17:33:12 +00:00
}
\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}
2016-04-03 19:59:47 +00:00
\umlabstract[x=-4,y=-8.5]{Level}{
name : chaîne de caractères\\
background : sprite\\
objects : \texttt{[Object]}\\
zone : \texttt{[[flottant, flottant]]}
2016-03-28 17:33:12 +00:00
}{
2016-04-03 19:59:47 +00:00
\umlvirt{frame() : vide}\\
draw() : vide\\
load(file : fichier en lecture) : vide\\
save(file : fichier en écriture) : vide
}
\umlinherit{View}{Level}
\umlclass[x=-7,y=-12.5]{Editor}{}{
frame() : vide
}
\umlinherit{Level}{Editor}
\umlclass[x=-1,y=-12.5]{Game}{}{
frame() : vide\\
update() : vide
2016-03-28 17:33:12 +00:00
}
2016-04-03 19:59:47 +00:00
\umlinherit{Level}{Game}
2016-03-28 17:33:12 +00:00
2016-04-03 19:59:47 +00:00
\umlabstract[x=-4,y=-19]{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-04-03 19:59:47 +00:00
\umlunicompo{Editor}{Object}
2016-03-09 17:18:49 +00:00
2016-04-03 19:59:47 +00:00
\umlclass[x=-8,y=-26]{Player}{
2016-03-28 17:33:12 +00:00
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-04-03 19:59:47 +00:00
\umlclass[y=-26]{Block}{}{
2016-03-28 17:33:12 +00:00
draw(manager : \texttt{Manager}) : vide\\
getAABB() : boîte
2016-03-09 17:18:49 +00:00
}
\umlinherit{Object}{Block}
\end{tikzpicture}
\end{document}