Skip to content

Instantly share code, notes, and snippets.

View goshdarngames's full-sized avatar

Gosh Darn Games goshdarngames

View GitHub Profile
/*******************************************************************************
* AddNGonPolygonCollider.cs
*
* When attached to a game object this script will add an N-sided hollow
* PolygonCollider2D to the object. Its primary use in Spacebomb is to generate
* the collider for the edge of the world.
******************************************************************************/
using UnityEngine;
using System.Collections;
using UnityEngine;
using System;
using System.Collections;
public class ConfineToCircle : MonoBehaviour
{
/***************************************************************************
* INSPECTOR DATA
**************************************************************************/
/*****************************************************************************
* GameState.cs
*
* A common base type for all Game Manager states that grants access to
* the Game Data.
****************************************************************************/
using UnityEngine;
using System.Collections;
/*****************************************************************************
* SinglePlayerGameplayState.cs
*
* This state is used by the Game Manager when the game is playing in
* single-player mode.
****************************************************************************/
using UnityEngine;
using System.Collections;
/*****************************************************************************
* GameData.cs
*
* Holds pointers to data that may be needed by more than one gameplay
* state.
****************************************************************************/
using UnityEngine;
using System.Collections;
@goshdarngames
goshdarngames / State.cs
Last active August 29, 2015 14:27
Finite State Machine in CSharp
/*****************************************************************************
* State.cs
*
* This interface allows an object to be treated as a State by a State
* Machine.
****************************************************************************/
using UnityEngine;
using System.Collections;