-
Notifications
You must be signed in to change notification settings - Fork 0
/
Assets.lua
64 lines (51 loc) · 1.55 KB
/
Assets.lua
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
-- icon for merchant
merchantIcon = {
x = 0,
y = 0,
img = nil
}
merchantIconHovered = {
x = 0,
y = 0,
img = nil
}
panelBackground = {
x = 0,
y = 0,
img = nil
}
closeIcon = {
x = 0,
y = 0,
img = nil
}
closeIconHovered = {
x = 0,
y = 0,
img = nil
}
granary = {
x = 0,
y = 0,
img = nil
}
farm = {
x = 0,
y = 0,
img = nil
}
function loadAssets()
-- load textures one time only
merchantIcon.x, merchantIcon.y, merchantIcon.img = M2TWEOP.loadTexture(M2TWEOP.getModPath() .. "/eopData/images/merchant_build_icon.dds")
merchantIconHovered.x, merchantIconHovered.y, merchantIconHovered.img =
M2TWEOP.loadTexture(M2TWEOP.getModPath() .. "/eopData/images/merchant_build_icon_hover.dds")
panelBackground.x, panelBackground.y, panelBackground.img =
M2TWEOP.loadTexture(M2TWEOP.getModPath() .. "/eopData/images/SCROLL_BACKGROUND.png")
closeIcon.x, closeIcon.y, closeIcon.img = M2TWEOP.loadTexture(M2TWEOP.getModPath() .."/eopData/images/close.png")
closeIconHovered.x, closeIconHovered.y, closeIconHovered.img = M2TWEOP.loadTexture(M2TWEOP.getModPath() .."/eopData/images/close_hovered.png")
-- =================== BUILDING IMAGES ======================================
granary.x, granary.y, granary.img = M2TWEOP.loadTexture(M2TWEOP.getModPath() .. "/eopData/images/granary.tga")
farm.x, farm.y, farm.img = M2TWEOP.loadTexture(M2TWEOP.getModPath() .. "/eopData/images/mulino.dds")
-- asociate asset to each building ---
FARM.asset = farm
end