Hello all, i'm playing around with the wallpaper library and i'm trying to create an Aquarium Live Wallpaper, i have an image of a bubble and would like to create an effect where the bubbles start from the bottom of the screen and continue all the way up to the top of the screen, so far this is the code i have, i'm able to draw the bubbles on the canvas, but can not figure how to make the bubbles move up at different speeds.
any and all help will be greatly appreciated, i have the concept in my head but can not put it into code, help please
Hope someone can shed some light for me.
Thank you all
Walter
any and all help will be greatly appreciated, i have the concept in my head but can not put it into code, help please
B4X:
Sub lwm_Tick (Engine as LWEngine)
for i = 0 to bubbles.lenght -1
Engine.canvas.DrawBitmap(bubbles(i), null, rc(i)) 'rc = rect
rise(ii) = bubbley + bubblespeed(ii)
rc(i).Initialize(bubblex(i), bubble(i)-10, bubblex(i), rise(ii)-10) 'here's where i substract 10 to the top and bottom of the rect every iteration so make bubbles move up, but nothing happens.
Engine.Canvas.DrawBitmap(bubbles(i), null, rc(i))
ii = ii + 1
if ii > 29 then ii = 0
Engine.RefreshAll
next
Hope someone can shed some light for me.
Thank you all
Walter