This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class GameEventArgsListener : MonoBehaviour | |
{ | |
public GameEventArgs Event; | |
public Object Sender; | |
public GameEventArgsResponse Response; | |
private void OnEnable() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
[CreateAssetMenu] | |
public class GameEventArgs : ScriptableObject | |
{ | |
public void Raise(params Object[] args) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
namespace FiniteStateMachine | |
{ | |
//Handles the function calls | |
public delegate void Handler(); | |
//State class used for creating a state object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System; | |
//cloth simulation | |
[Serializable] | |
public class Particle | |
{ | |
public Vector3 Position | |
{ | |
get |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//notes: 3/3/2014 boids keep flying to flock even though they should be ignoring them | |
//written by Matthew Williamson | |
//adapted from Conrad Parker's pseudocode of Craig W. Reynold's Boid's algorithm | |
//for Unity3D | |
//http://www.red3d.com/cwr | |
using UnityEngine; | |
using System.Collections; | |
//adaptation of Boids pseudocode into Unity taken from http://www.kfish.org/boids/pseudocode.html | |
public class BoidAlgorithm : MonoBehaviour |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Motion(int x, int y) | |
{ | |
if (mouseMoving) | |
{ | |
//get the change in x since mouse down and increment | |
mouse_long += (x - oldX); | |
rLong = Rotation(mouse_long, 'y'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEngine; | |
class TranInputController : MonoBehaviour | |
{ | |
Animator anim; | |
void Update() | |
{ | |
if(Input.GetKeyDown(KeyCode.D)) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Serializable] | |
public enum ButtonCode | |
{ | |
A, | |
B, | |
X, | |
Y, | |
DpadUp, | |
DpadDown, | |
DpadLeft, |