-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent.lua
More file actions
73 lines (45 loc) · 1.07 KB
/
Copy pathcontent.lua
File metadata and controls
73 lines (45 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
-- Gestion of contents Ulysse.B
local numberImage = 2
local img = {}
function loadContent( )
ok = true;
ok = loadImage()
return ok
end
function getPatchCollision( MapName )
-- body
end
function getCollision( MapName )
end
function getImage( id )
return img[tonumber(id)]
end
function loadImagePlayer( )
print("Player image load...")
player_img = {}
directory = "image/"
player_img[#player_img + 1] = love.graphics.newImage(directory .. "perso01.png")
print("Player image is load")
return player_img
end
--Load every picture for the game
function loadImage()
print("Load Content...")
for i=1,numberImage do
patch = "image/" .. tostring(i) .. ".png"
-- si patch exist
if(love.filesystem.exists( patch )) then
img[i] = love.graphics.newImage(patch)
print(patch .. " be load")
else
print(patch.. " not exist")
end
end
return true
end
function getSizeXOfImage( image )
return image:getWidth()
end
function getSizeYOfImage( img )
return img:getHeight()
end