# mahsum-altun/art-of-fight architecture

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

- Interactive diagram: https://gitdiagram.com/mahsum-altun/art-of-fight
- Repository: https://github.com/mahsum-altun/art-of-fight

## Overview

##### Main Components Identification

The system should be divided into these primary components:

a) Core Game Systems
- Player System
- Road Generation System
- Animation System
- Window Breaking System
- Input System
- Audio System
- Ads System

b) Scene Management
- Game Manager
- Road Manager

**Mobile Input Controller <-> UI Elements**
- ↓

- Game Manager
- ↓
- ┌────┴────────────┐
**Road Manager    Player Controller**

- ┬────────┘

**Animation System   Physics System   Audio System**
- ↑              ↑               ↑
- ┴───────────────┘

##### Component Details

- Rectangles (Blue): Core managers (GameManager, RoadManager)
- Rounded Rectangles (Green): Player-related systems
- Hexagons (Orange): Input and UI systems
- Diamonds (Red): External systems (Ads)

##### Specific Implementation Notes

a) Player System:
**PlayerMove.cs ←→ AnimTrigger.cs**
- ↓
**MobileInput.cs**

b) Road Generation:
**RoadManager.cs**
- ↓
**Prefab System**

c) Special Effects:
**WindowParticle.cs ←→ Animation System**

##### External Services

Integration points:
- Google Play Services
- Unity Ads System
- Audio Mixer System

##### Data Flow

Main data flows:
##### Score System → UI Update → Storage

Remember to include:
- Clear component labels
- System boundaries
- External service integration points
- Event communication paths

This structure reflects the Unity-based architecture while highlighting the game's unique features of randomized roads and window-breaking mechanics.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph UI_Layer
        Input["Mobile Input Controller"]:::input
        UI["UI Elements"]:::ui
    end

    subgraph Game_Logic
        GM["Game Manager"]:::core
        RM["Road Manager"]:::core
        PC["Player Controller"]:::player
    end

    subgraph Core_Systems
        AS["Animation System"]:::system
        PS["Physics System"]:::system
        ADS["Audio System"]:::system
        WBS["Window Breaking System"]:::system
    end

    subgraph External_Services
        AdsSystem["Unity Ads System"]:::external
        GPS["Google Play Services"]:::external
    end

    Input <--> UI
    Input --> PC
    
    GM --> RM
    GM --> PC
    
    RM --> PS
    PC --> AS
    PC --> PS
    
    PS --> WBS
    WBS --> AS
    
    GM --> ADS
    GM --> AdsSystem
    
    %% Component relationships
    WBS --> ADS
    PC --> WBS
    
    %% Click events for component mapping
    click PC "https://github.com/Mahsum-Altun/Art-of-Fight/blob/main/Assets/Scripts/PlayerMove.cs"
    click Input "https://github.com/Mahsum-Altun/Art-of-Fight/blob/main/Assets/Scripts/MobileInput.cs"
    click WBS "https://github.com/Mahsum-Altun/Art-of-Fight/blob/main/Assets/Scripts/WindowParticle.cs"
    click ADS "https://github.com/Mahsum-Altun/Art-of-Fight/blob/main/Assets/Scripts/SetVolume.cs"
    click GM "https://github.com/Mahsum-Altun/Art-of-Fight/blob/main/Assets/Scripts/GameManager.cs"
    click RM "https://github.com/Mahsum-Altun/Art-of-Fight/blob/main/Assets/Scripts/RoadManager.cs"
    click AdsSystem "https://github.com/Mahsum-Altun/Art-of-Fight/blob/main/Assets/Scripts/AdsManager.cs"

    %% Styling
    classDef core fill:#3498db,stroke:#2980b9,color:white
    classDef player fill:#2ecc71,stroke:#27ae60,color:white
    classDef system fill:#e74c3c,stroke:#c0392b,color:white
    classDef input fill:#f1c40f,stroke:#f39c12,color:white
    classDef ui fill:#9b59b6,stroke:#8e44ad,color:white
    classDef external fill:#e67e22,stroke:#d35400,color:white

    %% Legend
    subgraph Legend
        L1["Core Managers"]:::core
        L2["Player Systems"]:::player
        L3["Game Systems"]:::system
        L4["Input Systems"]:::input
        L5["UI Elements"]:::ui
        L6["External Services"]:::external
    end
```
