Skip to content

Instantly share code, notes, and snippets.

View chuwilliamson's full-sized avatar
:octocat:

Matthew Williamson chuwilliamson

:octocat:
View GitHub Profile
@chuwilliamson
chuwilliamson / GridGenerator.cs
Created December 4, 2015 18:20
Grid Gen for Shelby
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class GridGenerator : MonoBehaviour
{
[SerializeField]
private GameObject _gridPrefab;
public int rows;
public int cols;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public enum SpringType
{
manhattan,
structural,
shear,
bend
#define GLM_FORCE_PURE
#include <vector>
#include "stdio.h"
#include <gl_core_4_4.h>
#include <GLFW/glfw3.h>
#include <glm/fwd.hpp>
#include <glm\glm.hpp>
#include <glm\ext.hpp>
#include <iostream>
#include <fstream>
@chuwilliamson
chuwilliamson / FSM.cs
Created February 24, 2016 15:36
FSM in c#
//written by Ryan adaire aka the boss aka commit dis aka ya boy aka holla at
using System;
using System.Linq;
using System.Collections.Generic;
using UnityEngine;
public class FSM<T>
{
private List<TransitionObject> good_transitions;
def Run(self):
self.Reset()
open = self.OPEN
closed = self.CLOSED
start = self._start
goal = self._goal
open.append(start)
print(open)
while open:
open.sort(key = lambda x : x.f)
@chuwilliamson
chuwilliamson / astar.cs
Created May 10, 2016 22:54
Astar Unity
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public class AStar : MonoBehaviour
{
public enum State
{
using System;
using UnityEngine;
class TranInputController : MonoBehaviour
{
Animator anim;
void Update()
{
if(Input.GetKeyDown(KeyCode.D))
{
@chuwilliamson
chuwilliamson / GameEvent.cs
Last active February 3, 2024 15:27
GameEvent ScriptableObject from Unite 2017
/// Credit to Ryan Hipple from Schell Games
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
/// <summary>
/// Create a GameEvent in the Project View
/// This Event should be something meaningful. Ex: GameStart
/// The GameStart.asset will have its reference used in the project
@chuwilliamson
chuwilliamson / GameEventListener.cs
Created January 25, 2018 23:16
GameEventListener Monobehaviour from Unite 2017
//credit to Ryan Hipple Schell Games
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
public class GameEventListener : MonoBehaviour
{
public GameEvent Event;
public UnityEvent Response;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu]
public class GameEventArgs : ScriptableObject
{
public void Raise(params Object[] args)
{