Diagramme de classe UML - ThePension/poutinestyle GitHub Wiki

classDiagram
    GameState <|-- StateMainMenu
    GameState <|-- StateGameOverMenu
    GameState <|-- StatePlayGame
    GameManager "1" *-- "1..*" GameState
    StateMainMenu "0..1" o-- "1..*" Button
    StateGameOverMenu "0..1" o-- "1..*" Button
    StatePlayGame "1" o-- "1" Player
    StatePlayGame "1" o-- "1..*" Ennemy
    Player "1" o-- "1..*" Weapon
    Ennemy "1" o-- "1" Weapon
    class GameManager{
        -stack<GameState*> gameStates
        -sf::RenderWindow window
        +pushState(GameState* state) void
        +popState() void
        +changeState(GameState* state) void
        +peekState() GameState
        +gameLoop() void
    }
    class GameState{
        <<abstract>>
        +GameManager game
        +GameState()
        +~GameState()
        +handleInput()* void
        +update()* void
        +draw()* void
    }
    class StatePlayGame{
        -Player player
        -bool isPlayerMoving
        -sf::Keyboard::Key keyPressed
        -int mapSize
        -int movingSpeed
        -int blockWidth
        -int blockHeight
        -int oldMouseX
        -char** map
        -list<Ennemy *> ennemies
        -string mapFileFolder
        -string mapFileName
        -sf::RectangleShape block
        -sf::CircleShape player_circle
        -sf::Vector2f playerPosition
        -sf::Vector2f playerDir
        -sf::Vector2f planeVec
        +draw() void
        +handleInput() void
        +parseMap2D() void
        +drawMap2D() void
        +drawMap3D() void
        +matrixMult(sf::Vector2f v, double angle) Vector2f
    }
    class StateGameOverMenu{
        -Button replayButton
        -Button quitButton
        +handleInput() void
        +update() void
        +draw() void
    }
    class StateMainMenu{
        -Button playButton
        -Button settingsButton
        -Button quitButton
        +handleInput() void
        +update() void
        +draw() void
    }
    class Player{
        -double posX
        -double posY
        -double cameraAngle
        -Weapon weapon
        +Player()
        +Player(posX : double, posY : double, camAngle : double)
    }
    class Weapon{
        +double shootCadency
        +int damage
    }
    class Ennemy{
        -Weapon weapon
        -int PV
    }
    class Button{
        -sf::RenderWindow* window
        -sf::Vector2i position
        -int width
        -int height
        -sf::Color color
        -string text
        -sf::RectangleShape topBorder
        -sf::RectangleShape bottomBorder
        -sf::RectangleShape leftBorder
        -sf::RectangleShape rightBorder
        -sf::Text sfText
        -sf::Font font
        -isMouseHovering() bool
        +Button()
        +Button(pos : sf::Vector2i, width : int, height : int, sf::Color color, text : string, sf::RenderWindow* : window)
        +draw() void
        +isClicked() bool
    }
Loading

Version générée automatiquement par Visual Studio 2019

ClassDiagramV2

Cliquez sur le diagramme ci-dessus pour l'agrandir

⚠️ **GitHub.com Fallback** ⚠️