# latify/gamearchitecture architecture

> Architecture diagram of the GitHub repository latify/gamearchitecture, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/latify/gamearchitecture
- Repository: https://github.com/latify/gamearchitecture

## Overview

##### Main System Components

A. Manager Layer (Top Level)
- GameManager (Central Controller)
- UIManager
- AudioManager
- MusicManager
- CameraManager
- SaveManager
- MultiLangManager

B. Systems Layer (Middle Level)
- Dialogue System
- Save/Load System
- Localization System
- Transition System
- Collider System

C. Resource Layer (Bottom Level)
- Animations
- Fonts
- Sprites
- Audio Files
- Language Files

##### Component Relationships

- Systems should connect to their respective managers:
- Dialogue System → UIManager
- Save/Load System → SaveManager
- Localization System → MultiLangManager
- Transition System → UIManager
- Collider System → GameManager

##### Specific Component Details

GameManager:
**┌─────────────────────┐**
- GameManager     │
- ┤
- Scene Management  │
- Game State        │
- Core Events       │
- Manager Registry  │
- ┘

Systems:
**┌─────────────────────┐**
- Dialogue System   │
- ┤
- Writer            │
- Text Effects      │
- Event Triggers    │
- ┘

##### Implementation Notes

Notes for:
- Don't Destroy On Load components
- Scene-specific vs. Persistent objects
- Resource loading paths
- Save data structure

##### The persistence and state management

Remember to include version information and any critical dependencies (like TextMeshPro) in a separate documentation block.

This architecture represents a robust game framework with emphasis on modularity, extensibility, and clean communication between components.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef manager fill:#3498db,stroke:#2980b9,color:white
    classDef system fill:#2ecc71,stroke:#27ae60,color:white
    classDef resource fill:#f1c40f,stroke:#f39c12,color:black
    classDef data fill:#95a5a6,stroke:#7f8c8d,color:white

    %% Manager Layer
    subgraph Managers
        GM[">GameManager"]:::manager
        UI[">UIManager"]:::manager
        AM[">AudioManager"]:::manager
        MM[">MusicManager"]:::manager
        CM[">CameraManager"]:::manager
        SM[">SaveManager"]:::manager
        MLM[">MultiLangManager"]:::manager
    end

    %% Systems Layer
    subgraph Systems
        DS["Dialogue System"]:::system
        SLS["Save/Load System"]:::system
        LS["Localization System"]:::system
        TS["Transition System"]:::system
        CS["Collider System"]:::system
    end

    %% Resource Layer
    subgraph Resources
        ANIM["Animations"]:::resource
        FONT["Fonts"]:::resource
        SPR["Sprites"]:::resource
        AUD["Audio Files"]:::resource
        LANG["Language Files"]:::resource
    end

    %% Relationships
    GM --> UI
    GM --> AM
    GM --> MM
    GM --> CM
    GM --> SM
    GM --> MLM

    DS --> UI
    SLS --> SM
    LS --> MLM
    TS --> UI
    CS --> GM

    %% Resource Connections
    ANIM -.-> GM
    FONT -.-> UI
    SPR -.-> UI
    AUD -.-> AM
    LANG -.-> MLM

    %% Click Events
    click GM "https://github.com/LatifY/GameArchitecture/blob/main/Assets/GameArchitecture/Scripts/Managers/GameManager.cs"
    click UI "https://github.com/LatifY/GameArchitecture/blob/main/Assets/GameArchitecture/Scripts/Managers/UIManager.cs"
    click AM "https://github.com/LatifY/GameArchitecture/blob/main/Assets/GameArchitecture/Scripts/Managers/AudioManager.cs"
    click MM "https://github.com/LatifY/GameArchitecture/blob/main/Assets/GameArchitecture/Scripts/Managers/MusicManager.cs"
    click CM "https://github.com/LatifY/GameArchitecture/blob/main/Assets/GameArchitecture/Scripts/Managers/CameraManager.cs"
    click MLM "https://github.com/LatifY/GameArchitecture/blob/main/Assets/GameArchitecture/MultiLang/MultiLang.cs"
    click DS "https://github.com/LatifY/GameArchitecture/blob/main/Assets/GameArchitecture/Scripts/Systems/DialogueSystem/DialogueManager.cs"
    click SLS "https://github.com/LatifY/GameArchitecture/blob/main/Assets/GameArchitecture/Scripts/Systems/SaveSystem/SaveSystem.cs"
    click LS "https://github.com/LatifY/GameArchitecture/blob/main/Assets/GameArchitecture/MultiLang/TextTranslator.cs"
    click TS "https://github.com/LatifY/GameArchitecture/tree/main/Assets/GameArchitecture/Prefabs/UI/Transitions"
    click CS "https://github.com/LatifY/GameArchitecture/blob/main/Assets/GameArchitecture/Scripts/Obj/Collider.cs"
    click ANIM "https://github.com/LatifY/GameArchitecture/tree/main/Assets/GameArchitecture/Animations"
    click FONT "https://github.com/LatifY/GameArchitecture/tree/main/Assets/GameArchitecture/Fonts"
    click SPR "https://github.com/LatifY/GameArchitecture/tree/main/Assets/GameArchitecture/Sprites"
    click AUD "https://github.com/LatifY/GameArchitecture/tree/main/Assets/GameArchitecture/Other"
    click LANG "https://github.com/LatifY/GameArchitecture/tree/main/Assets/Resources/Languages"

    %% Legend
    subgraph Legend
        L1[">Manager Component"]:::manager
        L2["System Component"]:::system
        L3["Resource Component"]:::resource
        L4["Data Flow"]:::data
    end
```
