Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- blanc = Color.create(255,255,255)
- y_ligne = 100
- x_ligne = 55
- compteur = 0
- function ligne(x,y,color)
- g2d.BeginLines(g2d.STRIP)
- g2d.SetColor(color)
- g2d.SetCoordXY(x, y)
- g2d.Add()
- g2d.SetCoordXYRelative(x_ligne, y_ligne)
- g2d.Add()
- g2d.End()
- end
- while true do
- g2d.Clear()
- pad = Ctrl.read()
- ligne(65,120,blanc)
- if compteur == 0 and y_ligne > 40 then
- y_ligne = y_ligne-2
- x_ligne = x_ligne-2
- end
- if y_ligne == 40 then compteur = 1 end
- if compteur == 1 and y_ligne < 100 then
- y_ligne = y_ligne+2
- x_ligne = x_ligne+2
- end
- g2d.Flip()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement