Skip to content

Instantly share code, notes, and snippets.

View bzgeb's full-sized avatar

Bronson Zgeb bzgeb

View GitHub Profile
using UnityEngine;
using System.Collections;
public class TrailerTarget : MonoBehaviour {
public Transform[] positions;
public float[] times;
private int current_index;
IEnumerator OnTrailer()
{
@bzgeb
bzgeb / Synth.cs
Created November 6, 2012 03:11
Example PureData synth
using UnityEngine;
using System.Collections;
public class Synth : MonoBehaviour {
private int transpose = 48;
public void play(int note) {
PureData.sendFloat(note + transpose, "note");
}
@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();
@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 / ProjectName.sublime-project
Created February 21, 2013 19:03
Sublime Project File with CompleteSharp Assemblies
{
"folders":
[
{
"path": "/Users/bronson/Developer/ProjectName"
}
],
"settings":
{
@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 / 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 / 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 / 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 / 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;