Custom texture (force) system

This commit is contained in:
KikooDX 2020-02-21 15:35:35 +01:00
parent f59191719d
commit 6b089e4e43
5 changed files with 9 additions and 2 deletions

View File

@ -22,7 +22,9 @@ function love.draw()
end
--draw preview
love.graphics.setColor(1, 1, 1, 0.5)
love.graphics.draw(tiles[selected_tile], clip_mouse_x, clip_mouse_y)
if tiles[selected_tile] then
love.graphics.draw(tiles[selected_tile], clip_mouse_x, clip_mouse_y)
end
--gui
love.graphics.pop()
love.graphics.setColor(0.8, 0.8, 0.8, 1)

BIN
force_img/glue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 B

BIN
force_img/ice.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

View File

@ -4,7 +4,11 @@ tiles = {
love.graphics.newImage(img_path.."ground.png"),
love.graphics.newImage(img_path.."spike.png"),
love.graphics.newImage(img_path.."elevator1.png"),
love.graphics.newImage(img_path.."glue.png"),
love.graphics.newImage(img_path.."ice.png"),
love.graphics.newImage(img_path.."coin.png"),
love.graphics.newImage(img_path.."jitem.png"),
}
tiles_char = { '0', 'v', '^' }
tiles_char = { '0', 'v', '^', '~', '#', 'c', 'j' }
selected_tile = 1

View File

@ -1,4 +1,5 @@
rm -dr img
echo "Repertory 'img' deleted"
cp -r ../platformer/assets-cg/img/ img/ -v
cp force_img/* img/ -v
echo "Done"