View Timer.cs
// 2014 - Pixelnest Studio | |
using System; | |
using System.Collections; | |
using UnityEngine; | |
/// <summary> | |
/// Ready to use timers for coroutines | |
/// </summary> | |
/// <summary> | |
/// Ready to use timers for coroutines |
View Extruder.cs
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
/// <summary> | |
/// | |
/// </summary> | |
/// <remarks>Source: https://forum.unity3d.com/threads/trying-extrude-a-2d-polygon-to-create-a-mesh.102629/ </remarks> | |
[RequireComponent(typeof(MeshFilter), typeof(MeshRenderer), typeof(PolygonCollider2D))] | |
public class ExtrudeSprite : MonoBehaviour |
View ScrollingScript.cs
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; | |
/// <summary> | |
/// Parallax scrolling script that should be assigned to a layer | |
/// | |
/// This is related to the tutorial http://pixelnest.io/tutorials/2d-game-unity/parallax-scrolling/ | |
/// |
View LaserScript.cs
using UnityEngine; | |
using System.Collections; | |
public class LaserScript : MonoBehaviour | |
{ | |
[Header("Laser pieces")] | |
public GameObject laserStart; | |
public GameObject laserMiddle; | |
public GameObject laserEnd; |
View DecalPainter.cs
// Author: Damien Mayance (http://dmayance.com) | |
// 2013 - Pixelnest Studio (http://pixelnest.io) | |
// | |
// This script paints decals on surfaces it hits from a point. | |
// See http://dmayance.com/2013-10-09-unity-paint-part-2/ for further explanations. | |
// | |
// Usage: | |
// - Attach it to an unique object that won't be deleted of your choice. There should be only one instance of this script. | |
// - Then fill the "PaintDecalPrefabs" list with your decals prefabs. | |
// - Finally, just call DecalPainter.Instance.Paint from another script to paint! |
View WaterLine.cs
// Author: Damien Mayance (http://dmayance.com) | |
// 2013 - Pixelnest Studio (http://pixelnest.io) | |
// | |
// This script simulates a simple 2d water line behavior, like you see in many 2d games. | |
// See http://dmayance.com/water-line-2d-unity/ for further explanations. | |
// | |
// Usage: | |
// - Attach it to an object | |
// - Then fill the "Material" parameter | |
// - Start the game (here it is only visible at runtime) |
View langoliers.rb
require "rubygems" | |
require "twitter" | |
require "json" | |
# things you must configure | |
TWITTER_USER = "your_username" | |
MAX_AGE_IN_DAYS = 1 # anything older than this is deleted | |
# get these from dev.twitter.com | |
CONSUMER_KEY = "your_consumer_key" |
View Bezier.cs
/// <summary> | |
/// Easy and simple Bezier curves for Unity | |
/// </summary> | |
/// <remarks>http://devmag.org.za/2011/04/05/bzier-curves-a-tutorial/ </remarks> | |
public static class Bezier | |
{ | |
/// <summary> | |
/// | |
/// </summary> | |
/// <param name="t">Time, between 0 and 1</param> |
View CameraShaker.cs
using UnityEngine; | |
/// <summary> | |
/// Shake shake shake the screen! | |
/// </summary> | |
public class CameraShaker : MonoBehaviour | |
{ | |
#region Members | |
private static CameraShaker instance; | |
private Transform camTransform; |
View TouchTapControl.cs
using UnityEngine; | |
namespace InControl | |
{ | |
public class TouchTapControl : TouchControl | |
{ | |
[Header("Dimensions")] | |
public Rect activeArea = new Rect(0.0f, 0.0f, 0.5f, 1.0f); | |
[Header("Options")] |
NewerOlder