# curs-r/minijam152 architecture

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

- Interactive diagram: https://gitdiagram.com/curs-r/minijam152
- Repository: https://github.com/curs-r/minijam152

## Overview

##### Main Components Identification
The project appears to be a Unity game with these key components:

a) Core Systems:
- Game Management System
- Audio System
- Player System
- Spawning System
- UI System

b) Gameplay Elements:
- Player
- Rats
- Cheese
- Projectiles (Balls and Toothpicks)
- Boundaries

**┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐**
- Game Manager   │    │  Audio Manager  │    │ Settings Manager│
- ┘    └─────────────────┘    └─────────────────┘

**┌─────────────┐    ┌─────────────┐    ┌─────────────┐**
- Player    │    │  Spawners   │    │    UI       │
- System    │    │  System     │    │   System    │
- ┘    └─────────────┘    └─────────────┘

**┌─────────┐ ┌─────────┐ ┌─────────┐ ┌──────────┐**
- Player  │ │  Rats   │ │ Cheese  │ │Projectiles│
- ┘ └─────────┘ └─────────┘ └──────────┘

##### Connection Types

**┌─────────────────────────┐**
- Audio System       │
- ┤
- Audio Clips          │
- Audio Objects        │
- Audio Manager        │
- ┘

**┌─────────────────────────┐**
- Spawn System       │
- ┤
- Cheese Spawner       │
- Rat Spawner          │
- Boundary Management  │
- ┘

##### Implementation Details

Key relationships:
- GameManager orchestrating overall game flow
- Audio Manager handling all sound effects
- Spawner systems managing entity creation
- Player interaction with projectiles and cheese
- Rat behavior and movement systems
- UI system displaying score and game state

##### The boundary and deletion systems

This will provide a clear visualization of how the game's components interact while maintaining the appropriate level of abstraction for a Unity game project.

Remember to use Unity-specific iconography where appropriate and maintain clear spacing between components to ensure readability.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Management
        GM[Game Manager]:::manager
        AM[Audio Manager]:::audio
        SM[Settings Manager]:::manager
    end

    subgraph Core
        PS[Player System]:::core
        SS[Spawning System]:::core
        US[UI System]:::ui
    end

    subgraph GameObjects
        direction TB
        P[Player]:::object
        R[Rat]:::object
        C[Cheese]:::object
        PR[Projectiles]:::object
        B[Boundaries]:::object
    end

    subgraph AudioComponents
        AC[Audio Clips]:::audio
        AO[Audio Objects]:::audio
    end

    subgraph SpawnSystem
        CS[Cheese Spawner]:::spawn
        RS[Rat Spawner]:::spawn
        BM[Boundary Management]:::spawn
    end

    %% Management Layer Connections
    GM --> PS
    GM --> SS
    GM --> US
    GM --> AM

    %% Core Layer Connections
    PS --> P
    SS --> CS
    SS --> RS
    SS --> BM

    %% Spawn System Connections
    CS -.->|Spawns| C
    RS -.->|Spawns| R
    BM -.->|Manages| B

    %% Audio System Connections
    AM --> AC
    AM --> AO

    %% Game Object Interactions
    P -->|Controls| PR
    P -->|Collects| C
    R -->|Chases| C
    B -->|Constrains| P
    B -->|Deletes| C

    %% UI Connections
    US -->|Displays| GM

    %% Click Events
    click GM "https://github.com/CURS-R/MiniJam152/blob/main/Assets/Scripts/GameManager.cs"
    click AM "https://github.com/CURS-R/MiniJam152/blob/main/Assets/Scripts/Audio/AudioManager.cs"
    click SM "https://github.com/CURS-R/MiniJam152/blob/main/Assets/Scripts/SettingsManager.cs"
    click PS "https://github.com/CURS-R/MiniJam152/blob/main/Assets/Scripts/PlayerScript.cs"
    click SS "https://github.com/CURS-R/MiniJam152/blob/main/Assets/Scripts/Spawner.cs"
    click US "https://github.com/CURS-R/MiniJam152/blob/main/Assets/Scripts/GameOverAndTimerManager.cs"
    click P "https://github.com/CURS-R/MiniJam152/blob/main/Assets/Prefabs/Player.prefab"
    click R "https://github.com/CURS-R/MiniJam152/blob/main/Assets/Scripts/Rat/Rat.cs"
    click C "https://github.com/CURS-R/MiniJam152/blob/main/Assets/Scripts/Cheese.cs"
    click PR "https://github.com/CURS-R/MiniJam152/blob/main/Assets/Scripts/Projectile.cs"
    click B "https://github.com/CURS-R/MiniJam152/blob/main/Assets/Scripts/Base/Boundary.cs"
    click CS "https://github.com/CURS-R/MiniJam152/blob/main/Assets/Prefabs/CheeseSpawner.prefab"
    click RS "https://github.com/CURS-R/MiniJam152/blob/main/Assets/Prefabs/RatSpawner.prefab"

    %% Styling
    classDef manager fill:#2374ab
    classDef audio fill:#ffb627
    classDef core fill:#48a9a6
    classDef ui fill:#9649cb
    classDef object fill:#e4572e
    classDef spawn fill:#17bebb
```
