-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6808afc
commit 52b3b5f
Showing
5 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
YOU ARE DEAD | ||
You died | ||
What a shame... | ||
Looser | ||
Loser | ||
RIP | ||
You have a nice corpse | ||
Darkness engulfs you | ||
Fade to red | ||
Fade to lava | ||
Fade to black | ||
Sizzle sizzle | ||
Toasty | ||
Hot stuff | ||
Lava, don't breathe this | ||
It Burns! it Burns! | ||
Too hot to handle | ||
Lava, don't touch this | ||
Red = danger | ||
Ouch | ||
Humans cause global warming | ||
You look like steak | ||
Game over | ||
Critical fail | ||
Epic fail | ||
Keep practicing... | ||
Nice one, dumbass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
YOU ARE DEAD | ||
You died | ||
What a shame... | ||
Looser | ||
You have a nice corpse | ||
Brainzzzzz | ||
Braaaaainz | ||
Darkness engulfs you | ||
Fade to green | ||
Fade to zombie | ||
Fade to black | ||
They can smell you | ||
Nom nom | ||
You are delicious | ||
Lava kills faster | ||
YOU ARE UNDEAD | ||
Rawr | ||
Eating your insides | ||
One less human | ||
I am not a cannibal! | ||
Zombies have needs | ||
Zombies are people too | ||
You had a good run | ||
Death comes for us all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
options_menu_state = MenuState() | ||
|
||
function options_menu_state:init() | ||
self.items = {'fullscreen', 'vsync', 'back to main menu'} | ||
self:get_window_mode() | ||
end | ||
|
||
function options_menu_state:enter() | ||
self:get_window_mode() | ||
end | ||
|
||
function options_menu_state:draw() | ||
love.graphics.setBackgroundColor(self.bg) | ||
love.graphics.print("Options...", 20, 20) | ||
|
||
love.graphics.setColor(255,255,255) | ||
for i = 1, #self.items do | ||
local string = self.items[i] | ||
|
||
if string == 'fullscreen' then | ||
if self.window_mode.fullscreen then string = string..': [ON] off' else string = string..': on [OFF]' end | ||
elseif string == 'vsync' then | ||
if self.window_mode.vsync then string = string..': [ON] off' else string = string..': on [OFF]' end | ||
end | ||
|
||
if i == self.index then string = "> "..string end | ||
|
||
love.graphics.print(string, 20, 60 + 20 * i) | ||
end | ||
end | ||
|
||
options_menu_state['fullscreen'] = function(self, keycode, scancode, isrepeat) | ||
if scancode == 'space' or scancode == 'return' then | ||
if not self.window_mode.fullscreen then | ||
love.window.setMode( love.graphics.getWidth(), love.graphics.getHeight(), {fullscreen=true} ) | ||
else | ||
love.window.setMode( 800, 600, {fullscreen=false} ) | ||
end | ||
self:get_window_mode() | ||
end | ||
end | ||
|
||
options_menu_state['vsync'] = function(self, keycode, scancode, isrepeat) | ||
if scancode == 'space' or scancode == 'return' then | ||
if not self.window_mode.vsync then | ||
love.window.setMode( love.graphics.getWidth(), love.graphics.getHeight(), {vsync=true, fullscreen=self.window_mode.fullscreen} ) | ||
else | ||
love.window.setMode( love.graphics.getWidth(), love.graphics.getHeight(), {vsync=false, fullscreen=self.window_mode.fullscreen} ) | ||
end | ||
self:get_window_mode() | ||
end | ||
end | ||
|
||
options_menu_state['back to main menu'] = function(self, keycode, scancode, isrepeat) | ||
if scancode == 'space' or scancode == 'return' then | ||
Gamestate.switch(main_menu_state) | ||
end | ||
end | ||
|
||
function options_menu_state:get_window_mode() | ||
local x, y = 0, 0 | ||
x, y, self.window_mode = love.window.getMode() | ||
end |