how "angle" in Sprite Class work?

Started by Lukas, September 24, 2012, 06:56:00 am

Previous topic - Next topic

Lukas

any change in angle will rewrite pixel of bitmap ?  :???:
Can someone show/tell me the code used in the Sprite Class :huh:

thanks, sorry for my bad English.  :)
Spoiler: ShowHide

This image been put in a spoiler because it's 2 MB which is above the size of images allowed in a spoiler.
Thank you for your understanding.
~Blizz



~Sorry :)

Blizzard

The Bitmap stays unchanged. Bitmap represents the image data while Sprite contains data about how Bitmap should be rendered. "angle" is a property of the Sprite class. It can be used like this:

sprite = Sprite.new
sprite.bitmap = Bitmap.new(64, 64) # or any bitmap in existence
sprite.angle = 30
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Lukas

yeah, i know that.

i mean..
def angle=(value)
blablaabla
end

I want to know the contents(blablaabla) of "angle" method .  :)

sorry for my bad english  :facepalm:
Spoiler: ShowHide

This image been put in a spoiler because it's 2 MB which is above the size of images allowed in a spoiler.
Thank you for your understanding.
~Blizz



~Sorry :)

Blizzard

They are implemented in C and are not accessible. I expect that it's a simple assigner of a variable that is then internally used for rotation during rendering.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Lukas

oww  :huh:
uhm.. thanks Blizzard.   :)
good luck ARC  :D
Spoiler: ShowHide

This image been put in a spoiler because it's 2 MB which is above the size of images allowed in a spoiler.
Thank you for your understanding.
~Blizz



~Sorry :)