# ebeksynthsei/research architecture

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

- Interactive diagram: https://gitdiagram.com/ebeksynthsei/research
- Repository: https://github.com/ebeksynthsei/research

## Overview

##### Core Systems Layer
- CORE Manager (Central orchestrator)
- Input Management System
- Scene Management System
- Event System (EVS - Event Management)
- Camera Behaviour System

##### Player Systems Layer
- Player State Machine
- Super States (Ground, Air, Wall, Ability)
- Sub States (Idle, Move, Jump, Attack, etc.)
- Player Components
- Movement
- Combat
- Animation
- Inventory

##### Enemy Systems Layer
- Enemy State Machine
- Common States (Idle, Move, Attack, Dead)
- Enemy-Specific States
- Enemy Types
- EOne (First enemy type)
- ETwo (Second enemy type)

##### Interaction Systems
- Dialogue System
- Graph-based Dialog Controller
- UI Controller
- Language Controller
- Asset System
- Barrel Manager
- Interactable Objects

##### Data Management Layer
- ScriptableObjects
- Entity Data
- State Data
- Weapon Data
- Dialogue Trees
- Event System
- Game Events
- Event Listeners

##### FSM Architecture
- State machine pattern used for both player and enemies
- Inheritance hierarchy of states
- State transitions

##### Event System
- Event-driven communication between components
- How the EVS system connects different parts
- Event flow for interactions

##### Scriptable Object Architecture
- Demonstrate how data flows from ScriptableObjects to components
- Relationship between events and their listeners
- Configuration points for designers

##### Scene Management
- Scene transitions
- How managers persist between scenes
- Scene-specific components

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and Classes
    classDef core fill:#3498db,stroke:#2980b9,color:white
    classDef player fill:#2ecc71,stroke:#27ae60,color:white
    classDef enemy fill:#e74c3c,stroke:#c0392b,color:white
    classDef interaction fill:#f1c40f,stroke:#f39c12,color:black
    classDef data fill:#9b59b6,stroke:#8e44ad,color:white

    %% Core Systems Layer
    subgraph CoreSystems
        CORE[CORE Manager]:::core
        Input[Input Management]:::core
        Scene[Scene Management]:::core
        EVS[Event System]:::core
        Camera[Camera Behaviour]:::core
    end

    %% Player Systems Layer
    subgraph PlayerSystems
        PSM[Player State Machine]:::player
        subgraph PlayerStates
            SuperStates{"Super States"}:::player
            SubStates{"Sub States"}:::player
        end
        
        subgraph PlayerComponents
            Movement[Movement]:::player
            Combat[Combat]:::player
            Animation[Animation]:::player
            Inventory[Inventory]:::player
        end
    end

    %% Enemy Systems Layer
    subgraph EnemySystems
        ESM[Enemy State Machine]:::enemy
        subgraph EnemyTypes
            EOne[EOne]:::enemy
            ETwo[ETwo]:::enemy
        end
    end

    %% Interaction Systems Layer
    subgraph InteractionSystems
        subgraph DialogueSystem
            DialogGraph[Graph Controller]:::interaction
            UIControl[UI Controller]:::interaction
            LangControl[Language Controller]:::interaction
        end
        
        subgraph MapSystem
            BarrelMng[Barrel Manager]:::interaction
            Interactables[Interactable Objects]:::interaction
        end
    end

    %% Data Management Layer
    subgraph DataManagement
        subgraph ScriptableObjects
            EntityData[(Entity Data)]:::data
            StateData[(State Data)]:::data
            WeaponData[(Weapon Data)]:::data
            DialogueData[(Dialogue Trees)]:::data
        end
        
        subgraph EventSystem
            GameEvents[Game Events]:::data
            EventListeners[Event Listeners]:::data
        end
    end

    %% Relationships
    CORE --> |Manages| Input
    CORE --> |Manages| Scene
    CORE --> |Manages| Camera
    CORE --> |Orchestrates| EVS

    PSM --> SuperStates
    SuperStates --> SubStates
    PSM --> PlayerComponents

    ESM --> EnemyTypes
    
    DialogGraph --> UIControl
    DialogGraph --> LangControl
    
    EVS --> GameEvents
    GameEvents --> EventListeners

    %% Click Events
    click CORE "https://github.com/EbekSynthsei/Research/blob/main/Assets/GameBase/CORE/CORE.cs"
    click Input "https://github.com/EbekSynthsei/Research/blob/main/Assets/GameBase/MNG/InputManager.cs"
    click Scene "https://github.com/EbekSynthsei/Research/blob/main/Assets/GameBase/MNG/SceneInstantiate.cs"
    click EVS "https://github.com/EbekSynthsei/Research/tree/main/Assets/EVS/GameEvents"
    click Camera "https://github.com/EbekSynthsei/Research/blob/main/Assets/GameBase/MNG/CameraBehaviourManager.cs"
    click PSM "https://github.com/EbekSynthsei/Research/tree/main/Assets/GameBase/Player/PlayerStates"
    click PlayerComponents "https://github.com/EbekSynthsei/Research/tree/main/Assets/GameBase/Player"
    click EOne "https://github.com/EbekSynthsei/Research/tree/main/Assets/GameBase/Enemy/EnemySpecific/EOne"
    click ETwo "https://github.com/EbekSynthsei/Research/tree/main/Assets/GameBase/Enemy/EnemySpecific/ETwo"
    click DialogGraph "https://github.com/EbekSynthsei/Research/blob/main/Assets/Plugins/LKDialogueGraph/DialogueGraph/DialogueController.cs"
    click UIControl "https://github.com/EbekSynthsei/Research/blob/main/Assets/Plugins/LKDialogueGraph/DialogueGraph/UIController.cs"
    click LangControl "https://github.com/EbekSynthsei/Research/blob/main/Assets/Plugins/LKDialogueGraph/DialogueGraph/LanguageController.cs"
    click BarrelMng "https://github.com/EbekSynthsei/Research/blob/main/Assets/MapAssetEditor/BarrelManager.cs"
    click Interactables "https://github.com/EbekSynthsei/Research/blob/main/Assets/GameBase/Interfaces/IInteractable.cs"
    click ScriptableObjects "https://github.com/EbekSynthsei/Research/tree/main/Assets/GameBase/ScriptableObjects"
    click EventListeners "https://github.com/EbekSynthsei/Research/tree/main/Assets/EVS/GameEvents/Listeners"
```
