Skip to content

Instantly share code, notes, and snippets.

protected function works():void{
var val:Number = -3;
switch(val){
case -3:
trace("woohoo");
break;
default:
trace('wtf!');
break;
}
var val = -3;
switch(val){
case -3:
console.log("woohoo");
break;
default:
console.log("wtf!");
break;
}
animation name="knight">
<mov name="stand" dr="1" to="6">
<b name="[knight__0019_shield.png]" sc="1" dl="0">
<f x="125" y="125" kX="0" kY="0" cX="1" cY="1" z="0" dI="0" dr="1"/>
</b>
<b name="[knight__0018_shoulder-L.png]" sc="1" dl="0">
<f x="125" y="125" kX="0" kY="0" cX="1" cY="1" z="1" dI="0" dr="1"/>
</b>
<b name="[knight__0017_wrist-L.png]" sc="1" dl="0">
<f x="125" y="125" kX="0" kY="0" cX="1" cY="1" z="2" dI="0" dr="1"/>
<mov name="stand" dr="1" to="6">
<b name="[knight__0019_shield.png]" sc="1" dl="0">
<f x="125" y="125" kX="0" kY="0" cX="1" cY="1" z="0" dI="0" dr="1"/>
</b>
<b name="[knight__0018_shoulder-L.png]" sc="1" dl="0">
<f x="125" y="125" kX="0" kY="0" cX="1" cY="1" z="1" dI="0" dr="1"/>
</b>
<b name="[knight__0017_wrist-L.png]" sc="1" dl="0">
<f x="125" y="125" kX="0" kY="0" cX="1" cY="1" z="2" dI="0" dr="1"/>
</b>
@jmcguirk
jmcguirk / Main.as
Created February 26, 2013 01:10
Ghetto resizer for Dragonbones Rigs Requires https://github.com/villekoskelaorg/RectanglePacking To repack the smaller texture atlases
package
{
import com.adobe.images.PNGEncoder;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Loader;
@jmcguirk
jmcguirk / PerformBuild.cs
Created March 8, 2013 01:56
Unity3D Ant Build Configuration
// C# example
using UnityEditor;
using System.IO;
using System.Collections;
using UnityEngine;
using System.Collections.Generic;
class PerformBuild
{
static string[] GetBuildScenes()
@jmcguirk
jmcguirk / AndroidFacebookManager.cs
Created March 19, 2013 20:50
Wrappers for Prime 31 IOS and Android FB Integration Uses 3.18 version of these plugins http://prime31.com/docs#androidSocial http://prime31.com/docs#iosSocial
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
#if UNITY_ANDROID
public class AndroidFacebookManager : IFacebookManager
{
@jmcguirk
jmcguirk / BaseComponent.cs
Last active December 15, 2015 05:29
JSON Based Content Engine for Unity 3D.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using UnityEngine;
public class BaseComponent : MonoBehaviour
{
@jmcguirk
jmcguirk / SkeletonController.cs
Created March 22, 2013 02:14
TK2D Spine Controller Runtime
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Spine;
/// <summary>
/// A Unity specific implementation of a skeleton controller.
/// </summary>
public class SkeletonController : MonoBehaviour
{
@jmcguirk
jmcguirk / BookmarkMenu.cs
Created March 29, 2013 17:48
Ghetto Bookmarking System
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
public class BookmarkMenu : EditorWindow
{
int selectedOption = 0;