parent
80585a5c86
commit
98b52965b8
@ -1,42 +1,55 @@
|
|||||||
# Diagramme de classes
|
# Diagramme de classes
|
||||||
|
|
||||||
title: Animal example
|
|
||||||
|
|
||||||
note for PlayerActif "Joueur en jeu"
|
|
||||||
note for PlayerStatic "Joueur dans les menus"
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
classDiagram
|
classDiagram
|
||||||
|
|
||||||
class User{
|
class MainActivity{
|
||||||
+String name
|
+onCreate()
|
||||||
+int NbEntiteTuee
|
+onPause()
|
||||||
|
+onResume()
|
||||||
|
+onDestroy()
|
||||||
|
+startGame()
|
||||||
|
+showGameOver()
|
||||||
|
+showInstruction()
|
||||||
}
|
}
|
||||||
|
|
||||||
class PlayerActif{
|
class Game{
|
||||||
+int currentLevel
|
+onTap()
|
||||||
+ChangeCurrentLevel(int)
|
+onShake()
|
||||||
+Play()
|
+start()
|
||||||
|
+stop()
|
||||||
|
+quit()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Marmotheque{
|
||||||
class PlayerStatic{
|
+generateMole()
|
||||||
+int score
|
|
||||||
+float percentToSuper
|
|
||||||
+HandleUseSuper()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
User <|-- PlayerActif
|
class Marmotte{
|
||||||
User <|-- PlayerStatic
|
-bool State
|
||||||
|
+takeHit()
|
||||||
|
+move()
|
||||||
|
+isDead()
|
||||||
|
}
|
||||||
|
|
||||||
class Level{
|
class Level{
|
||||||
+int number
|
+int number
|
||||||
+String sescription
|
+String description
|
||||||
+float time
|
+float time
|
||||||
+int nbTotEnemy
|
+int nbEnemyLeft
|
||||||
+int nbEnemyDown
|
+getMarmottes()
|
||||||
}
|
}
|
||||||
PlayerActif --> Level : currentLvl
|
|
||||||
|
class Player{
|
||||||
|
-String Name
|
||||||
|
-int score
|
||||||
|
}
|
||||||
|
|
||||||
|
Level -- Player
|
||||||
|
Marmotheque -- Marmotte
|
||||||
|
|
||||||
|
note for Marmotheque "Gestionnaire des marmottes (*utile si il s'agit d'une liste ?*)"
|
||||||
|
|
||||||
```
|
```
|
Loading…
Reference in new issue