mirror of
https://github.com/boudji-ludwig-pett/cnam-geometry-dash.git
synced 2025-05-08 17:54:12 +02:00
docs: UML updates (#58)
This commit is contained in:
parent
8fe04b974a
commit
97b473cb01
Binary file not shown.
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.5 MiB |
@ -147,7 +147,8 @@ TextureImporter:
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
nameFileIdTable:
|
||||
Logo_0: 1404028623067837608
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
|
@ -155,7 +155,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: -110}
|
||||
m_AnchoredPosition: {x: 8.3, y: -154.1}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &39408930
|
||||
@ -562,6 +562,7 @@ RectTransform:
|
||||
- {fileID: 666344588}
|
||||
- {fileID: 39408929}
|
||||
- {fileID: 1809963736}
|
||||
- {fileID: 780585405}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
@ -605,7 +606,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: -45}
|
||||
m_AnchoredPosition: {x: 8.3, y: -95.7}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &666344589
|
||||
@ -702,6 +703,81 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 666344587}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &780585404
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 780585405}
|
||||
- component: {fileID: 780585407}
|
||||
- component: {fileID: 780585406}
|
||||
m_Layer: 5
|
||||
m_Name: GameObject
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &780585405
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 780585404}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 481473977}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 8.3, y: 82.4}
|
||||
m_SizeDelta: {x: 206.4181, y: 202.9899}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &780585406
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 780585404}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 1404028623067837608, guid: 7941bec4ab82ba5f8a978cf1b4d91010, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &780585407
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 780585404}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &948896765
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -953,7 +1029,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 15.000004}
|
||||
m_AnchoredPosition: {x: 8.3, y: -40.7}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1587889809
|
||||
|
BIN
Documentation/Screenshots/gameplay.png
Normal file
BIN
Documentation/Screenshots/gameplay.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 387 KiB |
BIN
Documentation/Screenshots/home-page.png
Normal file
BIN
Documentation/Screenshots/home-page.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 619 KiB |
BIN
Documentation/Screenshots/levels-selection.png
Normal file
BIN
Documentation/Screenshots/levels-selection.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 589 KiB |
@ -8,11 +8,11 @@ repeat
|
||||
if (Le joueur percute un obstacle ?) then (Oui)
|
||||
:Le joueur meurt;
|
||||
:Augmenter le nombre d'essais de 1;
|
||||
:Perdre toutes les pièces et bonus;
|
||||
:Perdre toutes les bonus;
|
||||
else (Non)
|
||||
partition "Actions du joueur" {
|
||||
group Saut
|
||||
if (L'utilisateur clique sur l'écran ?) then (Oui)
|
||||
if (L'utilisateur appuie sur espace ?) then (Oui)
|
||||
:Le joueur effectue un saut;
|
||||
endif
|
||||
end group
|
||||
@ -27,15 +27,15 @@ repeat
|
||||
end group
|
||||
endif
|
||||
|
||||
if (Le joueur clique sur un bonus dans son inventaire ?) then (Oui)
|
||||
if (Le joueur percute un bonus ?) then (Oui)
|
||||
group Activation de Bonus
|
||||
:Le joueur clique sur un bonus dans l'inventaire;
|
||||
switch (Type de bonus)
|
||||
case (Temps ralenti)
|
||||
:Activer ralentissement du temps;
|
||||
:Temps ralenti : 3 secondes;
|
||||
case (Annulation d'obstacle)
|
||||
:Supprimer tous les obstacles;
|
||||
:Durée : 3 secondes;
|
||||
case (Temps accéléré)
|
||||
:Activer accélération du temps;
|
||||
:Durée : 3 secondes;
|
||||
endswitch
|
||||
end group
|
||||
@ -54,9 +54,6 @@ repeat
|
||||
:Quitter le niveau;
|
||||
:Retour au menu principal;
|
||||
stop
|
||||
case (Mode Checkpoint)
|
||||
:Activer/Désactiver le mode Checkpoint;
|
||||
:Reprendre la partie;
|
||||
case (Volume)
|
||||
:Modifier le volume sonore;
|
||||
:Revenir au menu de pause;
|
||||
@ -72,7 +69,6 @@ repeat
|
||||
if (Le joueur touche la zone de fin ?) then (Oui)
|
||||
:Terminer le niveau;
|
||||
:Animation de fin de niveau;
|
||||
:Conserver les pièces obtenues;
|
||||
break
|
||||
endif
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ repeat
|
||||
:Perdre toutes les pièces et bonus;
|
||||
else (Non)
|
||||
partition "Actions du joueur" {
|
||||
if (L'utilisateur clique sur l'écran ?) then (Oui)
|
||||
if (L'utilisateur appuie sur espace ?) then (Oui)
|
||||
:Le joueur effectue un saut;
|
||||
note right
|
||||
**Saut**
|
||||
@ -29,12 +29,12 @@ repeat
|
||||
end note
|
||||
endif
|
||||
|
||||
if (Le joueur clique sur un bonus dans son inventaire ?) then (Oui)
|
||||
if (Le joueur percute un bonus ?) then (Oui)
|
||||
:Activer un bonus;
|
||||
note right
|
||||
**Activation de Bonus**
|
||||
- Déclenche l'effet du bonus sélectionné.
|
||||
- Exemple : Invincibilité, Double saut.
|
||||
- Exemple : Ralentissement du temps.
|
||||
end note
|
||||
endif
|
||||
}
|
||||
@ -44,7 +44,7 @@ repeat
|
||||
:Arriver sur le menu de pause;
|
||||
note right
|
||||
**Menu de pause**
|
||||
- Affiche les options : Reprendre, Quitter, Mode Checkpoint, Volume.
|
||||
- Affiche les options : Reprendre, Quitter, Volume.
|
||||
end note
|
||||
endif
|
||||
}
|
||||
@ -53,12 +53,6 @@ repeat
|
||||
if (Le joueur touche la zone de fin ?) then (Oui)
|
||||
:Terminer le niveau;
|
||||
:Afficher une animation de fin de niveau;
|
||||
:Conserver les pièces obtenues;
|
||||
note right
|
||||
**Fin du Niveau**
|
||||
- Succès enregistré.
|
||||
- Les pièces collectées sont sauvegardées.
|
||||
end note
|
||||
endif
|
||||
}
|
||||
endif
|
||||
|
@ -5,9 +5,9 @@ start
|
||||
switch (Type de bonus)
|
||||
case (Temps ralenti)
|
||||
:Activer ralentissement du temps;
|
||||
:Temps ralenti : 3 secondes;
|
||||
case (Annulation d'obstacle)
|
||||
:Supprimer tous les obstacles;
|
||||
:Durée : 3 secondes;
|
||||
case (Temps accéléré)
|
||||
:Activer accélération du temps;
|
||||
:Durée : 3 secondes;
|
||||
endswitch
|
||||
stop
|
||||
|
@ -1,7 +1,7 @@
|
||||
@startuml sub-bonus
|
||||
|
||||
start
|
||||
if (Le joueur touche un bonus ?) then (Oui)
|
||||
if (Le joueur percute un bonus ?) then (Oui)
|
||||
:Ajouter le bonus à l'inventaire;
|
||||
else (Non)
|
||||
endif
|
||||
|
@ -1,10 +0,0 @@
|
||||
@startuml sub-bumper
|
||||
|
||||
start
|
||||
if (Le joueur touche un bumper ?) then (Oui)
|
||||
:Effectuer un grand saut;
|
||||
else (Non)
|
||||
endif
|
||||
stop
|
||||
|
||||
@enduml
|
@ -7,10 +7,6 @@ switch (Forme)
|
||||
:Mode fusée;
|
||||
case (Forme roue)
|
||||
:Mode roue;
|
||||
case (Forme sens inversé)
|
||||
:Mode sens inversé;
|
||||
case (Forme gravité inversée)
|
||||
:Mode gravité inversée;
|
||||
endswitch
|
||||
stop
|
||||
|
||||
|
@ -11,13 +11,10 @@ else (Quitter)
|
||||
:Quitter le niveau;
|
||||
:Retour au menu principal;
|
||||
stop
|
||||
else (Mode Checkpoint)
|
||||
:Activer/Désactiver le mode Checkpoint;
|
||||
:Revenir au menu de pause;
|
||||
else (Volume)
|
||||
:Modifier le volume sonore;
|
||||
:Revenir au menu de pause;
|
||||
else (Menu de sleection de niveau)
|
||||
else (Menu de sélection de niveau)
|
||||
:Revenir au menu de selection de niveau;
|
||||
endif
|
||||
|
||||
|
@ -1,10 +0,0 @@
|
||||
@startuml sub-pieces
|
||||
|
||||
start
|
||||
if (Le joueur touche une pièce ?) then (Oui)
|
||||
:Ajouter la pièce au niveau;
|
||||
else (Non)
|
||||
endif
|
||||
stop
|
||||
|
||||
@enduml
|
303
Documentation/UML/class-diagram-light.puml
Normal file
303
Documentation/UML/class-diagram-light.puml
Normal file
@ -0,0 +1,303 @@
|
||||
@startuml Geometry Dash - Diagramme de classe léger
|
||||
|
||||
skinparam style strictuml
|
||||
skinparam classAttributeIconSize 0
|
||||
skinparam classFontStyle Bold
|
||||
hide enum methods
|
||||
|
||||
class PlayerCamera {
|
||||
{field} + playerObject: GameObject
|
||||
{field} + normalMinYFollow: float
|
||||
{field} + shipMinYFollow: float
|
||||
{field} + smoothSpeed: float
|
||||
{field} - initialY: float
|
||||
{field} + isPlaying: bool
|
||||
|
||||
{method} - Start()
|
||||
{method} - Update()
|
||||
}
|
||||
|
||||
class Player {
|
||||
{field} + RigidBody: Rigidbody2D {get} {private set}
|
||||
{field} + Transform: Transform {get} {private set}
|
||||
{field} + Particle: ParticleSystem {get} {private set}
|
||||
{field} + LevelsLoader: LevelsLoader {get} {set}
|
||||
{field} + SpriteRenderer: SpriteRenderer {get} {private set}
|
||||
{field} + IsColliding: bool {get} {set}
|
||||
{field} + HasStarted: bool {get} {set}
|
||||
{field} + CanJump: bool {get} {set}
|
||||
{field} + CurrentGameMode: IGameMode {get} {set}
|
||||
{field} + SpeedMultiplier: float
|
||||
|
||||
{method} + Awake()
|
||||
{method} + Start()
|
||||
{method} + Update()
|
||||
{method} + OnCollisionEnter2D(collision: Collision2D)
|
||||
{method} + OnCollisionExit2D(collision: Collision2D)
|
||||
{method} + OnTriggerEnter2D(collision: Collider2D)
|
||||
{method} + ChangeGameMode(newMode: IGameMode)
|
||||
}
|
||||
Player o--> LevelsLoader : <<References>>
|
||||
Player o--> IGameMode : <<Has>>
|
||||
|
||||
class PauseMenu {
|
||||
{field} + pauseMenu: GameObject
|
||||
{field} + pauseButton: GameObject
|
||||
{field} + levelLoader: LevelLoader
|
||||
{field} + volumeSlider: Slider
|
||||
|
||||
{method} + Start()
|
||||
{method} + ChangeVolume()
|
||||
{method} + Pause()
|
||||
{method} + Home()
|
||||
{method} + Resume()
|
||||
}
|
||||
PauseMenu --> LevelLoader : <<References>>
|
||||
PauseMenu --> GameObject : <<References>>
|
||||
PauseMenu --> Slider : <<References>>
|
||||
|
||||
class MainMenu {
|
||||
{method} + LaunchGame()
|
||||
{method} + OpenImport()
|
||||
{method} + QuitGame()
|
||||
{method} + LevelEditor()
|
||||
{method} + EditorChoice()
|
||||
{method} + CreateLevel()
|
||||
}
|
||||
|
||||
class LevelStat {
|
||||
{field} + JsonName: string {get} {set}
|
||||
{field} + totalJumps: Integer
|
||||
{field} + totalAttempts: Integer
|
||||
{field} + progressionPercent: Integer
|
||||
|
||||
{method} + {static} CreateFromJSON(jsonString: string): LevelStat
|
||||
}
|
||||
|
||||
class LevelsLoader {
|
||||
{field} + levels: List<Level>
|
||||
{field} + levelCurrent: Level
|
||||
|
||||
{method} - Start()
|
||||
{method} - LoadAllLevels()
|
||||
{method} - SaveLevelCurrent()
|
||||
{method} + NextLevel()
|
||||
{method} + PreviousLevel()
|
||||
{method} + IncreaseTotalJumps()
|
||||
{method} + IncreaseTotalAttempts()
|
||||
{method} + CalculateCurrentProgressionPercent(playerPosition: Vector3): Integer
|
||||
{method} + RefreshLevels()
|
||||
}
|
||||
LevelsLoader *--> Level : <<Owns>>
|
||||
|
||||
class LevelLoader {
|
||||
{field} + levelsLoader: LevelsLoader
|
||||
{field} + audioSource: AudioSource
|
||||
{field} + progressionText: Text
|
||||
{field} - groundY: float
|
||||
|
||||
{method} - GetPrefab(type: string): GameObject
|
||||
{method} - LoadAudio()
|
||||
{method} - LoadElements()
|
||||
{method} + Start()
|
||||
{method} + Update()
|
||||
}
|
||||
LevelLoader o--> LevelsLoader : <<References>>
|
||||
LevelLoader *--> AudioSource : <<Owns>>
|
||||
LevelLoader --> Text : <<References>>
|
||||
|
||||
|
||||
class LevelEditor {
|
||||
{field} - currentBlock: GameObject
|
||||
{field} - isPlacingBlock: bool
|
||||
{field} - currentScale: Vector3
|
||||
{field} - scaleStep: float
|
||||
{field} + blockGroupContainer: Transform
|
||||
{field} + buttonPrefabTemplate: GameObject
|
||||
{field} - currentPage: Integer
|
||||
{field} - buttonsPerPage: Integer {constant}
|
||||
{field} - blockPrefabs: List<GameObject>
|
||||
{field} - currentButtons: List<GameObject>
|
||||
{field} - resizingTarget: GameObject
|
||||
{field} - isResizing: bool
|
||||
{field} - originalMousePos: Vector3
|
||||
{field} - originalScale: Vector3
|
||||
{field} - currentResizeAxis: ResizeAxis
|
||||
|
||||
{method} - Start()
|
||||
{method} - LoadPrefabs()
|
||||
{method} - GenerateButtons()
|
||||
{method} - ClearCurrentButtons()
|
||||
{method} + NextPage()
|
||||
{method} + PreviousPage()
|
||||
{method} - SelectPrefab(prefab: GameObject)
|
||||
{method} - Update()
|
||||
{method} - PlaceBlock()
|
||||
{method} - TrySnapToNearbyBlock()
|
||||
{method} - InstantiateAndPrepare(prefab: GameObject, scaleOverride: Vector3?)
|
||||
{method} - HandleBlockRotation()
|
||||
}
|
||||
LevelEditor o--> blockGroupContainer : <<References>>
|
||||
LevelEditor --> buttonPrefabTemplate : <<References>>
|
||||
LevelEditor *--> blockPrefabs : <<Owns>>
|
||||
LevelEditor *--> currentButtons : <<Owns>>
|
||||
LevelEditor o--> currentBlock : <<References>>
|
||||
LevelEditor o--> resizingTarget : <<References>>
|
||||
LevelEditor *--> ResizeAxis : <<Has>>
|
||||
|
||||
enum ResizeAxis <<enumeration>> {
|
||||
None
|
||||
Horizontal
|
||||
Vertical
|
||||
}
|
||||
|
||||
|
||||
class LevelElement {
|
||||
{field} + type: string
|
||||
{field} + x: float
|
||||
{field} + y: float
|
||||
{field} + scaleX: float
|
||||
{field} + scaleY: float
|
||||
}
|
||||
|
||||
class Level {
|
||||
{field} + {static} {readOnly} LAST_X: Integer = 15
|
||||
{field} + JsonName: string {get} {set}
|
||||
{field} + TotalJumps: Integer {get} {set}
|
||||
{field} + TotalAttempts: Integer {get} {set}
|
||||
{field} + ProgressionPercent: Integer {get} {set}
|
||||
{field} + ProgressionPercentMax: Integer {get} {set}
|
||||
{field} + name: string
|
||||
{field} + musicName: string
|
||||
{field} + order: Integer
|
||||
{field} + elements: List<LevelElement>
|
||||
{field} + LastX: float {get}
|
||||
|
||||
{method} + {static} CreateFromJSON(jsonString: string): Level
|
||||
}
|
||||
Level *--> LevelElement : <<Composed of>>
|
||||
|
||||
class JSONImporter {
|
||||
{field} + statusText: TMP_Text
|
||||
|
||||
{method} - Awake()
|
||||
{method} - Start()
|
||||
{method} + ImportJSON()
|
||||
{method} - ShowFileBrowser(): IEnumerator
|
||||
{method} - UpdateStatus(message: string, color: Color)
|
||||
}
|
||||
JSONImporter --> TMP_Text : <<References>>
|
||||
|
||||
class JSONExporter {
|
||||
{field} + statusText: TMP_Text
|
||||
{field} - editor: LevelEditor
|
||||
{field} - levelsFolder: string
|
||||
|
||||
{method} - Awake()
|
||||
{method} - Start()
|
||||
{method} + ExportJSON()
|
||||
{method} - ShowSaveDialog(): IEnumerator
|
||||
{method} - SetStatus(message: string, color: Color)
|
||||
}
|
||||
JSONExporter o--> LevelEditor : <<References>>
|
||||
JSONExporter --> TMP_Text : <<References>>
|
||||
|
||||
class SerializableElement <<private>> {
|
||||
{field} + type: string
|
||||
{field} + x: float
|
||||
{field} + y: float
|
||||
{field} + scaleX: float
|
||||
{field} + scaleY: float
|
||||
}
|
||||
JSONExporter ..> SerializableElement : <<Uses>>
|
||||
|
||||
class LevelData <<private>> {
|
||||
{field} + name: string
|
||||
{field} + musicName: string
|
||||
{field} + order: Integer
|
||||
{field} + elements: SerializableElement[*]
|
||||
}
|
||||
LevelData *--> SerializableElement : <<Composed of>>
|
||||
JSONExporter ..> LevelData : <<Uses>>
|
||||
|
||||
|
||||
interface IGameMode <<interface>> {
|
||||
{method} + Update(player: Player) {abstract}
|
||||
{method} + OnCollisionEnter(player: Player, collision: Collision2D) {abstract}
|
||||
{method} + OnCollisionExit(player: Player, collision: Collision2D) {abstract}
|
||||
}
|
||||
|
||||
class ShipGameMode implements IGameMode {
|
||||
{field} - HorizontalSpeed: float {constant}
|
||||
{field} - JumpForce: float {constant}
|
||||
{field} - JumpKey: KeyCode {constant}
|
||||
{field} - UpperAngle: float {constant}
|
||||
{field} - LowerAngle: float {constant}
|
||||
{field} - RotationTransitionDuration: float {constant}
|
||||
|
||||
{method} + Update(player: Player)
|
||||
{method} - GetCurrentZAngle(player: Player): float
|
||||
{method} - Jump(player: Player)
|
||||
{method} + OnCollisionEnter(player: Player, collision: Collision2D)
|
||||
{method} + OnCollisionExit(player: Player, collision: Collision2D)
|
||||
}
|
||||
ShipGameMode ..|> IGameMode
|
||||
ShipGameMode ..> Player : <<Uses>>
|
||||
|
||||
|
||||
class NormalGameMode implements IGameMode {
|
||||
{field} - HorizontalSpeed: float {constant}
|
||||
{field} - JumpForce: float {constant}
|
||||
{field} - JumpKey: KeyCode {constant}
|
||||
{field} - isRotating: bool
|
||||
{field} - targetRotationAngle: float
|
||||
{field} - rotationSpeed: float {readOnly}
|
||||
|
||||
{method} + Update(player: Player)
|
||||
{method} - Jump(player: Player)
|
||||
{method} - PerformRotation(player: Player)
|
||||
{method} - IsJumping(player: Player): bool
|
||||
{method} - AlignRotation(player: Player)
|
||||
{method} - UpdateParticlePositionAndRotation(player: Player)
|
||||
{method} + OnCollisionEnter(player: Player, collision: Collision2D)
|
||||
{method} + OnCollisionExit(player: Player, collision: Collision2D)
|
||||
}
|
||||
NormalGameMode ..|> IGameMode
|
||||
NormalGameMode ..> Player : <<Uses>>
|
||||
|
||||
|
||||
' Tags
|
||||
class ShipPortal { }
|
||||
class CubePortal { }
|
||||
class BonusBoostSpeed { }
|
||||
class BonusSlowSpeed { }
|
||||
class Kill { }
|
||||
class Win { }
|
||||
class Ground { }
|
||||
class WinnerWall { }
|
||||
class Block { }
|
||||
class SmallObstacle { }
|
||||
class Spike { }
|
||||
class Portal { }
|
||||
class Bonus { }
|
||||
|
||||
Player ..> ShipPortal : <<Uses Tag>>
|
||||
Player ..> CubePortal : <<Uses Tag>>
|
||||
Player ..> BonusBoostSpeed : <<Uses Tag>>
|
||||
Player ..> BonusSlowSpeed : <<Uses Tag>>
|
||||
ShipGameMode ..> Kill : <<Uses Tag>>
|
||||
ShipGameMode ..> Win : <<Uses Tag>>
|
||||
ShipGameMode ..> Ground : <<Uses Tag>>
|
||||
NormalGameMode ..> Kill : <<Uses Tag>>
|
||||
NormalGameMode ..> Win : <<Uses Tag>>
|
||||
LevelLoader ..> WinnerWall : <<Uses Prefab>>
|
||||
LevelLoader ..> Ground : <<Uses Prefab>>
|
||||
LevelEditor ..> Ground : <<Uses Tag>>
|
||||
LevelEditor ..> Block : <<Uses Tag>>
|
||||
LevelEditor ..> SmallObstacle : <<Uses Tag>>
|
||||
LevelEditor ..> Spike : <<Uses Tag>>
|
||||
LevelEditor ..> Portal : <<Uses Tag>>
|
||||
LevelEditor ..> Bonus : <<Uses Tag>>
|
||||
LevelsLoader ..> WinnerWall : <<Uses Prefab>>
|
||||
|
||||
@enduml
|
@ -5,107 +5,581 @@ skinparam classAttributeIconSize 0
|
||||
skinparam classFontStyle Bold
|
||||
hide enum methods
|
||||
|
||||
class GameManager {
|
||||
- score: int
|
||||
- isPaused: Boolean
|
||||
+ StartGame()
|
||||
+ RestartLevel()
|
||||
+ PauseGame()
|
||||
+ ResumeGame()
|
||||
+ UpdateScore(points: int)
|
||||
package UnityEngine {
|
||||
class GameObject {
|
||||
}
|
||||
class MonoBehaviour {
|
||||
}
|
||||
class Rigidbody2D {
|
||||
}
|
||||
class Transform {
|
||||
}
|
||||
class ParticleSystem {
|
||||
}
|
||||
class SpriteRenderer {
|
||||
}
|
||||
class Collider2D {
|
||||
}
|
||||
class Collision2D {
|
||||
}
|
||||
class Vector3 {
|
||||
}
|
||||
class Vector2 {
|
||||
}
|
||||
class Quaternion {
|
||||
}
|
||||
class Mathf {
|
||||
{method} + Lerp(...) {static}
|
||||
{method} + Round(...) {static}
|
||||
{method} + Clamp(...) {static}
|
||||
{method} + Sin(...) {static}
|
||||
{method} + Abs(...) {static}
|
||||
{method} + DeltaAngle(...) {static}
|
||||
{method} + MoveTowardsAngle(...) {static}
|
||||
{method} + RoundToInt(...) {static}
|
||||
}
|
||||
class Time {
|
||||
{method} + deltaTime: float {static} {readOnly}
|
||||
{method} + timeScale: float {static}
|
||||
}
|
||||
class Input {
|
||||
{method} + GetKey(...) {static}
|
||||
{method} + GetKeyDown(...) {static}
|
||||
{method} + GetMouseButtonDown(...) {static}
|
||||
{method} + GetMouseButtonUp(...) {static}
|
||||
{method} + GetAxis(...) {static}
|
||||
}
|
||||
class Camera {
|
||||
{method} + main: Camera {static} {readOnly}
|
||||
{method} + ScreenToWorldPoint(...)
|
||||
}
|
||||
class Physics2D {
|
||||
{method} + OverlapBoxAll(...) {static}
|
||||
{method} + RaycastAll(...) {static}
|
||||
{method} + OverlapPoint(...) {static}
|
||||
{method} + OverlapAreaAll(...) {static}
|
||||
}
|
||||
class Resources {
|
||||
{method} + Load<T>(...) {static}
|
||||
{method} + LoadAll<T>(...) {static}
|
||||
}
|
||||
class PlayerPrefs {
|
||||
{method} + GetFloat(...) {static}
|
||||
{method} + SetFloat(...) {static}
|
||||
{method} + HasKey(...) {static}
|
||||
}
|
||||
class AudioSource {
|
||||
{method} + volume: float
|
||||
{method} + clip: AudioClip
|
||||
{method} + Play()
|
||||
{method} + Pause()
|
||||
}
|
||||
class AudioClip {
|
||||
}
|
||||
class Slider {
|
||||
}
|
||||
class Button {
|
||||
}
|
||||
class Image {
|
||||
}
|
||||
class RectTransform {
|
||||
}
|
||||
class Bounds {
|
||||
}
|
||||
class Debug {
|
||||
{method} + Log(...) {static}
|
||||
{method} + LogWarning(...) {static}
|
||||
{method} + LogError(...) {static}
|
||||
}
|
||||
class Application {
|
||||
{method} + persistentDataPath: string {static} {readOnly}
|
||||
{method} + dataPath: string {static} {readOnly}
|
||||
{method} + Quit() {static}
|
||||
}
|
||||
class Canvas {
|
||||
{method} + ForceUpdateCanvases() {static}
|
||||
}
|
||||
class UnityEngine.Object {
|
||||
{method} + FindAnyObjectByType<T>(...) {static}
|
||||
}
|
||||
class Renderer {
|
||||
}
|
||||
}
|
||||
|
||||
package UnityEngine.SceneManagement {
|
||||
class SceneManager {
|
||||
{method} + LoadScene(...) {static}
|
||||
{method} + LoadSceneAsync(...) {static}
|
||||
{method} + GetActiveScene(...) {static}
|
||||
}
|
||||
}
|
||||
|
||||
package UnityEngine.UI {
|
||||
class Text {
|
||||
}
|
||||
}
|
||||
|
||||
package TMPro {
|
||||
class TMP_Text {
|
||||
}
|
||||
}
|
||||
|
||||
package System {
|
||||
package IO {
|
||||
class Path {
|
||||
{method} + Combine(...) {static}
|
||||
{method} + GetFileNameWithoutExtension(...) {static}
|
||||
}
|
||||
class File {
|
||||
{method} + Exists(...) {static}
|
||||
{method} + ReadAllText(...) {static}
|
||||
{method} + WriteAllText(...) {static}
|
||||
{method} + Copy(...) {static}
|
||||
{method} + GetExtension(...) {static}
|
||||
{method} + GetFileName(...) {static}
|
||||
{method} + GetFileNameWithoutExtension(...) {static}
|
||||
}
|
||||
class Directory {
|
||||
{method} + Exists(...) {static}
|
||||
{method} + CreateDirectory(...) {static}
|
||||
}
|
||||
}
|
||||
package Collections {
|
||||
class IEnumerator {
|
||||
}
|
||||
package Generic {
|
||||
class List<T> {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
package SimpleFileBrowser {
|
||||
class FileBrowser {
|
||||
{method} + WaitForLoadDialog(...) {static}
|
||||
{method} + WaitForSaveDialog(...) {static}
|
||||
{method} + Success: bool {static} {readOnly}
|
||||
{method} + Result: string[*] {static} {readOnly}
|
||||
{method} + PickMode: enumeration {static} {readOnly}
|
||||
}
|
||||
}
|
||||
|
||||
class PlayerCamera {
|
||||
{field} + playerObject: UnityEngine.GameObject
|
||||
{field} + normalMinYFollow: float
|
||||
{field} + shipMinYFollow: float
|
||||
{field} + smoothSpeed: float
|
||||
{field} - initialY: float
|
||||
{field} + isPlaying: bool
|
||||
|
||||
{method} - Start()
|
||||
{method} - Update()
|
||||
}
|
||||
PlayerCamera --|> UnityEngine.MonoBehaviour
|
||||
PlayerCamera --> UnityEngine.GameObject : <<References>>
|
||||
PlayerCamera ..> UnityEngine.Mathf : <<Uses>>
|
||||
PlayerCamera ..> UnityEngine.Time : <<Uses>>
|
||||
PlayerCamera ..> Player : <<Uses>>
|
||||
PlayerCamera ..> ShipGameMode : <<Uses>>
|
||||
PlayerCamera ..> UnityEngine.Transform : <<Uses>>
|
||||
PlayerCamera ..> UnityEngine.Vector3 : <<Uses>>
|
||||
|
||||
class Player {
|
||||
{field} + RigidBody: UnityEngine.Rigidbody2D {get} {private set}
|
||||
{field} + Transform: UnityEngine.Transform {get} {private set}
|
||||
{field} + Particle: UnityEngine.ParticleSystem {get} {private set}
|
||||
{field} + LevelsLoader: LevelsLoader {get} {set}
|
||||
{field} + SpriteRenderer: UnityEngine.SpriteRenderer {get} {private set}
|
||||
{field} + IsColliding: bool {get} {set}
|
||||
{field} + HasStarted: bool {get} {set}
|
||||
{field} + CanJump: bool {get} {set}
|
||||
{field} + CurrentGameMode: IGameMode {get} {set}
|
||||
{field} + SpeedMultiplier: float
|
||||
|
||||
{method} + Awake()
|
||||
{method} + Start()
|
||||
{method} + Update()
|
||||
{method} + OnCollisionEnter2D(collision: UnityEngine.Collision2D)
|
||||
{method} + OnCollisionExit2D(collision: UnityEngine.Collision2D)
|
||||
{method} + OnTriggerEnter2D(collision: UnityEngine.Collider2D)
|
||||
{method} + ChangeGameMode(newMode: IGameMode)
|
||||
}
|
||||
Player --|> UnityEngine.MonoBehaviour
|
||||
Player *--> UnityEngine.Rigidbody2D : <<Owns>>
|
||||
Player *--> UnityEngine.Transform : <<Owns>>
|
||||
Player *--> UnityEngine.ParticleSystem : <<Owns>>
|
||||
Player o--> LevelsLoader : <<References>>
|
||||
Player *--> UnityEngine.SpriteRenderer : <<Owns>>
|
||||
Player o--> IGameMode : <<Has>>
|
||||
Player ..> UnityEngine.Resources : <<Uses>>
|
||||
Player ..> UnityEngine.Debug : <<Uses>>
|
||||
Player ..> ShipPortal : <<Uses>>
|
||||
Player ..> CubePortal : <<Uses>>
|
||||
Player ..> BonusBoostSpeed : <<Uses>>
|
||||
Player ..> BonusSlowSpeed : <<Uses>>
|
||||
Player ..> NormalGameMode : <<Uses>>
|
||||
Player ..> UnityEngine.Collision2D : <<Uses>>
|
||||
Player ..> UnityEngine.Collider2D : <<Uses>>
|
||||
|
||||
class PauseMenu {
|
||||
{field} + pauseMenu: UnityEngine.GameObject
|
||||
{field} + pauseButton: UnityEngine.GameObject
|
||||
{field} + levelLoader: LevelLoader
|
||||
{field} + volumeSlider: UnityEngine.UI.Slider
|
||||
|
||||
{method} + Start()
|
||||
{method} + ChangeVolume()
|
||||
{method} + Pause()
|
||||
{method} + Home()
|
||||
{method} + Resume()
|
||||
}
|
||||
PauseMenu --|> UnityEngine.MonoBehaviour
|
||||
PauseMenu --> UnityEngine.GameObject : <<References>>
|
||||
PauseMenu --> LevelLoader : <<References>>
|
||||
PauseMenu --> UnityEngine.UI.Slider : <<References>>
|
||||
PauseMenu ..> UnityEngine.PlayerPrefs : <<Uses>>
|
||||
PauseMenu ..> UnityEngine.Time : <<Uses>>
|
||||
PauseMenu ..> UnityEngine.SceneManagement.SceneManager : <<Uses>>
|
||||
|
||||
class MainMenu {
|
||||
{method} + LaunchGame()
|
||||
{method} + OpenImport()
|
||||
{method} + QuitGame()
|
||||
{method} + LevelEditor()
|
||||
{method} + EditorChoice()
|
||||
{method} + CreateLevel()
|
||||
}
|
||||
MainMenu --|> UnityEngine.MonoBehaviour
|
||||
MainMenu ..> UnityEngine.SceneManagement.SceneManager : <<Uses>>
|
||||
MainMenu ..> UnityEngine.Application : <<Uses>>
|
||||
|
||||
class LevelStat {
|
||||
{field} + JsonName: string {get} {set}
|
||||
{field} + totalJumps: Integer
|
||||
{field} + totalAttempts: Integer
|
||||
{field} + progressionPercent: Integer
|
||||
|
||||
{method} + {static} CreateFromJSON(jsonString: string): LevelStat
|
||||
}
|
||||
LevelStat ..> UnityEngine.JsonUtility : <<Uses>>
|
||||
|
||||
class LevelsLoader {
|
||||
{field} + levels: System.Collections.Generic.List<Level>
|
||||
{field} + levelCurrent: Level
|
||||
|
||||
{method} - Start()
|
||||
{method} - LoadAllLevels()
|
||||
{method} - SaveLevelCurrent()
|
||||
{method} + NextLevel()
|
||||
{method} + PreviousLevel()
|
||||
{method} + IncreaseTotalJumps()
|
||||
{method} + IncreaseTotalAttempts()
|
||||
{method} + CalculateCurrentProgressionPercent(playerPosition: UnityEngine.Vector3): Integer
|
||||
{method} + RefreshLevels()
|
||||
}
|
||||
LevelsLoader --|> UnityEngine.MonoBehaviour
|
||||
LevelsLoader *--> Level : <<Owns>>
|
||||
LevelsLoader ..> UnityEngine.TextAsset : <<Uses>>
|
||||
LevelsLoader ..> UnityEngine.Resources : <<Uses>>
|
||||
LevelsLoader ..> System.IO.Path : <<Uses>>
|
||||
LevelsLoader ..> UnityEngine.Application : <<Uses>>
|
||||
LevelsLoader ..> System.IO.File : <<Uses>>
|
||||
LevelsLoader ..> UnityEngine.JsonUtility : <<Uses>>
|
||||
LevelsLoader ..> LevelStat : <<Uses>>
|
||||
LevelsLoader ..> UnityEngine.Vector3 : <<Uses>>
|
||||
LevelsLoader ..> UnityEngine.Mathf : <<Uses>>
|
||||
LevelsLoader ..> WinnerWall : <<Uses>>
|
||||
LevelsLoader ..> UnityEngine.GameObject : <<Uses>>
|
||||
LevelsLoader ..> UnityEngine.Renderer : <<Uses>>
|
||||
LevelsLoader ..> System.Collections.Generic.List : <<Uses>>
|
||||
|
||||
class LevelLoader {
|
||||
{field} + levelsLoader: LevelsLoader
|
||||
{field} + audioSource: UnityEngine.AudioSource
|
||||
{field} + progressionText: UnityEngine.UI.Text
|
||||
{field} - groundY: float
|
||||
|
||||
{method} - GetPrefab(type: string): UnityEngine.GameObject
|
||||
{method} - LoadAudio()
|
||||
{method} - LoadElements()
|
||||
{method} + Start()
|
||||
{method} + Update()
|
||||
}
|
||||
LevelLoader --|> UnityEngine.MonoBehaviour
|
||||
LevelLoader o--> LevelsLoader : <<References>>
|
||||
LevelLoader *--> UnityEngine.AudioSource : <<Owns>>
|
||||
LevelLoader --> UnityEngine.UI.Text : <<References>>
|
||||
LevelLoader ..> System.IO.Path : <<Uses>>
|
||||
LevelLoader ..> UnityEngine.Resources : <<Uses>>
|
||||
LevelLoader ..> UnityEngine.PlayerPrefs : <<Uses>>
|
||||
LevelLoader ..> UnityEngine.GameObject : <<Uses>>
|
||||
LevelLoader ..> UnityEngine.Vector3 : <<Uses>>
|
||||
LevelLoader ..> UnityEngine.Quaternion : <<Uses>>
|
||||
LevelLoader ..> UnityEngine.Transform : <<Uses>>
|
||||
LevelLoader ..> WinnerWall : <<Uses>>
|
||||
LevelLoader ..> Level : <<Uses>>
|
||||
LevelLoader ..> Ground : <<Uses>>
|
||||
LevelLoader ..> UnityEngine.AudioClip : <<Uses>>
|
||||
LevelLoader ..> UnityEngine.Renderer : <<Uses>>
|
||||
|
||||
class LevelEditor {
|
||||
{field} - currentBlock: UnityEngine.GameObject
|
||||
{field} - isPlacingBlock: bool
|
||||
{field} - currentScale: UnityEngine.Vector3
|
||||
{field} - scaleStep: float
|
||||
{field} + blockGroupContainer: UnityEngine.Transform
|
||||
{field} + buttonPrefabTemplate: UnityEngine.GameObject
|
||||
{field} - currentPage: Integer
|
||||
{field} - buttonsPerPage: Integer {constant}
|
||||
{field} - blockPrefabs: System.Collections.Generic.List<UnityEngine.GameObject>
|
||||
{field} - currentButtons: System.Collections.Generic.List<UnityEngine.GameObject>
|
||||
{field} - resizingTarget: UnityEngine.GameObject
|
||||
{field} - isResizing: bool
|
||||
{field} - originalMousePos: UnityEngine.Vector3
|
||||
{field} - originalScale: UnityEngine.Vector3
|
||||
{field} - currentResizeAxis: ResizeAxis
|
||||
|
||||
{method} - Start()
|
||||
{method} - LoadPrefabs()
|
||||
{method} - GenerateButtons()
|
||||
{method} - ClearCurrentButtons()
|
||||
{method} + NextPage()
|
||||
{method} + PreviousPage()
|
||||
{method} - SelectPrefab(prefab: UnityEngine.GameObject)
|
||||
{method} - Update()
|
||||
{method} - PlaceBlock()
|
||||
{method} - TrySnapToNearbyBlock()
|
||||
{method} - InstantiateAndPrepare(prefab: UnityEngine.GameObject, scaleOverride: UnityEngine.Vector3?)
|
||||
{method} - HandleBlockRotation()
|
||||
}
|
||||
LevelEditor --|> UnityEngine.MonoBehaviour
|
||||
LevelEditor o--> blockGroupContainer : <<References>>
|
||||
LevelEditor --> buttonPrefabTemplate : <<References>>
|
||||
LevelEditor *--> blockPrefabs : <<Owns>>
|
||||
LevelEditor *--> currentButtons : <<Owns>>
|
||||
LevelEditor o--> currentBlock : <<References>>
|
||||
LevelEditor o--> resizingTarget : <<References>>
|
||||
LevelEditor ..> UnityEngine.GameObject : <<Uses>>
|
||||
LevelEditor ..> UnityEngine.Vector3 : <<Uses>>
|
||||
LevelEditor ..> UnityEngine.Mathf : <<Uses>>
|
||||
LevelEditor ..> UnityEngine.Input : <<Uses>>
|
||||
LevelEditor ..> UnityEngine.Camera : <<Uses>>
|
||||
LevelEditor ..> UnityEngine.Physics2D : <<Uses>>
|
||||
LevelEditor ..> UnityEngine.Collider2D : <<Uses>>
|
||||
LevelEditor ..> UnityEngine.Bounds : <<Uses>>
|
||||
LevelEditor ..> UnityEngine.SpriteRenderer : <<Uses>>
|
||||
LevelEditor ..> UnityEngine.UI.Button : <<Uses>>
|
||||
LevelEditor ..> UnityEngine.UI.Image : <<Uses>>
|
||||
LevelEditor ..> UnityEngine.RectTransform : <<Uses>>
|
||||
LevelEditor ..> UnityEngine.Debug : <<Uses>>
|
||||
LevelEditor ..> System.Collections.Generic.List : <<Uses>>
|
||||
LevelEditor ..> UnityEngine.Resources : <<Uses>>
|
||||
LevelEditor ..> Player : <<Uses>> ' (via tags)
|
||||
LevelEditor ..> Ground : <<Uses>> ' (via tags)
|
||||
LevelEditor ..> Portal : <<Uses>> ' (via tags)
|
||||
LevelEditor ..> SmallObstacle : <<Uses>> ' (via tags)
|
||||
LevelEditor ..> Spike : <<Uses>> ' (via tags)
|
||||
LevelEditor ..> Block : <<Uses>> ' (via tags)
|
||||
LevelEditor ..> Bonus : <<Uses>> ' (via tags)
|
||||
|
||||
enum ResizeAxis <<enumeration>> {
|
||||
None
|
||||
Horizontal
|
||||
Vertical
|
||||
}
|
||||
LevelEditor *--> ResizeAxis : <<Has>>
|
||||
|
||||
class LevelElement {
|
||||
{field} + type: string
|
||||
{field} + x: float
|
||||
{field} + y: float
|
||||
{field} + scaleX: float
|
||||
{field} + scaleY: float
|
||||
}
|
||||
|
||||
class Level {
|
||||
- name: String
|
||||
- musicName: String
|
||||
+ StartLevel()
|
||||
+ EndLevel()
|
||||
+ CheckCompletion(): Boolean
|
||||
{field} + {static} {readOnly} LAST_X: Integer = 15
|
||||
{field} + JsonName: string {get} {set}
|
||||
{field} + TotalJumps: Integer {get} {set}
|
||||
{field} + TotalAttempts: Integer {get} {set}
|
||||
{field} + ProgressionPercent: Integer {get} {set}
|
||||
{field} + ProgressionPercentMax: Integer {get} {set}
|
||||
{field} + name: string
|
||||
{field} + musicName: string
|
||||
{field} + order: Integer
|
||||
{field} + elements: System.Collections.Generic.List<LevelElement>
|
||||
{field} + LastX: float {get}
|
||||
|
||||
{method} + {static} CreateFromJSON(jsonString: string): Level
|
||||
}
|
||||
Level *--> LevelElement : <<Composed of>>
|
||||
Level ..> UnityEngine.JsonUtility : <<Uses>>
|
||||
Level ..> System.Collections.Generic.List : <<Uses>>
|
||||
|
||||
class JSONImporter {
|
||||
{field} + statusText: TMPro.TMP_Text
|
||||
|
||||
{method} - Awake()
|
||||
{method} - Start()
|
||||
{method} + ImportJSON()
|
||||
{method} - ShowFileBrowser(): System.Collections.IEnumerator
|
||||
{method} - UpdateStatus(message: string, color: UnityEngine.Color)
|
||||
}
|
||||
JSONImporter --|> UnityEngine.MonoBehaviour
|
||||
JSONImporter --> TMPro.TMP_Text : <<References>>
|
||||
JSONImporter ..> System.Collections.IEnumerator : <<Uses>>
|
||||
JSONImporter ..> SimpleFileBrowser.FileBrowser : <<Uses>>
|
||||
JSONImporter ..> System.IO.Path : <<Uses>>
|
||||
JSONImporter ..> System.IO.File : <<Uses>>
|
||||
JSONImporter ..> UnityEngine.Color : <<Uses>>
|
||||
JSONImporter ..> LevelsLoader : <<Uses>>
|
||||
JSONImporter ..> UnityEngine.Object : <<Uses>>
|
||||
JSONImporter ..> UnityEngine.Canvas : <<Uses>>
|
||||
JSONImporter ..> UnityEngine.SceneManagement.SceneManager : <<Uses>>
|
||||
|
||||
class JSONExporter {
|
||||
{field} + statusText: TMPro.TMP_Text
|
||||
{field} - editor: LevelEditor
|
||||
{field} - levelsFolder: string
|
||||
|
||||
{method} - Awake()
|
||||
{method} - Start()
|
||||
{method} + ExportJSON()
|
||||
{method} - ShowSaveDialog(): System.Collections.IEnumerator
|
||||
{method} - SetStatus(message: string, color: UnityEngine.Color)
|
||||
}
|
||||
JSONExporter --|> UnityEngine.MonoBehaviour
|
||||
JSONExporter o--> LevelEditor : <<References>>
|
||||
JSONExporter --> TMPro.TMP_Text : <<References>>
|
||||
JSONExporter ..> System.Collections.IEnumerator : <<Uses>>
|
||||
JSONExporter ..> System.Collections.Generic.List : <<Uses>>
|
||||
JSONExporter ..> SimpleFileBrowser.FileBrowser : <<Uses>>
|
||||
JSONExporter ..> System.IO.Path : <<Uses>>
|
||||
JSONExporter ..> System.IO.File : <<Uses>>
|
||||
JSONExporter ..> System.IO.Directory : <<Uses>>
|
||||
JSONExporter ..> UnityEngine.Collider2D : <<Uses>>
|
||||
JSONExporter ..> UnityEngine.Object : <<Uses>>
|
||||
JSONExporter ..> UnityEngine.Vector3 : <<Uses>>
|
||||
JSONExporter ..> UnityEngine.Mathf : <<Uses>>
|
||||
JSONExporter ..> UnityEngine.JsonUtility : <<Uses>>
|
||||
JSONExporter ..> UnityEngine.Color : <<Uses>>
|
||||
JSONExporter ..> LevelsLoader : <<Uses>>
|
||||
JSONExporter ..> UnityEngine.Canvas : <<Uses>>
|
||||
|
||||
class SerializableElement <<private>> {
|
||||
{field} + type: string
|
||||
{field} + x: float
|
||||
{field} + y: float
|
||||
{field} + scaleX: float
|
||||
{field} + scaleY: float
|
||||
}
|
||||
JSONExporter ..> SerializableElement : <<Uses>>
|
||||
|
||||
class LevelData <<private>> {
|
||||
{field} + name: string
|
||||
{field} + musicName: string
|
||||
{field} + order: Integer
|
||||
{field} + elements: SerializableElement[*]
|
||||
}
|
||||
LevelData *--> SerializableElement : <<Composed of>>
|
||||
JSONExporter ..> LevelData : <<Uses>>
|
||||
|
||||
|
||||
interface IGameMode <<interface>> {
|
||||
{method} + Update(player: Player) {abstract}
|
||||
{method} + OnCollisionEnter(player: Player, collision: UnityEngine.Collision2D) {abstract}
|
||||
{method} + OnCollisionExit(player: Player, collision: UnityEngine.Collision2D) {abstract}
|
||||
}
|
||||
|
||||
abstract class LevelElement {
|
||||
- x: Float
|
||||
- y: Float
|
||||
}
|
||||
class ShipGameMode implements IGameMode {
|
||||
{field} - HorizontalSpeed: float {constant}
|
||||
{field} - JumpForce: float {constant}
|
||||
{field} - JumpKey: UnityEngine.KeyCode {constant}
|
||||
{field} - UpperAngle: float {constant}
|
||||
{field} - LowerAngle: float {constant}
|
||||
{field} - RotationTransitionDuration: float {constant}
|
||||
|
||||
abstract class Obstacle extends LevelElement {
|
||||
+ TriggerEffect(player: Player)
|
||||
{method} + Update(player: Player)
|
||||
{method} - GetCurrentZAngle(player: Player): float
|
||||
{method} - Jump(player: Player)
|
||||
{method} + OnCollisionEnter(player: Player, collision: UnityEngine.Collision2D)
|
||||
{method} + OnCollisionExit(player: Player, collision: UnityEngine.Collision2D)
|
||||
}
|
||||
ShipGameMode ..|> IGameMode
|
||||
ShipGameMode ..> Player : <<Uses>>
|
||||
ShipGameMode ..> UnityEngine.Vector2 : <<Uses>>
|
||||
ShipGameMode ..> UnityEngine.Input : <<Uses>>
|
||||
ShipGameMode ..> UnityEngine.KeyCode : <<Uses>>
|
||||
ShipGameMode ..> UnityEngine.Mathf : <<Uses>>
|
||||
ShipGameMode ..> UnityEngine.Time : <<Uses>>
|
||||
ShipGameMode ..> UnityEngine.Quaternion : <<Uses>>
|
||||
ShipGameMode ..> UnityEngine.SceneManagement.SceneManager : <<Uses>>
|
||||
ShipGameMode ..> UnityEngine.Collision2D : <<Uses>>
|
||||
ShipGameMode ..> LevelsLoader : <<Uses>>
|
||||
|
||||
class Platform extends LevelElement {
|
||||
class NormalGameMode implements IGameMode {
|
||||
{field} - HorizontalSpeed: float {constant}
|
||||
{field} - JumpForce: float {constant}
|
||||
{field} - JumpKey: UnityEngine.KeyCode {constant}
|
||||
{field} - isRotating: bool
|
||||
{field} - targetRotationAngle: float
|
||||
{field} - rotationSpeed: float {readOnly}
|
||||
|
||||
{method} + Update(player: Player)
|
||||
{method} - Jump(player: Player)
|
||||
{method} - PerformRotation(player: Player)
|
||||
{method} - IsJumping(player: Player): bool
|
||||
{method} - AlignRotation(player: Player)
|
||||
{method} - UpdateParticlePositionAndRotation(player: Player)
|
||||
{method} + OnCollisionEnter(player: Player, collision: UnityEngine.Collision2D)
|
||||
{method} + OnCollisionExit(player: Player, collision: UnityEngine.Collision2D)
|
||||
}
|
||||
NormalGameMode ..|> IGameMode
|
||||
NormalGameMode ..> Player : <<Uses>>
|
||||
NormalGameMode ..> UnityEngine.Vector2 : <<Uses>>
|
||||
NormalGameMode ..> UnityEngine.Input : <<Uses>>
|
||||
NormalGameMode ..> UnityEngine.KeyCode : <<Uses>>
|
||||
NormalGameMode ..> UnityEngine.Mathf : <<Uses>>
|
||||
NormalGameMode ..> UnityEngine.Time : <<Uses>>
|
||||
NormalGameMode ..> UnityEngine.Quaternion : <<Uses>>
|
||||
NormalGameMode ..> UnityEngine.SceneManagement.SceneManager : <<Uses>>
|
||||
NormalGameMode ..> UnityEngine.Collision2D : <<Uses>>
|
||||
NormalGameMode ..> LevelsLoader : <<Uses>>
|
||||
NormalGameMode ..> UnityEngine.Vector3 : <<Uses>>
|
||||
|
||||
class Spike extends Obstacle {
|
||||
+ TriggerEffect(player: Player)
|
||||
}
|
||||
|
||||
class Portal extends LevelElement {
|
||||
- destination: Vector2
|
||||
- type: PortalType
|
||||
+ Teleport(player: Player)
|
||||
}
|
||||
' Tags
|
||||
class ShipPortal { }
|
||||
class CubePortal { }
|
||||
class BonusBoostSpeed { }
|
||||
class BonusSlowSpeed { }
|
||||
class Kill { }
|
||||
class Win { }
|
||||
class Ground { }
|
||||
class WinnerWall { }
|
||||
class Block { }
|
||||
class SmallObstacle { }
|
||||
class Spike { }
|
||||
class Portal { }
|
||||
class Bonus { }
|
||||
|
||||
enum PortalType {
|
||||
Normal, Gravity, Speed
|
||||
}
|
||||
|
||||
class Bumper extends LevelElement {
|
||||
- bounceForce: Float
|
||||
+ Bounce(player: Player)
|
||||
}
|
||||
|
||||
class LevelEnd extends LevelElement {
|
||||
+ TriggerEndGame()
|
||||
}
|
||||
|
||||
class Collectible extends LevelElement {
|
||||
- points: int
|
||||
+ Collect(player: Player)
|
||||
}
|
||||
|
||||
class Player {
|
||||
- JUMP_FORCE: static const Float = 26.6581
|
||||
- SPEED: static const Float = 8.6
|
||||
- rigidBody: Rigidbody2D
|
||||
- isColliding: Boolean
|
||||
- isGrounded: Boolean
|
||||
- gravityScale: Float
|
||||
+ Jump()
|
||||
+ IsJumping(): Boolean
|
||||
+ OnCollisionEnter2D(collision: Collision2D)
|
||||
+ OnCollisionExit2D(collision: Collision2D)
|
||||
+ ChangeGravity()
|
||||
+ Die()
|
||||
+ Respawn()
|
||||
+ CollectItem(item: Collectible)
|
||||
}
|
||||
|
||||
class LevelLoader {
|
||||
+ LoadLevel(jsonPath: String): Level
|
||||
+ UnloadLevel(level: Level)
|
||||
}
|
||||
|
||||
class LevelParser {
|
||||
+ ParseJSON(jsonData: String): Level
|
||||
}
|
||||
|
||||
class MusicManager {
|
||||
- currentTrack: String
|
||||
- volume: Float
|
||||
+ PlayMusic(musicPath: String)
|
||||
+ StopMusic()
|
||||
+ SetVolume(level: Float)
|
||||
}
|
||||
|
||||
GameManager *--> Level : <<Manages>>
|
||||
GameManager --> LevelLoader : <<Uses>>
|
||||
LevelLoader --> LevelParser : <<Uses>>
|
||||
Level *--> LevelElement : <<Contains>>
|
||||
GameManager *--> Player : <<Owns>>
|
||||
GameManager --> MusicManager : <<Controls>>
|
||||
Player --> LevelEnd : <<Triggers>>
|
||||
Player --> Portal : <<Interacts>>
|
||||
Player --> Collectible : <<Collects>>
|
||||
Obstacle --> Player : <<Affects>>
|
||||
Player ..> ShipPortal : <<Uses Tag>>
|
||||
Player ..> CubePortal : <<Uses Tag>>
|
||||
Player ..> BonusBoostSpeed : <<Uses Tag>>
|
||||
Player ..> BonusSlowSpeed : <<Uses Tag>>
|
||||
ShipGameMode ..> Kill : <<Uses Tag>>
|
||||
ShipGameMode ..> Win : <<Uses Tag>>
|
||||
ShipGameMode ..> Ground : <<Uses Tag>>
|
||||
NormalGameMode ..> Kill : <<Uses Tag>>
|
||||
NormalGameMode ..> Win : <<Uses Tag>>
|
||||
LevelLoader ..> WinnerWall : <<Uses Prefab>>
|
||||
LevelLoader ..> Ground : <<Uses Prefab>>
|
||||
LevelEditor ..> Ground : <<Uses Tag>>
|
||||
LevelEditor ..> Block : <<Uses Tag>>
|
||||
LevelEditor ..> SmallObstacle : <<Uses Tag>>
|
||||
LevelEditor ..> Spike : <<Uses Tag>>
|
||||
LevelEditor ..> Portal : <<Uses Tag>>
|
||||
LevelEditor ..> Bonus : <<Uses Tag>>
|
||||
LevelsLoader ..> WinnerWall : <<Uses Prefab>>
|
||||
|
||||
@enduml
|
||||
|
@ -1,4 +1,4 @@
|
||||
@startuml Geometry Dash - Diagramme d'etats du joueur
|
||||
@startuml Geometry Dash - Diagramme d'états du joueur
|
||||
|
||||
start
|
||||
|
||||
@ -16,12 +16,6 @@ repeat
|
||||
switch (Forme)
|
||||
case (Forme fusée)
|
||||
:Mode fusée;
|
||||
case (Forme roue)
|
||||
:Mode roue;
|
||||
case (Forme sens inversé)
|
||||
:Mode sens inversé;
|
||||
case (Forme gravité inversée)
|
||||
:Mode gravité inversée;
|
||||
endswitch
|
||||
if (Le joueur percute un obstacle ?) then (Oui)
|
||||
:Le joueur meurt;
|
||||
@ -38,8 +32,8 @@ repeat
|
||||
:Le joueur meurt;
|
||||
stop
|
||||
endif
|
||||
case (Annulation d'obstacle)
|
||||
:Supprimer tous les obstacles;
|
||||
case (Temps accéléré)
|
||||
:Activer accélération du temps;
|
||||
:Durée : 3 secondes;
|
||||
endswitch
|
||||
}
|
@ -4,100 +4,64 @@ left to right direction
|
||||
|
||||
actor Joueur as Joueur
|
||||
|
||||
|
||||
rectangle "Menu principal" {
|
||||
usecase "Configurer les paramètres" as ConfigurerParametres
|
||||
usecase "Accéder à la sélection des niveaux" as SelectionNiveau
|
||||
usecase "Accéder à l'éditeur de cartes" as EditeurCartes
|
||||
usecase "Consulter les statistiques" as ConsulterStats
|
||||
usecase "Voir les trophées et récompenses" as VoirTrophees
|
||||
usecase "Accéder à l'éditeur de niveau" as EditeurNiveau
|
||||
usecase "Importer un niveau" as ImporterNiveau
|
||||
usecase "Quitter le jeu" as QuitterJeu
|
||||
}
|
||||
|
||||
rectangle "Sélection des niveaux" {
|
||||
usecase "Parcourir les niveaux disponibles" as ParcourirNiveaux
|
||||
usecase "Afficher les détails d'un niveau" as AfficherDetailsNiveau
|
||||
usecase "Parcourir les niveaux disponibles (passer au niveau suivant ou précédent)" as ParcourirNiveaux
|
||||
usecase "Afficher les statistiques d'un niveau (nombre d'essais, nombre de sauts et progression record)" as AfficherDetailsNiveau
|
||||
usecase "Commencer un niveau" as CommencerNiveau
|
||||
}
|
||||
|
||||
rectangle "Pendant un niveau" {
|
||||
usecase "Sauter" as Sauter
|
||||
usecase "Appuyer sur la barre d'espace" as Sauter
|
||||
usecase "Voir la progression dans le niveau" as VoirProgression
|
||||
usecase "Mettre le jeu en pause" as MettrePause
|
||||
}
|
||||
|
||||
rectangle "Paramètres" {
|
||||
usecase "Régler le volume du jeu" as ReglerVolume
|
||||
usecase "Changer la musique de fond" as ChangerMusique
|
||||
usecase "Lire les instructions d'aide" as LireAide
|
||||
}
|
||||
|
||||
rectangle "Création de cartes" {
|
||||
usecase "Créer une nouvelle carte" as CreerNouvelleCarte
|
||||
usecase "Modifier une carte existante" as ModifierCarte
|
||||
usecase "Tester une carte" as TesterCarte
|
||||
usecase "Partager une carte" as PartagerCarte
|
||||
usecase "Télécharger des cartes de la communauté" as TelechargerCartes
|
||||
}
|
||||
|
||||
rectangle "Statistiques" {
|
||||
usecase "Afficher les statistiques globales" as AfficherStatsGlobales
|
||||
usecase "Afficher les statistiques de session" as AfficherStatsSession
|
||||
}
|
||||
|
||||
rectangle "Trophées et récompenses" {
|
||||
usecase "Voir les trophées débloqués" as VoirTropheesDebloques
|
||||
usecase "Voir les pièces collectées" as VoirPieces
|
||||
}
|
||||
|
||||
rectangle "Menu Pause" {
|
||||
usecase "Continuer" as Continuer
|
||||
usecase "Redémarrer la partie" as RedemarrerPartie
|
||||
usecase "Retour à la sélection des maps" as RetourSelection
|
||||
usecase "Revenir au menu principal" as RevenirMenuPrincipal
|
||||
usecase "Régler le volume de la musique" as ReglerVolumeMusique
|
||||
usecase "Voir le nombre d'essais, nombre de sauts et progression record" as StatistiquesNiveau
|
||||
}
|
||||
|
||||
Joueur --> ConfigurerParametres : <<extends>>
|
||||
Joueur --> SelectionNiveau : <<extends>>
|
||||
Joueur --> EditeurCartes : <<extends>>
|
||||
Joueur --> ConsulterStats : <<extends>>
|
||||
Joueur --> VoirTrophees : <<extends>>
|
||||
rectangle "Création de niveaux" {
|
||||
usecase "Créer un nouveau niveau" as CreerNouveauNiveau
|
||||
usecase "Modifier un niveau existante" as ModifierNiveau
|
||||
usecase "Tester un niveau" as TesterNiveau
|
||||
usecase "Exporter un niveau" as ExporterNiveau
|
||||
}
|
||||
|
||||
SelectionNiveau --> ParcourirNiveaux : <<include>>
|
||||
ParcourirNiveaux --> AfficherDetailsNiveau : <<extends>>
|
||||
ParcourirNiveaux --> CommencerNiveau : <<extends>>
|
||||
Joueur --> SelectionNiveau : <<extends>>
|
||||
Joueur --> EditeurNiveau : <<extends>>
|
||||
Joueur --> ImporterNiveau : <<extends>>
|
||||
Joueur --> QuitterJeu : <<extends>>
|
||||
|
||||
SelectionNiveau --> AfficherDetailsNiveau : <<include>>
|
||||
SelectionNiveau --> ParcourirNiveaux : <<extends>>
|
||||
SelectionNiveau --> CommencerNiveau : <<extends>>
|
||||
|
||||
CommencerNiveau --> Sauter : <<extends>>
|
||||
CommencerNiveau --> VoirProgression : <<include>>
|
||||
CommencerNiveau --> MettrePause : <<extends>>
|
||||
|
||||
ConfigurerParametres --> ReglerVolume : <<extends>>
|
||||
ConfigurerParametres --> ChangerMusique : <<extends>>
|
||||
ConfigurerParametres --> LireAide : <<extends>>
|
||||
|
||||
EditeurCartes --> CreerNouvelleCarte : <<extends>>
|
||||
EditeurCartes --> ModifierCarte : <<extends>>
|
||||
EditeurCartes --> TelechargerCartes : <<extends>>
|
||||
CreerNouvelleCarte --> TesterCarte : <<extends>>
|
||||
ModifierCarte --> TesterCarte : <<extends>>
|
||||
CreerNouvelleCarte --> PartagerCarte : <<extends>>
|
||||
ModifierCarte --> PartagerCarte : <<extends>>
|
||||
|
||||
TesterCarte--> Sauter : <<extends>>
|
||||
TesterCarte--> MettrePause : <<extends>>
|
||||
|
||||
ConsulterStats --> AfficherStatsGlobales : <<extends>>
|
||||
ConsulterStats --> AfficherStatsSession : <<extends>>
|
||||
|
||||
VoirTrophees --> VoirTropheesDebloques : <<extends>>
|
||||
VoirTrophees --> VoirPieces : <<extends>>
|
||||
|
||||
MettrePause --> Continuer : <<extends>>
|
||||
MettrePause --> RedemarrerPartie : <<extends>>
|
||||
MettrePause --> RetourSelection : <<extends>>
|
||||
MettrePause --> RevenirMenuPrincipal : <<extends>>
|
||||
MettrePause --> ReglerVolumeMusique : <<extends>>
|
||||
MettrePause --> StatistiquesNiveau : <<include>>
|
||||
|
||||
RedemarrerPartie --> Sauter : <<extends>>
|
||||
RedemarrerPartie --> MettrePause : <<extends>>
|
||||
EditeurNiveau --> CreerNouveauNiveau : <<extends>>
|
||||
EditeurNiveau --> ModifierNiveau : <<extends>>
|
||||
|
||||
Continuer --> Sauter : <<extends>>
|
||||
Continuer --> MettrePause : <<extends>>
|
||||
CreerNouveauNiveau --> TesterNiveau : <<extends>>
|
||||
ModifierNiveau --> TesterNiveau : <<extends>>
|
||||
|
||||
RetourSelection --> ParcourirNiveaux : <<include>>
|
||||
CreerNouveauNiveau --> ExporterNiveau : <<extends>>
|
||||
ModifierNiveau --> ExporterNiveau : <<extends>>
|
||||
|
||||
@enduml
|
||||
|
@ -7,7 +7,7 @@ Les modélisations UML du projet sont générés à partir des fichiers `.puml`
|
||||
- [Diagramme de classes](./UML/class-diagram.puml)
|
||||
- [Diagramme d'activités](./UML/activity-diagram/activity-diagram.puml)
|
||||
- [Diagramme de cas d'utilisation](./UML/use-case-diagram.puml)
|
||||
- [Diagramme d'états](./UML/state-diagram/state-diagram.puml)
|
||||
- [Diagramme d'états](./UML/state-diagram.puml)
|
||||
|
||||
## Diagramme de Gantt
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user