Skip to content

Instantly share code, notes, and snippets.

View bzgeb's full-sized avatar

Bronson Zgeb bzgeb

View GitHub Profile
@bzgeb
bzgeb / AnaglyphEffect.cs
Created June 14, 2013 23:26
Accidental anaglyph 3d shader
Shader "Hidden/Anaglyph Effect" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Pass {
ZTest Always Cull Off ZWrite Off
Fog { Mode off }
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
public static class SKTextureUtil
{
@bzgeb
bzgeb / CustomCursor.cs
Created March 19, 2013 20:34
Custom cursor (software & hardware)
using UnityEngine;
public class CustomCursor : MonoBehaviour {
public Texture2D cursor;
public int width = 32;
public int height = 32;
// void Start() {
// Screen.lockCursor = true;
@bzgeb
bzgeb / Util.cs
Created March 13, 2013 18:33
Util
/*
Copyright (c) 2008, Rune Skovbo Johansen & Unity Technologies ApS
See the document "TERMS OF USE" included in the project folder for licencing details.
*/
using UnityEngine;
using System.Collections;
public class Util {
@bzgeb
bzgeb / PlatformCharacterController.cs
Created March 13, 2013 16:30
PlatformCharacterController
using UnityEngine;
using System.Collections;
public class PlatformCharacterController : MonoBehaviour {
private CharacterMotor motor;
public float walkMultiplier = 0.5f;
public bool defaultIsWalk = false;
@bzgeb
bzgeb / CharacterMotor.cs
Created March 13, 2013 16:29
CharaterMotor
using UnityEngine;
using System.Collections;
public abstract class CharacterMotor : MonoBehaviour {
public float maxForwardSpeed = 1.5f;
public float maxBackwardsSpeed = 1.5f;
public float maxSidewaysSpeed = 1.5f;
public float maxVelocityChange = 0.2f;
@bzgeb
bzgeb / PhysicsCharacterMotor.cs
Created March 13, 2013 16:27
PhysicsCharacterMotor
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(Rigidbody))]
[RequireComponent(typeof(CapsuleCollider))]
public class PhysicsCharacterMotor : CharacterMotor {
public float maxRotationSpeed = 270;
public bool useCentricGravity = false;
public LayerMask groundLayers;
@bzgeb
bzgeb / ProjectName.sublime-project
Created February 21, 2013 19:03
Sublime Project File with CompleteSharp Assemblies
{
"folders":
[
{
"path": "/Users/bronson/Developer/ProjectName"
}
],
"settings":
{
@bzgeb
bzgeb / gist:4956198
Created February 14, 2013 20:39
Unity git ignore file.
Library/*
Temp/*
iOS-Build/*
*/DerivedData/*
*.booproj
*.csproj
*.sln
*.userprefs
*.pidb
*.unityproj
@bzgeb
bzgeb / Audio.cs
Created November 6, 2012 03:13
Example PureData initializer
using UnityEngine;
using System.Collections;
public class Audio : MonoBehaviour {
// Use this for initialization
void Start () {
PureData.initPd(44100, 32, 2, 2);
PureData.openFile("BasicSynth.pd");
PureData.startAudio();