# kucheu/looptrain architecture

> Architecture diagram of the GitHub repository kucheu/looptrain, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kucheu/looptrain
- Repository: https://github.com/kucheu/looptrain

## Overview

This appears to be a Unity game centered on a moving train, wagon weapons, waves of enemies, and upgrades. The likely player journey is to enter gameplay, survive enemy waves using the train and its wagons, collect progression, and choose upgrades. The tree also shows menu, health, audio, and game-state systems. No README or source excerpts were provided, so the component roles are inferred from names; relationships between components are omitted where their wiring cannot be verified.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_menus["Menus and UI"]
  node_mainmenu["Main Menu UI<br/>[MainMenuUI.cs]"]
  node_gameui["Gameplay UI<br/>[GameMenuUI.cs]"]
  node_pause["Pause Menu<br/>[PauseMenuUI.cs]"]
  node_settings["Settings UI<br/>[SettingsUI.cs]"]
  node_upgradeui["Upgrade UI<br/>[UpgradeMenu.cs]"]
end

subgraph group_gameplay["Gameplay Runtime"]
  node_gameplaymanager["Gameplay Manager<br/>[GameplayManager.cs]"]
  node_gamestate["Game State<br/>[GameState.cs]"]
  node_train["Train Movement"]
  node_wagons["Wagon Controller<br/>[WagonController.cs]"]
  node_weapons["Wagon Weapons"]
  node_health["Health System"]
  node_waves["Wave Manager<br/>[WaveManager.cs]"]
  node_enemy["Enemy Behavior<br/>[Enemy.cs]"]
  node_audio["Sound Manager<br/>[SoundManager.cs]"]
end

subgraph group_progression["Progression"]
  node_upgrademanager["Upgrade Manager<br/>[UpgradeManager.cs]"]
  node_upgradeassets["Upgrade Definitions"]
  node_stats["Player Stats<br/>[StatsManager.cs]"]
  node_experience["Experience"]
end

subgraph group_content["Game Content"]
  node_enemydata["Enemy Definitions<br/>[EnemyData.cs]"]
  node_enemyassets["Enemy Assets"]
  node_wagondata["Wagon Definitions<br/>[WagonData.cs]"]
  node_wagonassets["Wagon Assets"]
end

node_player(("Player"))

click node_mainmenu "https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/MainMenuUI.cs"
click node_gameui "https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/GameMenuUI.cs"
click node_pause "https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/PauseMenuUI.cs"
click node_settings "https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/SettingsUI.cs"
click node_upgradeui "https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/Upgrades/UpgradeMenu.cs"
click node_gameplaymanager "https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/GameplayManager.cs"
click node_gamestate "https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/GameState.cs"
click node_train "https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/TrainMovementController.cs"
click node_wagons "https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/WagonController.cs"
click node_weapons "https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/WagonWeaponManager.cs"
click node_health "https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/HealthController.cs"
click node_waves "https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/WaveManager.cs"
click node_enemy "https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/Enemy.cs"
click node_enemydata "https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/EnemyData.cs"
click node_enemyassets "https://github.com/kucheu/looptrain/tree/master/Assets/ScriptableObjects/Enemies"
click node_wagondata "https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/WagonData.cs"
click node_wagonassets "https://github.com/kucheu/looptrain/tree/master/Assets/ScriptableObjects/Wagons"
click node_upgrademanager "https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/Upgrades/UpgradeManager.cs"
click node_upgradeassets "https://github.com/kucheu/looptrain/tree/master/Assets/ScriptableObjects/Upgrades"
click node_stats "https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/StatsManager.cs"
click node_experience "https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/ExperienceManager.cs"
click node_audio "https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/SoundManager.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mainmenu,node_gameui,node_pause,node_settings,node_upgradeui toneBlue
class node_gameplaymanager,node_gamestate,node_train,node_wagons,node_weapons,node_health,node_waves,node_enemy,node_audio toneAmber
class node_upgrademanager,node_upgradeassets,node_stats,node_experience toneMint
class node_enemydata,node_enemyassets,node_wagondata,node_wagonassets toneRose
class node_player toneIndigo
```

## Components

### Menus and UI

- [Main Menu UI](https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/MainMenuUI.cs): `Assets/Scripts/MainMenuUI.cs`
- [Gameplay UI](https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/GameMenuUI.cs): `Assets/Scripts/GameMenuUI.cs`
- [Pause Menu](https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/PauseMenuUI.cs): `Assets/Scripts/PauseMenuUI.cs`
- [Settings UI](https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/SettingsUI.cs): `Assets/Scripts/SettingsUI.cs`
- [Upgrade UI](https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/Upgrades/UpgradeMenu.cs): `Assets/Scripts/Upgrades/UpgradeMenu.cs`

### Gameplay Runtime

- [Gameplay Manager](https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/GameplayManager.cs): `Assets/Scripts/GameplayManager.cs`
- [Game State](https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/GameState.cs): `Assets/Scripts/GameState.cs`
- [Train Movement](https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/TrainMovementController.cs): `Assets/Scripts/TrainMovementController.cs`
- [Wagon Controller](https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/WagonController.cs): `Assets/Scripts/WagonController.cs`
- [Wagon Weapons](https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/WagonWeaponManager.cs): `Assets/Scripts/WagonWeaponManager.cs`
- [Health System](https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/HealthController.cs): `Assets/Scripts/HealthController.cs`
- [Wave Manager](https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/WaveManager.cs): `Assets/Scripts/WaveManager.cs`
- [Enemy Behavior](https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/Enemy.cs): `Assets/Scripts/Enemy.cs`
- [Sound Manager](https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/SoundManager.cs): `Assets/Scripts/SoundManager.cs`

### Progression

- [Upgrade Manager](https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/Upgrades/UpgradeManager.cs): `Assets/Scripts/Upgrades/UpgradeManager.cs`
- [Upgrade Definitions](https://github.com/kucheu/looptrain/tree/master/Assets/ScriptableObjects/Upgrades): `Assets/ScriptableObjects/Upgrades`
- [Player Stats](https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/StatsManager.cs): `Assets/Scripts/StatsManager.cs`
- [Experience](https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/ExperienceManager.cs): `Assets/Scripts/ExperienceManager.cs`

### Game Content

- [Enemy Definitions](https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/EnemyData.cs): `Assets/Scripts/EnemyData.cs`
- [Enemy Assets](https://github.com/kucheu/looptrain/tree/master/Assets/ScriptableObjects/Enemies): `Assets/ScriptableObjects/Enemies`
- [Wagon Definitions](https://github.com/kucheu/looptrain/blob/master/Assets/Scripts/WagonData.cs): `Assets/Scripts/WagonData.cs`
- [Wagon Assets](https://github.com/kucheu/looptrain/tree/master/Assets/ScriptableObjects/Wagons): `Assets/ScriptableObjects/Wagons`

### Other components

- **Player**
