Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StartState should be a singleton #2

Open
DevelopmentHF opened this issue Oct 21, 2024 · 0 comments
Open

StartState should be a singleton #2

DevelopmentHF opened this issue Oct 21, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@DevelopmentHF
Copy link
Owner

Its a bit weird that in EndState.lua we create a new instance of the startstate.

-- Restart the game by pressing space
    if love.keyboard.isDown("space") then
		GameOverFlag = false
        stateManager:switch(LevelState:new())
	elseif GameOverFlag and love.keyboard.isDown("q") then
		print("Return to menu")
		GameOverFlag = false
    	stateManager:switch(StartState:new())
    end
@DevelopmentHF DevelopmentHF added the enhancement New feature or request label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant