<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/objective-c/tags/cocos2d</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sat, 25 May 2013 20:52:52 GMT</pubDate>
<item>
<title>(Objective C) vertical lock scroll - izrak</title>
<link>http://snipplr.com/view/68576/vertical-lock-scroll/</link>
<description><![CDATA[ <p>Was used to unlock paid powerups</p> ]]></description>
<pubDate>Thu, 15 Nov 2012 23:23:00 GMT</pubDate>
<guid>http://snipplr.com/view/68576/vertical-lock-scroll/</guid>
</item>
<item>
<title>(Objective C) How to find the distance between two CG points? - espinallab</title>
<link>http://snipplr.com/view/54359/how-to-find-the-distance-between-two-cg-points/</link>
<description><![CDATA[ <p>Distance between p1 and p2:

CGFloat xDist = (p2.x - p1.x);
CGFloat yDist = (p2.y - p1.y);
CGFloat distance = sqrt((xDist * xDist) + (yDist * yDist));

Background: Pythagorean theorem

Edit: if you only need to calculate if the distance between the points increases or decreases, you can omit the sqrt() which will make it a little faster.</p> ]]></description>
<pubDate>Wed, 25 May 2011 08:18:31 GMT</pubDate>
<guid>http://snipplr.com/view/54359/how-to-find-the-distance-between-two-cg-points/</guid>
</item>
<item>
<title>(Objective C) Playing and Stopping Sound Effect in Cocos2d - espinallab</title>
<link>http://snipplr.com/view/54343/playing-and-stopping-sound-effect-in-cocos2d/</link>
<description><![CDATA[ <p>This is how you play and stop sound effects in cocos2d</p> ]]></description>
<pubDate>Tue, 24 May 2011 23:17:47 GMT</pubDate>
<guid>http://snipplr.com/view/54343/playing-and-stopping-sound-effect-in-cocos2d/</guid>
</item>
<item>
<title>(Objective C) initialising and populating an array of Sprites - solgems</title>
<link>http://snipplr.com/view/46830/initialising-and-populating-an-array-of-sprites/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 10 Jan 2011 01:35:39 GMT</pubDate>
<guid>http://snipplr.com/view/46830/initialising-and-populating-an-array-of-sprites/</guid>
</item>
<item>
<title>(Objective C) Change Sprite Texture in Cocos2d - saturngod</title>
<link>http://snipplr.com/view/44020/change-sprite-texture-in-cocos2d/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 12 Nov 2010 15:21:53 GMT</pubDate>
<guid>http://snipplr.com/view/44020/change-sprite-texture-in-cocos2d/</guid>
</item>
<item>
<title>(Objective C) Full directional movement of player in cocos2D tilemap - cell-gfx</title>
<link>http://snipplr.com/view/39707/full-directional-movement-of-player-in-cocos2d-tilemap/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 30 Aug 2010 18:34:05 GMT</pubDate>
<guid>http://snipplr.com/view/39707/full-directional-movement-of-player-in-cocos2d-tilemap/</guid>
</item>
<item>
<title>(Objective C) Setting cocos2D camera position using CCFollow - cell-gfx</title>
<link>http://snipplr.com/view/39706/setting-cocos2d-camera-position-using-ccfollow/</link>
<description><![CDATA[ <p>Use this variation of **setPlayerPosition** in your HelloWorldScene.m file to negate the need to use **setViewpointCenter** to manually calculate the viewport to track your player. This uses the **CCFollow** function as demonstrated in ActionsTest, one of the test apps included with cocos2D. Also to note is that the player movement is controlled by **CCMoveTo** which gives the player the same smooth movement around the map that the enemies have.</p> ]]></description>
<pubDate>Mon, 30 Aug 2010 18:18:29 GMT</pubDate>
<guid>http://snipplr.com/view/39706/setting-cocos2d-camera-position-using-ccfollow/</guid>
</item>
<item>
<title>(Objective C) CCDirector / CCNode Category for Working with Points instead of Pixels - bebroll</title>
<link>http://snipplr.com/view/37586/ccdirector--ccnode-category-for-working-with-points-instead-of-pixels/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 18 Jul 2010 03:19:10 GMT</pubDate>
<guid>http://snipplr.com/view/37586/ccdirector--ccnode-category-for-working-with-points-instead-of-pixels/</guid>
</item>
<item>
<title>(Objective C) Init cocos2d's contentScale - bebroll</title>
<link>http://snipplr.com/view/37585/init-cocos2ds-contentscale/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 18 Jul 2010 03:15:34 GMT</pubDate>
<guid>http://snipplr.com/view/37585/init-cocos2ds-contentscale/</guid>
</item>
</channel>
</rss>