Skip to content

Instantly share code, notes, and snippets.

View igoodin's full-sized avatar

Isaac Goodin igoodin

View GitHub Profile
@igoodin
igoodin / QuadTreeTest.cs
Created January 29, 2016 03:49 — forked from DGoodayle/QuadTreeTest.cs
Quadtree in Unity
using UnityEngine;
using System.Collections;
public class QuadTreeTest : MonoBehaviour {
public class TestObject : IQuadTreeObject{
private Vector3 m_vPosition;
public TestObject(Vector3 position){
m_vPosition = position;
}
public Vector2 GetPosition(){
$(document).ready(function(){
$("div").TimerRotate({
interval: 2000,
fadetime: 1000,
target: ".rotate_item",
});
$("div").TimerRotate({
interval: 2000,
fadetime: 1000,
App.ADAGE.query(params, function(result){
console.log(result);
});
or
function queryResults(results) {
console.log(result);
}
Choose Inital "Seed" Prefab from a list of prefabs and place it.
for each connector in the Current Prefab:
Find the list of current possible connectors that can connect to the current connector.
Find the list of possible Prefabs that have matching connectors in the current list of possible connectors
while there is a Prefab in the list of possible Prefabs that can be placed:
Choose a Prefab randomly from the list of possible prefabs
Remove the Prefab from the list
Rotate prefab so the connector face the current connector
Place prefab
if Prefab is colliding with anything else: