You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
809 B
29 lines
809 B
User_Interface = Object:extend()
|
|
|
|
--Set game canvas size
|
|
function User_Interface:new(window_width, window_height)
|
|
self.playableSpace = { window_width, window_height, (window_width * 0.25) }
|
|
self.score = 0
|
|
|
|
love.window.setMode((window_width * 1.5), window_height)
|
|
end
|
|
--set window size
|
|
|
|
function User_Interface:draw()
|
|
local left_line = self.playableSpace[3]
|
|
local right_line = self.playableSpace[1] + self.playableSpace[3]
|
|
local window_height = self.playableSpace[2]
|
|
love.graphics.line(left_line, 0, left_line, window_height)
|
|
love.graphics.line(right_line, 0, right_line, window_height)
|
|
end
|
|
|
|
--set
|
|
|
|
--display the score
|
|
|
|
--display player health
|
|
|
|
function User_Interface:returnBounds()
|
|
--return left and right lines
|
|
return { self.playableSpace[3], (self.playableSpace[1] + self.playableSpace[3]) }
|
|
end
|
|
|