agrirefa.blogg.se

Gideros layer behind moving object
Gideros layer behind moving object





gideros layer behind moving object
  1. #Gideros layer behind moving object how to#
  2. #Gideros layer behind moving object update#
  3. #Gideros layer behind moving object full#

#Gideros layer behind moving object how to#

Read the comments in the a file to see instructions on how to set properties of both project and Gideros player.SELECT t1.TagName AS, t2.TagName AS, COUNT(pt1.PostId) AS The complete project can be downloaded from Plicatibu's github repository. In picture below you can see image is moving from left to right.

gideros layer behind moving object

These are good defaults! world : step ( 1 / 60, 8, 3 ) einstein : setPosition ( einstein.body : getPosition ( ) ) end ) -add to scene stage : addChild ( einstein ) stage : addEventListener ( Event.ENTER_FRAME, function ( ) - edit the step values if required. Note we are passing an anonimous function to addEventListener function.

#Gideros layer behind moving object update#

einstein.body = body - b2.Body:setGravityScale(0) body : setGravityScale ( 0 ) - b2.Body:setLinearVelocity(x,y) body : setLinearVelocity ( 10, 0 ) - Let's update position on each frame.

gideros layer behind moving object

body : setPosition ( - einstein : getWidth ( ), application : getContentHeight ( ) / 2 ) - In order to physics work we have to add the body create above as a property of einstein. When it appears it will be centered (in relation to y axis). einstein : setAnchorPoint ( 0.5, 0.5 ) -create box2d physical object local body = world : createBody - Let's start animation with einstein hidden. It is required when using Box2D / LiquidFun. new ( 0, 10, true ) - Reference center of the einstein for positioning.

#Gideros layer behind moving object full#

Note that we are passing to its constructor - a Texture object and that it receives the full path of the image as - we see under Files folder local einstein = Bitmap.new ( Texture.new ( ' ra_einstein.png ' ) ) - create box2d physical object local world = b2.World.

gideros layer behind moving object

require " box2d " - Create a Bitmap object.







Gideros layer behind moving object