- [NEW] Convertit a mini v1.0 RC2
This commit is contained in:
@@ -38,36 +38,36 @@ balloon={
|
||||
if below==nil or below==false then
|
||||
balloon.rect.y=balloon.rect.y-balloon.rect.h-16
|
||||
local x,y,w,h=balloon.rect.x,balloon.rect.y,balloon.rect.w,balloon.rect.h
|
||||
rectfill(x+1,y+1,x+w+1,y+h+1,5)
|
||||
rectfill(x,y,x+w,y+h,8)
|
||||
rect(x,y,x+w,y+h,6)
|
||||
draw.rectf(x+1,y+1,w+1,h+1,5)
|
||||
draw.rectf(x,y,w+1,h+1,8)
|
||||
draw.rect(x,y,w+1,h+1,6)
|
||||
|
||||
if pos<80 then
|
||||
for i=0,4 do rect(pos,y+h+(4-i),pos+i,y+h+(4-i),8) end
|
||||
line(pos-1,y+h+1,pos-1,y+h+6,6)
|
||||
line(pos+4,y+h+1,pos-1,y+h+6,6)
|
||||
for i=0,4 do draw.rect(pos,y+h+(4-i),i+1,2,8) end
|
||||
draw.line(pos-1,y+h+1,pos-1,y+h+6,6)
|
||||
draw.line(pos+4,y+h+1,pos-1,y+h+6,6)
|
||||
else
|
||||
pos=pos-5
|
||||
for i=0,4 do rect(pos+i,y+h+i,pos+4,y+h+i,8) end
|
||||
line(pos+5,y+h+1,pos+5,y+h+6,6)
|
||||
line(pos,y+h+1,pos+5,y+h+6,6)
|
||||
for i=0,4 do draw.rect(pos+i,y+h+i,5-i,2,8) end
|
||||
draw.line(pos+5,y+h+1,pos+5,y+h+6,6)
|
||||
draw.line(pos,y+h+1,pos+5,y+h+6,6)
|
||||
end
|
||||
else
|
||||
balloon.rect.y=balloon.rect.y+16
|
||||
local x,y,w,h=balloon.rect.x,balloon.rect.y,balloon.rect.w,balloon.rect.h
|
||||
rectfill(x+1,y+1,x+w+1,y+h+1,5)
|
||||
rectfill(x,y,x+w,y+h,8)
|
||||
rect(x,y,x+w,y+h,6)
|
||||
draw.rectf(x+1,y+1,w+1,h+1,5)
|
||||
draw.rectf(x,y,w+1,h+1,8)
|
||||
draw.rect(x,y,w+1,h+1,6)
|
||||
|
||||
if pos<80 then
|
||||
for i=0,4 do rect(pos,y-(4-i),pos+i,y-(4-i),8) end
|
||||
line(pos-1,y,pos-1,y-6,6)
|
||||
line(pos+5,y,pos-1,y-6,6)
|
||||
for i=0,4 do draw.rect(pos,y-(4-i),i+1,2,8) end
|
||||
draw.line(pos-1,y,pos-1,y-6,6)
|
||||
draw.line(pos+5,y,pos-1,y-6,6)
|
||||
else
|
||||
pos=pos-5
|
||||
for i=0,4 do rect(pos+i,y-i,pos+4,y-i,8) end
|
||||
line(pos+5,y,pos+5,y-6,6)
|
||||
line(pos-1,y,pos+5,y-6,6)
|
||||
for i=0,4 do draw.rect(pos+i,y-i,5-i,2,8) end
|
||||
draw.line(pos+5,y,pos+5,y-6,6)
|
||||
draw.line(pos-1,y,pos+5,y-6,6)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -87,15 +87,15 @@ balloon={
|
||||
update=balloon.update
|
||||
|
||||
local x,y,w,h=balloon.rect.x,balloon.rect.y,balloon.rect.w,balloon.rect.h
|
||||
rectfill(x+1,y+1,x+w+1,y+h+1,5)
|
||||
rectfill(x,y,x+w,y+h,15)
|
||||
rect(x,y,x+w,y+h,6)
|
||||
draw.rectf(x+1,y+1,w+1,h+1,5)
|
||||
draw.rectf(x,y,w+1,h+1,15)
|
||||
draw.rect(x,y,w+1,h+1,6)
|
||||
|
||||
balloon.cursor={x=balloon.rect.x+12,y=balloon.rect.y+11}
|
||||
end,
|
||||
|
||||
update=function()
|
||||
if anykey() then
|
||||
if key.any() then
|
||||
if balloon.pos<0 then
|
||||
update=balloon.old_update
|
||||
update()
|
||||
@@ -105,20 +105,20 @@ balloon={
|
||||
end
|
||||
end
|
||||
|
||||
if not beat() and not balloon.quick then return end
|
||||
if not sys.beat() and not balloon.quick then return end
|
||||
|
||||
if balloon.pos<0 then
|
||||
if balloon.obj then
|
||||
setsource(objectes)
|
||||
blit(balloon.obj.x,balloon.obj.y,16,16,balloon.rect.x+balloon.rect.w-28,balloon.rect.y+10)
|
||||
surf.source(objectes)
|
||||
draw.surf(balloon.obj.x,balloon.obj.y,16,16,balloon.rect.x+balloon.rect.w-28,balloon.rect.y+10)
|
||||
end
|
||||
local col=8
|
||||
if math.floor(time()*4)%2==0 then col=10 end
|
||||
if math.floor(sys.time()*4)%2==0 then col=10 end
|
||||
local x,y=balloon.rect.x+balloon.rect.w-8, balloon.rect.y+balloon.rect.h-6
|
||||
line(x,y,x+4,y,col)
|
||||
line(x+1,y+1,x+3,y+1,col)
|
||||
line(x+2,y+2,x+2,y+2,col)
|
||||
if btnp(KEY_SPACE) then
|
||||
draw.line(x,y,x+4,y,col)
|
||||
draw.line(x+1,y+1,x+3,y+1,col)
|
||||
draw.line(x+2,y+2,x+2,y+2,col)
|
||||
if key.press(key.SPACE) then
|
||||
update=balloon.old_update
|
||||
end
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user