Adding the line grassTile:setImage(2) in sample IsometricAndPlayer not working.
if grassTile then
-- If there is a tree tile or the grass tile is an obstacle then we shall not pass
--if treeTile or grassTile.isObstacle then
-- return
--end
-- Get the position of the new tile
position = lime.utils.gridToWorldPosition( map, newGridPosition, offset )
local onTransitionComplete = function( event )
player.transition = nil
end
-- Move the player
grassTile:setImage(2);
player.transition = transition.to( player, { time = 500, x = position.x, y = position.y, onComplete = onTransitionComplete } )
-- Update the main grid position
gridPosition = { column = newGridPosition.column, row = newGridPosition.row }
end
[import]uid: 79379 topic_id: 18943 reply_id: 318943[/import]