package cz.jzitnik.game;

import cz.jzitnik.annotations.State;
import cz.jzitnik.game.objects.Interactable;
import cz.jzitnik.screens.Screen;
import cz.jzitnik.utils.DependencyManager;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;

@RequiredArgsConstructor
@State
public class GameState {
    private final DependencyManager dependencyManager;

    @Getter
    @Setter
    private GameRoom currentRoom;
    @Getter
    @Setter
    private Player player;

    @Getter
    @Setter
    private Interactable interacting;

    @Getter
    private Screen screen;

    public void setScreen(Screen screen) {
        if (screen != null) {
            dependencyManager.inject(screen);
        }
        this.screen = screen;
    }
}
