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
Shader "Sprites/Default with UV Noise" | |
{ | |
Properties | |
{ | |
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} | |
_Color ("Tint", Color) = (1,1,1,1) | |
_NoiseAmt ("Noise Amt", Range(0, 1)) = 0.5 | |
_NoiseScaleX ("Noise Scale X", Float) = 1 | |
_NoiseScaleY ("Noise Scale Y", Float) = 1 | |
_NoiseTex ("Noise Texture", 2D) = "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.Collections; | |
public delegate void IntDelegate(int value); | |
public delegate void GenericEventDelegate(); | |
[RequireComponent(typeof(AudioSource))] | |
public class Metronome : Singleton<Metronome> | |
{ | |
public IntDelegate SignalPhraseImmediate; |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
public class RingColliderWindow : EditorWindow { | |
private GameObject _parentObj; | |
private int _numColliders = 6; | |
private float _ringRadius = 2.0f; | |
private float _colliderRadius = 0.5f; |
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
// Rainbow shader with lots of adjustable properties! | |
Shader "_Shaders/Rainbow" { | |
Properties { | |
_Saturation ("Saturation", Range(0.0, 1.0)) = 0.8 | |
_Luminosity ("Luminosity", Range(0.0, 1.0)) = 0.5 | |
_Spread ("Spread", Range(0.5, 10.0)) = 3.8 | |
_Speed ("Speed", Range(-10.0, 10.0)) = 2.4 | |
_TimeOffset ("TimeOffset", Range(0.0, 6.28318531)) = 0.0 | |
} |
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.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; | |
using System.Collections; | |
using System; | |
using System.Runtime.Serialization.Formatters.Binary; | |
using System.IO; | |
public class PlayerPrefsHelper { | |
public static void SetList<T>(string key, List<T> list) { |
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 script is an altered version of a script found here: | |
// http://krauspe.eu/r/Unity3D/comments/20arg7/i_made_a_script_to_make_a_unity_camera_render/ | |
[ExecuteInEditMode] | |
public class CameraScreenGrab : MonoBehaviour { | |
//how chunky to make the screen |
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; | |
public class SpriteAnimator : MonoBehaviour | |
{ | |
[System.Serializable] | |
public class AnimationTrigger | |
{ | |
public int frame; | |
public string 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 UnityEngine; | |
using System.Collections; | |
// Line segment intersection based on this: http://www.pdas.com/lineint.html | |
// Intersect circle/polygon algorithm based on this: http://gamedev.stackexchange.com/questions/7735/how-to-find-if-circle-and-concave-polygon-intersect | |
public static class WTUtils { | |
public static bool IntersectLineSegments(Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3) { | |
Vector2 s1 = p1 - p0; | |
Vector2 s2 = p3 - p2; |
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; | |
public class WTLabel : FLabel { | |
protected Color[] quadColors_; | |
public WTLabel(string fontName, string text) : base(fontName, text) { | |
} | |
NewerOlder