Animimation Question that I'm haveing difficulties with
Author |
Message |
enimirahi
|
Posted: Sat Apr 18, 2009 12:22 pm Post subject: Animimation Question that I'm haveing difficulties with |
|
|
Hey i just wanted to ask how do u make a moon like crescent moon in Turing and make it move across the screen |
|
|
|
|
|
Sponsor Sponsor
|
|
|
enimirahi
|
Posted: Sat Apr 18, 2009 12:23 pm Post subject: RE:Animimation Question that I\'m haveing difficulties with |
|
|
across meaning to the right |
|
|
|
|
|
Dusk Eagle
|
Posted: Sat Apr 18, 2009 12:45 pm Post subject: Re: Animimation Question that I'm haveing difficulties with |
|
|
There is no built in command to draw a crescent moon. Instead, combine built-in shapes to draw your moon. All you'll need to use is Draw.FillOval, but I suppose you could use Draw.FillArc To move an object, use variables. Draw the object in a loop, and update the variables that affect its position within the loop. Like this:
Turing: |
var x: int := maxx- 10
var y: int := maxy- 10
loop
x-= 2
y-= 1
Draw.FillBox(x,y,x+ 20,y+ 20, 4)
delay(5)
cls
end loop
|
There is still a problem, though. Notice how the shape flickers? That is because it takes time to process the code between the cls and the next Draw.FillBox. To fix this, look into View.Update.
Be sure to check out The Turing Walkthrough. It's filled with useful information for learning Turing. |
|
|
|
|
|
enimirahi
|
Posted: Sat Apr 18, 2009 6:15 pm Post subject: RE:Animimation Question that I\'m haveing difficulties with |
|
|
thnx |
|
|
|
|
|
|
|