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
597 B
29 lines
597 B
function love.load()
|
|
Object = require("scripts.classic")
|
|
--require("blaster")
|
|
require("entities.player")
|
|
require("entities.enemy")
|
|
|
|
local window_width = love.graphics.getWidth()
|
|
local window_height = love.graphics.getHeight()
|
|
|
|
player = Player(window_width / 2, window_height * 0.8)
|
|
enemy = Enemy(100, 100, 70)
|
|
|
|
--set background for space!
|
|
love.graphics.setBackgroundColor(27 / 255, 51 / 255, 85 / 255)
|
|
end
|
|
|
|
function love.update(dt)
|
|
player:update(dt)
|
|
enemy:update(dt)
|
|
end
|
|
|
|
function love.draw()
|
|
player:draw()
|
|
enemy:draw()
|
|
end
|
|
|
|
function love.keypressed(key)
|
|
player:keyPressed(key)
|
|
end
|
|
|