This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="fb21312321321321://">click me</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function jsIsReallySaddening() | |
{ | |
if( true ) | |
{ | |
var shouldBeLocallyScoped:boolean = true; | |
} | |
if( true ) | |
{ | |
// unbelievably, the compiler will error on this with "There is already a local variable with the name 'shouldBeLocallyScoped'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function youHaveGotToBeKiddingMe() | |
{ | |
var array = new Array(); | |
array.Push( "stuff" ); | |
if( array.Count > 0 ) | |
var iCantBelieveThisWorks = array[0]; | |
Debug.Log( iCantBelieveThisWorks ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSURLRequest*)webView:(WebView*)sender resource:(id)identifier willSendRequest:(NSURLRequest*)request redirectResponse:(NSURLResponse*)redirectResponse fromDataSource:(WebDataSource*)dataSource | |
{ | |
// are we redirecting to my site only? | |
if( [request.URL.absoluteString hasPrefix:_mySiteYo] ) | |
return request; | |
return null; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var chain = new TweenChain(); | |
chain.setIterations( -1, LoopType.PingPong ); | |
// colors is an array of Color objects that is settable in the inspector | |
// in this case, we set the cameras background color but this could be light colors, material colors, etc | |
for( var i = 0; i < colors.Length; i++ ) | |
chain.append( new Tween( Camera.mainCamera, 6f, new TweenConfig().colorProp( "backgroundColor", colors[i] ) ) ); | |
chain.play(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// get input | |
$receipt = $_POST['receipt']; | |
$isTest = $_POST['isTest'] == '1'; | |
// prop the post data | |
$json = json_encode( array( 'receipt-data' => $receipt ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Key: | |
"-" negative point | |
"+" positive point | |
"+-" could go either way depending on your opinion or if it functions or not | |
Background Info: the last project we worked on needed basic 2D functionality (sprites and animations) and SpriteKit was born to fill this need (http://www.youtube.com/watch?v=cabAr2CdLmc). It has no fancy editors and was really made to fit a specific need and as of yet it has not been extended much further than the video shows. Something a bit more full featured is required for a new prototype and instead of spending a bunch of time extending SpriteKit we went on a search for alternatives. None of the below frameworks are perfect and they all have pluses and minuses. One thing SpriteKit had that none of the others do is automatic texture selection based on screen resolution. That is one thing I would like to see incorporated in every 2D framework and it kind of surprises me that it isn't one of the first features added when making a 2D framework. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint codePoint = UInt32.Parse( new string( unicodeCharArray ), System.Globalization.NumberStyles.HexNumber ); | |
s += Char.ConvertFromUtf32( (int)codePoint ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2012 Calvin Rien | |
* | |
* Based on the JSON parser by Patrick van Bergen | |
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
* | |
* Simplified it so that it doesn't throw exceptions | |
* and can be used in Unity iPhone with maximum code stripping. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create a TweenConfig that we will use on all 4 cubes | |
var config = new TweenConfig() | |
.setEaseType( EaseType.QuadIn ) // set the ease type for the tweens | |
.materialColor( Color.magenta ) // tween the material color to magenta | |
.eulerAngles( new Vector3( 0, 360, 0 ) ) // do a 360 rotation | |
.position( new Vector3( 2, 8, 0 ), true ) // relative position tween so it will be start from the current location | |
.setIterations( 2, LoopType.PingPong ); // 2 iterations with a PingPong loop so we go out and back | |
// create the chain and set it to have unlimited iterations | |
var chain = new TweenChain().setIterations( -1 ); |
OlderNewer