How endlizts/reindustry-project works
Project Type and Purpose
• This is a Unity-based 2D action-platformer game (“reindustry-project”) built in C#.
File Structure
• Top-level Unity folders:
• Assets/ (all game content and C# scripts)
• Packages/ (Unity package manifest)
• ProjectSettings/ (engine configuration)
• Under Assets/:
• Animations/, Materials/, Shaders/, Sprites/, Fonts/ – art assets
• Audios/ – sound effects & music
• Prefabs/ – reusable GameObjects (Player, Enemies, Weapons, FX, Pop-up Text)
• Scenes/ – MainMenu.unity and Game.unity (plus associated post-processing profiles)
• Scripts/ – game logic split into Actors (managers & UI controllers), Enemies (AI & spawner), Player (input & mouse-aim), Weapons (guns, bullets, melee), Utilities (health, spawner base class, destroyers)
• Settings/ – 2D render pipeline templates & URP settings
Extract Key Insights from README
• Single-scene Game flow powered by SceneManager
• Input → PlayerController
• Enemy spawns dynamically via EnemySpawner
• Weapons use GunData/MeleeData to drive Gun.cs/Melee.cs logic
• Animators control sprite animations per prefab
• AudioManager centralizes sound playback
Main Components & Their Relationships
A. Engine Core (Unity)
• Input System → feeds PlayerController
• Physics2D → collision detection between Player, Bullets, Enemies, Environment
• Animation System → Animator Controllers in Assets/Animations drive prefab animations
• Rendering (URP2D) → Materials/Shaders render Sprites
• Audio System → clips in Assets/Audios, managed by AudioManager
• Scene Management → loads MainMenu, Game, GameOver
B. Game Systems (C# Layers)
1. Game Flow
– MainMenu.cs → starts Game scene
– Gameover.cs → triggers end state
– Score.cs → UI score updates
2. Player
– PlayerController.cs (movement, double jump)
– RotateTowardMouse.cs (aiming)
– Health.cs & DamageFlash.cs (state & feedback)
3. Combat
– Gun.cs, Melee.cs → fire methods, instantiate Bullet.prefab or melee hit
– GunData/MeleeData → config ScriptableObjects (fire rate, damage)
– Bullet.cs → travel & collision logic
– MeleeHit.cs → hit detection
4. Enemies
– EnemySpawner.cs / Spawner.cs → spawn logic for MeleeEnemy.prefab or Missile.prefab
– EnemyMelee.cs, EnemyPatrol.cs, Missle.cs → AI behaviors
– Health.cs on enemies → death triggers EnemyDeathFx.prefab & score popup
5. Utilities & FX
– HitStop.cs → frame-freeze on hit
– PopupText.prefab + Text.controller → floating damage/score text
– CameraShaker (from EZ Camera Shake) → camera feedback