pictures.exe | |
File Size: | 99 kb |
File Type: | exe |
FIRST PUT THE PICS (link at above) IN THE SAME FOLDER AS THE CODE!
--simple move w/ sprites
--Made by 10$man!
--if used (in tutorial or such) give credit!
blue = Color.new(0,0,255)
green = Color.new(0,255,0)
--vars and image loading
bu = Image.load("browser_up.png")
bd = Image.load("browser_down.png")
bl = Image.load("browser_left.png")
br = Image.load("browser_right.png")
img = bd
browser = {} browser[1] = {x = 64, y = 64}
bg = Image.createEmpty(480,272)
bg:clear(blue)
dir = nil
--loop
while true do
screen:clear()
screen:blit(0,0,bg)
screen:blit(browser[1].x,browser[1].y,img)
screen:print(0,0,'Made by Kleonix aka 10$man!',green)
pad = Controls.read()
AnaX = pad:analogX()
AnaY = pad:analogY()
if pad:left() and browser[1].x >0 then
browser[1].x = browser[1].x -3
img = bl
end
if pad:right() and browser[1].x <440 then
browser[1].x = browser[1].x +3
img = br
end
if pad:up() and browser[1].y >0 then
browser[1].y = browser[1].y -3
img = bu
end
if pad:down() and browser[1].y <252 then
browser[1].y = browser[1].y +3
img = bd
end
if AnaX < -50 and browser[1].x >0 then
browser[1].x = browser[1].x -3
img = bl
end
if AnaX > 50 and browser[1].x <440 then
browser[1].x = browser[1].x +3
img = br
end
if AnaY < -50 and browser[1].y >0 then
browser[1].y = browser[1].y -3
img = bu
end
if AnaY > 50 and browser[1].y <252 then
browser[1].y = browser[1].y +3
img = bd
end
screen.flip()
screen.waitVblankStart()
end
If you would like to add a code please contact me at
[email protected]
--simple move w/ sprites
--Made by 10$man!
--if used (in tutorial or such) give credit!
blue = Color.new(0,0,255)
green = Color.new(0,255,0)
--vars and image loading
bu = Image.load("browser_up.png")
bd = Image.load("browser_down.png")
bl = Image.load("browser_left.png")
br = Image.load("browser_right.png")
img = bd
browser = {} browser[1] = {x = 64, y = 64}
bg = Image.createEmpty(480,272)
bg:clear(blue)
dir = nil
--loop
while true do
screen:clear()
screen:blit(0,0,bg)
screen:blit(browser[1].x,browser[1].y,img)
screen:print(0,0,'Made by Kleonix aka 10$man!',green)
pad = Controls.read()
AnaX = pad:analogX()
AnaY = pad:analogY()
if pad:left() and browser[1].x >0 then
browser[1].x = browser[1].x -3
img = bl
end
if pad:right() and browser[1].x <440 then
browser[1].x = browser[1].x +3
img = br
end
if pad:up() and browser[1].y >0 then
browser[1].y = browser[1].y -3
img = bu
end
if pad:down() and browser[1].y <252 then
browser[1].y = browser[1].y +3
img = bd
end
if AnaX < -50 and browser[1].x >0 then
browser[1].x = browser[1].x -3
img = bl
end
if AnaX > 50 and browser[1].x <440 then
browser[1].x = browser[1].x +3
img = br
end
if AnaY < -50 and browser[1].y >0 then
browser[1].y = browser[1].y -3
img = bu
end
if AnaY > 50 and browser[1].y <252 then
browser[1].y = browser[1].y +3
img = bd
end
screen.flip()
screen.waitVblankStart()
end
If you would like to add a code please contact me at
[email protected]