Skip to content

Instantly share code, notes, and snippets.

View grahamboree's full-sized avatar

Graham Pentheny grahamboree

View GitHub Profile

Keybase proof

I hereby claim:

  • I am grahamboree on github.
  • I am grahamboree (https://keybase.io/grahamboree) on keybase.
  • I have a public key ASDF-glNwGFrJP7UMDnF_8Gplq_rKtNzK6E2aq-Upv6BIwo

To claim this, I am signing this object:

@grahamboree
grahamboree / Quadtree.cs
Created November 15, 2017 17:25
Generic Loose Quadtree for Unity
using System.Collections.Generic;
using UnityEngine;
public interface QuadtreeItem {
Rect GetBounds();
}
public class QuadtreeNode<T> where T : QuadtreeItem {
const int MAX_DEPTH = 10;
Shader "GiantOtter/Outlined Diffuse" {
Properties {
_Color ("Main Color", Color) = (.5,.5,.5,1)
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
_OutlineWidth ("Outline width", Range (0.0, 0.5)) = .005
_MainTex ("Base (RGB)", 2D) = "white" { }
}
CGINCLUDE
#include "UnityCG.cginc"
@grahamboree
grahamboree / gist:36a815a7aeba50a2c1f2
Last active August 29, 2015 14:19
Unity Messenger
using System;
using System.Collections.Generic;
using UnityEngine;
public enum EventType {
// Add events here.
testOne,
testTwo,
testThree
}
//
// main.cpp
// blackboard_test
//
// Created by Graham Pentheny on 1/27/15.
// Copyright (c) 2015 Graham Pentheny. All rights reserved.
//
#include <iostream>
#include <string>