Code: Select all
wf = require('windfield')
world = wf.newWorld(0, 0, true)
world:setGravity(0, 0)
bread = love.graphics.newImage("Resourse/Item/bred.png")
require('Script/Player')
require('Script/Title')
require('Script/Camera')
require('Script/Map')
require('Script/DrawMap')
require('Script/inventory')
require('Script/Itemlist')
require('Script/hotbar')
hb = love.graphics.newImage("Resourse/inventory/hotbar.png")
local inventoryofthebaronthegalaxy = love.graphics.newImage("Resourse/inventory/inventory.png")
love.graphics.translate((-player.x * 2.5)+360, (-player.y * 2.5)+250)
love.graphics.scale(1 / camera.scaleX, 1 / camera.scaleY)
draw_map()
player.draw(player)
if inv == 1 then
love.graphics.draw(inventoryofthebaronthegalaxy,player.x-110,player.y+50,0,0.6,0.6)
for i = 0, 9 do
love.graphics.rectangle("fill", player.x-100+(23*i), player.y+55, 20, 20 )
end
for i = 0, 9 do
love.graphics.rectangle("fill", player.x-100+(23*i), player.y+80, 20, 20 )
end
if invslot1_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*0),player.y+55,0,0.3,0.3)
end
if invslot2_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*1),player.y+55,0,0.3,0.3)
end
if invslot3_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*2),player.y+55,0,0.3,0.3)
end
if invslot4_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*3),player.y+55,0,0.3,0.3)
end
if invslot5_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*4),player.y+55,0,0.3,0.3)
end
if invslot6_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*5),player.y+55,0,0.3,0.3)
end
if invslot7_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*6),player.y+55,0,0.3,0.3)
end
if invslot8_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*7),player.y+55,0,0.3,0.3)
end
if invslot9_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*8),player.y+55,0,0.3,0.3)
end
if invslot10_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*9),player.y+55,0,0.3,0.3)
end
if invslot11_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*0),player.y+80,0,0.3,0.3)
end
if invslot12_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*1),player.y+80,0,0.3,0.3)
end
if invslot13_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*2),player.y+80,0,0.3,0.3)
end
if invslot14_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*3),player.y+80,0,0.3,0.3)
end
if invslot15_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*4),player.y+80,0,0.3,0.3)
end
if invslot16_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*5),player.y+80,0,0.3,0.3)
end
if invslot17_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*6),player.y+80,0,0.3,0.3)
end
if invslot18_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*7),player.y+80,0,0.3,0.3)
end
if invslot19_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*8),player.y+80,0,0.3,0.3)
end
if invslot11_ID ~= 0 then
love.graphics.draw(bread,player.x-100+(23*9),player.y+80,0,0.3,0.3)
end
end
love.graphics.draw(hb, 0, 0)
love.graphics.scale( 0.4, 0.4 )
function love.update(dt)
player:update(dt)
world:update(dt)
end