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
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System; | |
using System.Linq; | |
using System.Text; | |
using System.Reflection; | |
public class FSpeechBubble : FContainer | |
{ |
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
using UnityEngine; | |
using System; | |
/* | |
A sprite split in 2 parts, bottom, and top, each with its own color and alpha values. | |
*/ | |
public class FSplitSprite : FSprite | |
{ | |
protected Color _bottomColor=Futile.white; |
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
using System; | |
using UnityEngine; | |
public class HealthBar : FContainer | |
{ | |
private const float INSET = 1.0f; | |
private const float DOUBLE_INSET = INSET*2.0f; | |
private static Color BAD_COLOR = Color.red; | |
private static Color OKAY_COLOR = Color.yellow; |
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
/* | |
Usage : | |
ShakeUtil.Go(myFNode,myDurationInSeconds,myAmplitudeInPixels); | |
*/ | |
public class ShakeUtil { | |
static Dictionary<FNode, ShakeUtil> _pendings = new Dictionary<FNode, ShakeUtil>(); | |
public Vector2 oPosition; |
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
using UnityEngine; | |
using System; | |
/* | |
Displays a sub area of a sprite. Supports trimmed atlas elements. | |
Examples : | |
// left half |
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
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System; | |
using System.Linq; | |
using System.Text; | |
using System.Reflection; | |
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
using UnityEngine; | |
using System; | |
/* | |
FBicolorSprite is a FSprite with 2 colors (bottom and top). | |
Usage : | |
FBicolorSprite bicolorSprite=new FBicolorSprite("Futile_White"); |
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
using UnityEngine; | |
using System; | |
/* | |
FShadowSprite is a FSprite with a shadow. | |
TODO : | |
setters for _shadowOffsetX, _shadowOffsetY, _shadowColor and _shadowAlphaRatio |
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
using UnityEngine; | |
using System.Collections; | |
// This is just an example of how to use the polygon sprite | |
public class WTDrawingPolygonsScene : MonoBehaviour { | |
void Start () { | |
FutileParams fp = new FutileParams(true, true, false, false); | |
fp.AddResolutionLevel(480f, 1.0f, 1.0f, "-res1"); | |
fp.backgroundColor = Color.black; | |
fp.origin = Vector2.zero; |
NewerOlder