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; | |
public class FNodeLink : MonoBehaviour | |
{ | |
public static float METERS_TO_POINTS = 64.0f; | |
public static float POINTS_TO_METERS = 1.0f/METERS_TO_POINTS; | |
private FNode _node; |
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
///// Example 1 - C:Valid, C#:Error, AS3:Warning ///// | |
bool isHappy = true; | |
if(true) | |
{ | |
bool isHappy = true; | |
} | |
///// Example 2 - C:Valid, C#:Error, AS3:Warning ///// |
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; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Timers; |
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; | |
using System.Collections; | |
using System.Collections.Generic; | |
//USAGE: | |
//someArray.Log(); | |
//someArray.Log("a name"); | |
//someList.Log(); | |
//someList.Log("a name"); |
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 System.Collections.Generic; | |
public class AudioClipType | |
{ | |
static public List<AudioClipType> allAudioClipTypes = new List<AudioClipType>(); | |
static public AudioClipType SnakeEat = new AudioClipType("snake_eat","wav",1.0f); | |
static public AudioClipType UIPress = new AudioClipType("ui_press","wav",1.0f); | |
static public AudioClipType Explosion = new AudioClipType("explosion","wav",1.0f); |
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 System.Collections.Generic; | |
using UnityEngine; | |
public class Scroller | |
{ | |
public float maxDragSpeed = 20.0f; //maximum drag speed | |
public float edgeSquish = 60.0f; //how far to go past the end | |
public float edgeBounce = 0.19f; //how much force to use to bounce back | |
public float strongFriction = 0.75f; //used to bring it to a stop quicker |
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.Collections; | |
using System.Collections.Generic; | |
using System; | |
using UnityEditor; | |
using System.Reflection; | |
[CustomEditor (typeof(UnityEngine.Object),true)] | |
[CanEditMultipleObjects] |
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
//These have *identical* performance | |
Car myCar = new Car(); | |
//STYLE A: with declaration outside loop | |
Car tempCarA; | |
for(int c = 0; c<1000; c++) | |
{ | |
tempCarA = myCar; | |
tempCarA.Honk(); |