This file contains 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
string PrintMe(){ | |
Dictionary<string,string> pictos = new Dictionary<string,string>(); | |
pictos.Add("ur", "└"); | |
pictos.Add("ulr", "┴"); | |
pictos.Add("dlr", "┬"); | |
pictos.Add("udr", "├"); | |
pictos.Add("lr", "─"); | |
pictos.Add("udlr", "┼"); | |
pictos.Add("dr", "┌"); | |
pictos.Add("dl", "┐"); |
This file contains 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; | |
using UnityEngine.Events; | |
public class PulseOnBeat : MonoBehaviour { | |
public float minScale; | |
public float maxScale; |
This file contains 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
var old_sin = Math.sin; | |
Math.sin = function(x) { | |
if (typeof x == "number" && isFinite(x)){ | |
return old_sin(x); | |
} | |
var str = "" + x; | |
if (str.length>0){ | |
str = str.repeat(Math.ceil(Math.max(1,18/str.length))); | |
} | |
var sinstr = "|\n"; |
This file contains 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
-- Creates a table containing the values 1 through num | |
function tableOf(num) | |
local t = {} | |
for i=1,num do | |
t[i] = i | |
end | |
return t | |
end | |
-- Shuffles a table |
This file contains 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; | |
public class Walkabout : MonoBehaviour { | |
public float acceleration = 1; | |
public float friction; | |
public float radius; | |
Vector3 velocity; |
This file contains 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
Shader "Custom/Blob" { | |
Properties { | |
_Color ("Color", Color) = (1,1,1,1) | |
_MainTex ("Albedo (RGB)", 2D) = "white" {} | |
_PushTex ("Thing", 2D) = "white" {} | |
_Push ("Push", Range(-1,1)) = 0.0 | |
} | |
SubShader { | |
Tags { "RenderType"="Opaque" } | |
LOD 200 |
This file contains 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; | |
using UnityEngine.UI; | |
public class FPS : MonoBehaviour { | |
Text text; | |
float smootheddt = 1 / 60; | |
float smoothvel; | |
List<float> last100; |
This file contains 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; | |
public class StretchProject : MonoBehaviour { | |
public Matrix4x4 originalProjection; | |
Camera cam; | |
[Range(1,2)] | |
public float stretch = 1; |
This file contains 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; | |
public static class Brainput{ | |
public static float GetAxis(int controller, int axis){ | |
return Input.GetAxis("joystick " + controller + " analog " + axis); | |
} | |
public static bool GetButton(int controller, int button){ |
This file contains 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; | |
// This is what our events look like | |
public delegate void AimTrackerEvent(Vector3 point, int playerNumber); | |
public class AimTracker : MonoBehaviour { | |
// These are all the events |