Skip to content

Instantly share code, notes, and snippets.

@rumanwork
rumanwork / AnimatableSprite.cs
Last active December 12, 2015 01:18 — forked from criscokid/AnimatableSprite.cs
Animation class for Futile framework
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class AnimatableSprite : FSprite {
private string _file;
private int _currentIndex;
private int _maxFrames;
private Animation _currentAnimation;
@rumanwork
rumanwork / Unity3dSingleton.cs
Created December 12, 2012 06:48
Unity3d C# Singleton. Use: SingletonName.Instance.propertyName = 5;
public class SingletonName : MonoBehaviour {
private static SingletonName instance = null;
public static SingletonName Instance {
get {
if (instance == null)
{
GameObject go = new GameObject();
instance = go.AddComponent<SingletonName>();
go.name = "SingletonName";