Saturday, February 8, 2014

The Second Week

This is all slowly starting to make sense.  This weeks goal was to understand shapes and how they interact/act in corona.  I was able to draw some basic shapes but I wasn't able to do polygons using display.newPolygon( ), I don't quite get the concept there.  Another goal of the week was to start using groups which I understand can be very useful in Corona SDK.  If I understand them correctly the groups act a lot like layers in Photoshop or Illustrator but I wasn't able to get them to work.  In the code below I was able to do some super simple animation to shapes and I'm starting to understand display objects a little better, but there's so much more to do.
If I had to give myself a grade I'd give me a 8/10 because I can't do the things that need to be done but I did make some significant breakthroughs.  After deleting a lot of the code that didn't work over the week I realized that I needed to comment it out so I could get feedback so I apologize for the lack of code and mistakes shown.  I'll do better next week.

coso = display.newRect( 300, 500, 300, 300 )
coso:  rotate( 30 )
coso:  setFillColor( .33, 1, .98, .7 )

coso2 = display.newRect( 900, 500, 150, 150 )
coso2:  rotate( 30 )
coso2:  setFillColor( .90, 1, .2, .9 )

transition.to( coso, {time=2000, x=20, y=600, alpha= 0, width=0, height=0, rotation=900} )
transition.to( coso2, {time=2000, x=20, y=600, alpha= 0, width=0, height=0, rotation=900} )
--I tried grouping coso and coso2 together to do the same thing and I couldn't get it to work.

title = display.newText( "This is my Shape", 500, 100, "Garamond", 70 )
title: setTextColor( .33, .66, 1 )
title.alpha = .6

--local group1 = display.newGroup(coso, coso2 )
local coso = display.newGroup()
local coso2 = display.newGroup()

--poli = display.newPolygon( 100, 34, 134, 222 )

No comments:

Post a Comment