<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>OtLabs Blog</title>
	<atom:link href="http://www.otlabs.net/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.otlabs.net/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 14 May 2012 16:46:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>[ obj-C ] SpriteSheet play sequence and call back</title>
		<link>http://www.otlabs.net/blog/?p=147</link>
		<comments>http://www.otlabs.net/blog/?p=147#comments</comments>
		<pubDate>Mon, 14 May 2012 11:06:02 +0000</pubDate>
		<dc:creator>rob.OT</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[objective C mental]]></category>

		<guid isPermaLink="false">http://www.otlabs.net/blog/?p=147</guid>
		<description><![CDATA[Here the way to manage how to play an animation and get a call back at the end

//string to set the Plist of the spritesheet ( base name is a string passed through the function
NSString *plistString = [NSString stringWithFormat:@"%@.%@", baseName , @"plist"];
//Sprite frame cache
[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:
     plistString];
//string to set the png [...]]]></description>
			<content:encoded><![CDATA[<p>Here the way to manage how to play an animation and get a call back at the end</p>
<pre><code>
//string to set the Plist of the spritesheet ( base name is a string passed through the function
NSString *plistString = [NSString stringWithFormat:@"%@.%@", baseName , @"plist"];
//Sprite frame cache
[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:
     plistString];
//string to set the png spritesheet file
NSString *pngString = [NSString stringWithFormat:@"%@.%@", baseName, @"png"];
//string name png that create the png seq
NSString *seq = [NSString stringWithFormat:@"%@%@", sequencePngNames, @"%d.png" ];

//batch node
CCSpriteBatchNode *spriteSheet = [CCSpriteBatchNode
                                      batchNodeWithFile:pngString];

//creating frame array
//PS*still didn't understand how to get the nr of frames from plist, so i am passing this as a value ( totNrFrames ) to the
//method
NSMutableArray *walkAnimFrames = [NSMutableArray array];
        for(int i = 1; i <= totNrFrames ; ++i)
        {
                [walkAnimFrames addObject:
                 [[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:
                  [NSString stringWithFormat: seq , i]]];
         }
}

//create walk Animation
CCAnimation *walkAnim = [CCAnimation
                             animationWithFrames:walkAnimFrames delay: speed ];

//set first frame to visualize ( appendFirstPng is just a string we pass to decide which frame to start )
NSString *firstPng = [NSString stringWithFormat:@"%@%@", pngString, appendFirstPng ];
CCSprite *bear = [CCSprite spriteWithSpriteFrameName: firstPng ];  

//walk animation sequence
CCFiniteTimeAction *walkAction = [CCAnimate actionWithAnimation:walkAnim ] ;
    CCRepeat *playAnim = [CCRepeat actionWithAction:walkAction times:1] ;
    id playAnimCallBack  = [CCCallFunc actionWithTarget:self selector:@selector(onDoneAttacking)] ;

[ bear runAction:[CCSequence actionOne : playAnim two : playAnimCallBack ] ];

</code></pre>
<p>and the call back function is simply</p>
<pre><code>
-(void) onDoneAttacking {
    NSLog(@"WHATEVER") ;
}
</code></pre>
<p>How simple is that ?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.otlabs.net/blog/?feed=rss2&amp;p=147</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[objc-C]  goto Frame Spritesheet</title>
		<link>http://www.otlabs.net/blog/?p=145</link>
		<comments>http://www.otlabs.net/blog/?p=145#comments</comments>
		<pubDate>Wed, 25 Apr 2012 16:13:00 +0000</pubDate>
		<dc:creator>rob.OT</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[objective C mental]]></category>

		<guid isPermaLink="false">http://www.otlabs.net/blog/?p=145</guid>
		<description><![CDATA[To go to a particular sprite of your spritesheet, you can do in two ways.
First is access the frame by his name, using the string name.
lets say that bear is your CCSprite, and &#8220;bear06.png&#8221; is the 6 frame of the spritesheet.

bear = [GameSprite spriteWithSpriteFrameName: @"bear06.png" ];


I can find this quite 'uncomfortable, especially if you need [...]]]></description>
			<content:encoded><![CDATA[<p>To go to a particular sprite of your spritesheet, you can do in two ways.<br />
First is access the frame by his name, using the string name.<br />
lets say that bear is your CCSprite, and &#8220;bear06.png&#8221; is the 6 frame of the spritesheet.</p>
<pre><code>
bear = [GameSprite spriteWithSpriteFrameName: @"bear06.png" ];
</code></code>

I can find this quite 'uncomfortable, especially if you need to use some kind of iteration.
So, if you want a numeric access, as go to frame 6, this is the way to proceed.
<pre><code>
bear = [GameSprite spriteWithSpriteFrame: [ walkAnimFrames objectAtIndex :  5] ] ;
</code></pre>
<p>where walkAnimFrames is the mutable array you create when creating CCSpriteFrameCache.<br />
SpriteWithSpriteFrame accept (CCSpriteFrame *) that is our object in the array.</p>
<p>Right, this is how to create a spritesheet , starting from a  certain frame. Now lets consider how to go to a particular frame, of a spritesheet.<br />
The method we will use is setDisplayFrame. We need to pass a particular frame to the CCSprite<br />
Lets consider we store all the frame in an array called frameArray. We can access directly any frame, using the name of the png, in this way</p>
<pre><code>
CCSpriteFrame *frame = [[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:@"tombino_star_11.png"];
</code></pre>
<p>or using the array, in order to have an iteration</p>
<pre><code>
CCSpriteFrame *frame = [ frameArray objectAtIndex :  0] ;
</code></pre>
<p>and then easily call the setDisplayFrame</p>
<pre><code>
[node setDisplayFrame:frame];
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.otlabs.net/blog/?feed=rss2&amp;p=145</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[obj-C] combine Strings</title>
		<link>http://www.otlabs.net/blog/?p=143</link>
		<comments>http://www.otlabs.net/blog/?p=143#comments</comments>
		<pubDate>Wed, 25 Apr 2012 14:32:37 +0000</pubDate>
		<dc:creator>rob.OT</dc:creator>
				<category><![CDATA[objective C mental]]></category>

		<guid isPermaLink="false">http://www.otlabs.net/blog/?p=143</guid>
		<description><![CDATA[If you want to combine two strings, in Obj-C, forget the &#8216;+&#8217;
Here how to do this

NSString *combined = [NSString stringWithFormat:@"%@.%@", @"string1",  @"string2"];
NSLog(@"combined %@" , combined ) ;

]]></description>
			<content:encoded><![CDATA[<p>If you want to combine two strings, in Obj-C, forget the &#8216;+&#8217;<br />
Here how to do this</p>
<pre><code>
NSString *combined = [NSString stringWithFormat:@"%@.%@", @"string1",  @"string2"];
NSLog(@"combined %@" , combined ) ;
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.otlabs.net/blog/?feed=rss2&amp;p=143</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[obj-C] mental-1</title>
		<link>http://www.otlabs.net/blog/?p=141</link>
		<comments>http://www.otlabs.net/blog/?p=141#comments</comments>
		<pubDate>Wed, 25 Apr 2012 14:30:14 +0000</pubDate>
		<dc:creator>rob.OT</dc:creator>
				<category><![CDATA[objective C mental]]></category>

		<guid isPermaLink="false">http://www.otlabs.net/blog/?p=141</guid>
		<description><![CDATA[Lets start this session of posts regarding Objective C.
It is really an unusual language for me, compared to clarity As3, haxe, or Lua have. People says that once you pass the &#8216;level&#8217; you like it. Lets see. For now i am going mental on a few things 
Mental-1
If you want to pass a float to [...]]]></description>
			<content:encoded><![CDATA[<p>Lets start this session of posts regarding Objective C.<br />
It is really an unusual language for me, compared to clarity As3, haxe, or Lua have. People says that once you pass the &#8216;level&#8217; you like it. Lets see. For now i am going mental on a few things </p>
<p>Mental-1<br />
If you want to pass a float to a method, you need to tell to the method that this is &#8216;double&#8217;, otherwise you need to declare the method in the header. i like to add to this : mental!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.otlabs.net/blog/?feed=rss2&amp;p=141</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[actionscript] performance</title>
		<link>http://www.otlabs.net/blog/?p=132</link>
		<comments>http://www.otlabs.net/blog/?p=132#comments</comments>
		<pubDate>Thu, 01 Dec 2011 14:54:10 +0000</pubDate>
		<dc:creator>rob.OT</dc:creator>
				<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://www.otlabs.net/blog/?p=132</guid>
		<description><![CDATA[First, better to say that optimize performance is something to do at the end.
Some of the code can be much faster but less readable, so better leave this for the end of the project.
array.
When you create an array
[] is 3 times faster than new Array() ( same for Object , {} 3 time faster than [...]]]></description>
			<content:encoded><![CDATA[<p>First, better to say that optimize performance is something to do at the end.<br />
Some of the code can be much faster but less readable, so better leave this for the end of the project.</p>
<p><strong>array.</strong><br />
When you create an array<br />
[] is 3 times faster than new Array() ( same for Object , {} 3 time faster than new Object() ) </p>
<pre><code>
//wrong
var arr : Array = new Array( 1 , 2 , 3 , 4 ) ;
for( var i : int = 0 ; i < arr.length ; ++i )
{
//
}

//good
var arr : Array = new Array( 1 , 2 , 3 , 4 ) ;
var l : int = arr.length ;
var i : int ;
for( i = 0 ; i < l ; i++ )
{
//
}
</code></pre>
<p>So, calculate the length of array before the loop, is a massive speed up when loopin an array.<br />
And remember<br />
Arrays do take a considerable amount of time to create.<br />
Retrieving a value is almost twice as fast as setting a value.</p>
<p><strong>Array VS Vector</strong><br />
Array and Vector are similar in performance. You will see a big difference in performance when you do this<br />
<code><br />
var c : Boolean = myArray[ j ].booleanProp<br />
//this is slower than this :<br />
var obj : Object = myArray[ i ] ;<br />
var c : Boolean = obj.booleanProp<br />
// that is similar if you use Vector as this<br />
var arrVector : Vector.<int>;<br />
</code></p>
<p>Avoid push(), pop(), shift() or unshift();</p>
<p><strong>if else VS switch.</strong><br />
If else or switch doesnt have a relevant difference. </p>
<p><strong>++</strong><br />
++i or i++ doesnt have any relevant difference, but better than i = i + 1</p>
<p><strong>int and uint.</strong><br />
int is significantly faster than uint, and miles faster than Number,  used as iterator in a loop<br />
so never for( var i : uint = 0 ...</p>
<p><strong>moltiplication and division by power of 2.</strong><br />
if you need an integer, divide by 2 in this was. this run almost double faster.<br />
Here the rest of operation</p>
<pre><code>
var nr : int = 10 >> 1  // var nr : int = 10 / 2
var nr : int = 10 >> 2  // var nr : int = 10 / 4

var nr : int = 10 << 1  // var nr : int = 10*2
var nr : int = 10 << 2  // var nr : int = 10*4
var nr : int = 10 << 4  // var nr : int = 10*16
</code></pre>
<p><strong>getter and setter.</strong><br />
Are your enemy! in any loop try to have direct access to variable, and avoid any call to other methods or getter and setter. ( now you can understand why we should optimize later, closer to the end ).<br />
Direct access of class members is three times as fast as accessing via a function. </p>
<p><strong>Math.floor VS int</strong><br />
Math.floor( number ) is 10 time slower than int( number )</p>
<p><strong>Math.abs VS ifelse</strong><br />
Math.abs( number ) is A LOT slower than<br />
<code>number = number < 0 ? -number  : number<br />
//or this even faster<br />
if( number < 0 ) number = -number ;<br />
</code></p>
<p><strong>Math.ceil VS ifelse</strong><br />
Math.ceil( number ) is damn slower than<br />
<code>number = number == int(number) ? number : int(number)+1</code></p>
<p><strong>Math.sin or Math.cos</strong><br />
Use a lookiup table if you are using only integer angle. you will save time in calculation of sin, and conversion between radians and degree</p>
<p>What you can do<br />
Give your variables decent names, you are not increasing performance by using shorter names or abbreviations.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.otlabs.net/blog/?feed=rss2&amp;p=132</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>starting with Starling. FDT</title>
		<link>http://www.otlabs.net/blog/?p=126</link>
		<comments>http://www.otlabs.net/blog/?p=126#comments</comments>
		<pubDate>Tue, 25 Oct 2011 14:10:37 +0000</pubDate>
		<dc:creator>rob.OT</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Starling]]></category>
		<category><![CDATA[games]]></category>

		<guid isPermaLink="false">http://www.otlabs.net/blog/?p=126</guid>
		<description><![CDATA[Setting up FDT with Starling is quite strightforward. But you need to trick a bit, as there is a misunderstanding between FDT and Starling for having some naming in the class path.
Download Starling.
Download	the	new	playerglobal.swc for Flash	 Player 11.
Download the latest Flex SDK ( 4.5 ) 
Follow this steps to set up FDT
Cool , now you can [...]]]></description>
			<content:encoded><![CDATA[<p>Setting up FDT with Starling is quite strightforward. But you need to trick a bit, as there is a misunderstanding between FDT and Starling for having some naming in the class path.</p>
<p><a href="http://www.starling-­framework.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.starling-­framework.org');" target="_blank">Download Starling.</a></p>
<p><a href="http://www.adobe.com/support/flashplayer/downloads.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.adobe.com');"  target="_blank">Download	the	new	playerglobal.swc for Flash	 Player 11.</a></p>
<p><a href="http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4.5" onclick="javascript:pageTracker._trackPageview('/outbound/article/opensource.adobe.com');"  target="_blank">Download the latest Flex SDK ( 4.5 ) </a></p>
<p><a href="http://www.disturbmedia.com/wiki/How_to_get_started_with_the_Molehill_API_and_Away3D_40.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.disturbmedia.com');"  target="_blank">Follow this steps to set up FDT</a></p>
<p>Cool , now you can publish for player 11, and have access to the wonderland.<br />
When you copy Starling to your FDT project, you will have a lot of errors and warning, caused by the fact that most of the Starling API have same name as flash display and event. So if you use import starling.display.Stage, you will get error if , in your script , need to access the flash.display.Stage, even if you use the full description of the path class. So easy solution.<br />
Grab the com and starling directory, and copy in a directory that you can call as you want. Add this to the Classpath ( right-click on the directory, in the Flash Explorer panel  etc ).<br />
To remove all that annoying errors, just right click on the project -> properties -> FDT Build Path<br />
select the starling directory, and uncheck &#8216;Generate Problems/Task&#8217;.<br />
Someone else suggest to create a swc, but i think this will update quite soon, so  maybe is better to keep like that.<br />
Spot on, you are in Starling <img src='http://www.otlabs.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
  	</p>
]]></content:encoded>
			<wfw:commentRss>http://www.otlabs.net/blog/?feed=rss2&amp;p=126</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>[unity] a 2d guide. part 1</title>
		<link>http://www.otlabs.net/blog/?p=110</link>
		<comments>http://www.otlabs.net/blog/?p=110#comments</comments>
		<pubDate>Wed, 07 Sep 2011 19:35:13 +0000</pubDate>
		<dc:creator>rob.OT</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[unity]]></category>

		<guid isPermaLink="false">http://www.otlabs.net/blog/?p=110</guid>
		<description><![CDATA[Hi there,
The scope of this tutorial is to realize this
http://www.otlabs.net/blog/stuff/tutorials/unity2dpart1/
In part2 etc we will start to analyze the interaction with the character, and how to do a scrolling platform world
What you need
Unity 3.3
Sprite Manager ( http://www.anbsoft.com/middleware/sm2/ ) ( it cost a few dollars, but without is bloody hard to work in 2d with unity )
Zip [...]]]></description>
			<content:encoded><![CDATA[<p>Hi there,<br />
The scope of this tutorial is to realize this<br />
<a href="http://www.otlabs.net/blog/stuff/tutorials/unity2dpart1/" onclick="">http://www.otlabs.net/blog/stuff/tutorials/unity2dpart1/</a></p>
<p>In part2 etc we will start to analyze the interaction with the character, and how to do a scrolling platform world</p>
<p>What you need<br />
Unity 3.3<br />
Sprite Manager ( http://www.anbsoft.com/middleware/sm2/ ) ( it cost a few dollars, but without is bloody hard to work in 2d with unity )<br />
<a href="http://www.otlabs.net/blog/wp-content/uploads/2011/09/animations-files.zip" onclick="javascript:pageTracker._trackPageview('/downloads/blog/wp-content/uploads/2011/09/animations-files.zip');">Zip with necessary files</a></p>
<p>So Lets start</p>
<p>Create a Project in Unity ( File -> New Project )<br />
Create a new Scene ( File -> New Scene ) </p>
<p>First we need to import the Sprite Manager, that is a set of scripts that will help us to manage 2d stuff, and 2d animations.<br />
So,<br />
Assets -> Import Package and locate the Sprite Manager directory</p>
<p>Once this is done, add this script as well, as we will need a lot to edit multiple images<br />
http://www.unifycommunity.com/wiki/index.php?title=TextureImportSettings</p>
<p>Ok so now lets import the Assets to create our running hero.<br />
Go in the stuff directory you downloaded ( <a href="http://www.otlabs.net/blog/wp-content/uploads/2011/09/animations-files.zip" onclick="javascript:pageTracker._trackPageview('/downloads/blog/wp-content/uploads/2011/09/animations-files.zip');">here</a> )  and copy, in the Assets folder of the unity project, the &#8216;animation-files&#8217; directory.</p>
<p>Select all the images, and press Custom from the main menu<br />
Custom -> Texture ->Change Texture Type<br />
and Select Advanced</p>
<p>Select all the images, and press Custom from the main menu<br />
Custom -> Texture ->Change Non Power of 2<br />
and Select None</p>
<p>Select all the images, and press Custom from the main menu<br />
Custom -> Texture ->Change MiniMap<br />
and Select Disable MiniMap</p>
<p>Finally our images are ready to be used , to create our flat Hero<br />
First we will create a single Hero, with a set of animations ( run , jump , fall , etc )<br />
In part 2 we will create a multiple Hero, that means a set of Heroes ( for example different clothes ) , all of them with  a set of animations ( run , jump , etc ) ; </p>
<p>Create a new GameObject. name it as HeroManSingle</p>
<p>*** this is not essential.. its just to have a visual object on the stage<br />
go to Component -> Mesh -> Mesh Filter<br />
Go in the editor and select the material button ( bottom right in the Editor )<br />
Select a Capsule<br />
go to Component -> Mesh -> Mesh Renderer<br />
go in the editor and select the material button , and select Default-Diffuse<br />
You should see now a capsule. you can hide or show the capsule with thick in the editor, in the mesh render section.<br />
This will be our &#8216;movieclip&#8217;. We can actually skip this part, and this is just to have a visual object on the screen&#8230;<br />
****end of not essential part</p>
<p>Now lets give this some physics to the gameobject ( this is essential ).<br />
Go to Component -> Physics -> RigidBody<br />
Finally lets add some physics that will use for collision so<br />
Go to Component -> Physics -> Sphere Collider, and set radius = 0.4 ( this have to adapt to your particular design ) </p>
<p>Lets create now the Packed Sprite that will contains our animations<br />
Create a GameObject and name it HeroBlue<br />
go to Component -> Scripts and add PackedSprite<br />
go to Window and press on Sprite Timeline. So drag on the Texture window of the Sprite timeline the first picture of your running hero sequence.<br />
Press + and add a new animation and call it Run<br />
drag all the 10 frames representing the hero running.<br />
Do the same for Jump and Falling and call like that.<br />
At this point you should see this in Editor ( as fig1 )<br />
<img src="http://www.otlabs.net/blog/wp-content/uploads/2011/09/fig1.jpg" alt="fig1" title="fig1" width="374" height="307" class="aligncenter size-full wp-image-117" /></p>
<p>Good. Lets drag now the HeroBlue in HeroManSingle.<br />
Now lets give some material to our Hero. Basically we created the PackedSprite, and now we need to build the Atlas, that is the image containing all the sequences of the animations.</p>
<p>In Assets create a directory and call Material, or as you wish. right click on it in the Project window, and<br />
create -> Material<br />
Select the material you just created , and call it HeroBlue, as your GameObject. This is not essential, but help you keep track of stuff.<br />
On the material , in the shader drop down menu choose<br />
Transparent Vertex Colored Fast. You can find different option, but I found this really good for performance, especially if you are working for mobile.</p>
<p>So now we have our material, lets write stuff on it.<br />
Select from your Hierarchy the HeroBlue GameObject. Scroll Down the Editor and drag this material we just created on the material field in the MeshRenderer.<br />
Now Select again the HeroBlue material, and go on the main menu<br />
Tools -> A&#038;B Software -> Build Atlas for Material and press create<br />
If you double click on the Text Icon, the UI will show you , in the Editor, the settings for the atlas. Here you can play with the compression to find the best quality/performance settings.</p>
<p>Now Select the PackedSprite ( in our case HeroBlue ) and go<br />
Tools -> A&#038;B Software -> Size Sprites, and choose the right proportion.<br />
Don&#8217;t forget to select , in the editor of the HeroBlue Packed Sprite the option &#8216;AutoResize&#8217;</p>
<p>Now you should see your hero on the screen, and if you press play you should see him falling, stopped on the first frame of Run. If you don&#8217;t see on the screen, you should see it after you press play ( unity acting a bit weird )</p>
<p>Now lets put some platforms, so our hero will stop falling down and we can start interacting with it.<br />
So lets build a platform.</p>
<p>Create an GameObject. name it as Platform.<br />
Give it a Mesh Filter ( Cube ) and a Mesh Renderer. Scale as you wish and at the end add a Physics -> Box Coolider.<br />
If Z are in the right position, for hero and platform  ( should be the same, so the two bodies will collide ) , the Hero will fall on the platform and stop, when you press Play.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.otlabs.net/blog/?feed=rss2&amp;p=110</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[unity] DestroyImmediate</title>
		<link>http://www.otlabs.net/blog/?p=107</link>
		<comments>http://www.otlabs.net/blog/?p=107#comments</comments>
		<pubDate>Wed, 29 Jun 2011 12:01:38 +0000</pubDate>
		<dc:creator>rob.OT</dc:creator>
				<category><![CDATA[unity]]></category>

		<guid isPermaLink="false">http://www.otlabs.net/blog/?p=107</guid>
		<description><![CDATA[God, this is heavy. With this command you can destroy stuff in your library ( Resources ) run time&#8230;
Super
GameObject smoke = Resources.Load(YOUR_ADDRESS + &#8220;SmokeJump&#8221;) as GameObject;	
DestroyImmediate( smoke , true ) ; 
gone. your stuff is gone from Resources &#8230; for ever  
]]></description>
			<content:encoded><![CDATA[<p>God, this is heavy. With this command you can destroy stuff in your library ( Resources ) run time&#8230;<br />
Super</p>
<p>GameObject smoke = Resources.Load(YOUR_ADDRESS + &#8220;SmokeJump&#8221;) as GameObject;	</p>
<p>DestroyImmediate( smoke , true ) ; </p>
<p>gone. your stuff is gone from Resources &#8230; for ever <img src='http://www.otlabs.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.otlabs.net/blog/?feed=rss2&amp;p=107</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[unity] iTween onComplete</title>
		<link>http://www.otlabs.net/blog/?p=103</link>
		<comments>http://www.otlabs.net/blog/?p=103#comments</comments>
		<pubDate>Mon, 23 May 2011 14:39:17 +0000</pubDate>
		<dc:creator>rob.OT</dc:creator>
				<category><![CDATA[unity]]></category>
		<category><![CDATA[#fromAStoUnity]]></category>

		<guid isPermaLink="false">http://www.otlabs.net/blog/?p=103</guid>
		<description><![CDATA[I had to go through a few steps, to make it working properly, so i am trying to replicate here what i did.
First, I didnt find yet a way to tween ANY parameter, as i am doing with Tweened on AS3. So the solution i came up is to create an empty GameObject, tween is [...]]]></description>
			<content:encoded><![CDATA[<p>I had to go through a few steps, to make it working properly, so i am trying to replicate here what i did.<br />
First, I didnt find yet a way to tween ANY parameter, as i am doing with Tweened on AS3. So the solution i came up is to create an empty GameObject, tween is X position, and on update, read the x position, and update my abstract var.</p>
<pre><code>
ashtable ht = new Hashtable();
ht.Add("x", 10 );
ht.Add("time", .6);
ht.Add("oncomplete", "onCompleteTest");
ht.Add("onCompleteTarget" , gameObject ) ;
//my empty game Object is stored in gv as GO_iTween )
Debug.Log("gv.GO_iTween :" + GameVars.GO_iTween ) ;
iTween.MoveTo( gv.GO_iTween , ht) ;
</code></pre>
<p>As you can see i am using onCompleteTarget. Sounds any bell? yes.. it is as you are back in AS2, where the tween try to fire , on complete event , on the gameObject you are moving. So if you want to fire an event in the class you create the tween, you need to set the target. </p>
<p>I&#8217;ll post more soon about onUpdate, or any other bloody way i can find it</p>
]]></content:encoded>
			<wfw:commentRss>http://www.otlabs.net/blog/?feed=rss2&amp;p=103</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>how to clean .svn</title>
		<link>http://www.otlabs.net/blog/?p=100</link>
		<comments>http://www.otlabs.net/blog/?p=100#comments</comments>
		<pubDate>Thu, 24 Feb 2011 11:14:02 +0000</pubDate>
		<dc:creator>rob.OT</dc:creator>
				<category><![CDATA[utilities]]></category>

		<guid isPermaLink="false">http://www.otlabs.net/blog/?p=100</guid>
		<description><![CDATA[http://bitprison.net/cleaning_subversion_directory
easy easy
]]></description>
			<content:encoded><![CDATA[<p>http://bitprison.net/cleaning_subversion_directory<br />
easy easy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.otlabs.net/blog/?feed=rss2&amp;p=100</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

