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
import pygame | |
import sys | |
def lightened(colour, amount): | |
newcolour = pygame.Color(colour.r, colour.g, colour.b, colour.a) | |
h, s, l, a = newcolour.hsla | |
if l+amount > 100: l = 100 | |
elif l+amount < 0: l = 0 | |
else: l += amount | |
newcolour.hsla = (h, s, l, a) |
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 "MaskedTexture" | |
{ | |
Properties | |
{ | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
_Mask ("Culling Mask", 2D) = "white" {} | |
_Cutoff ("Alpha cutoff", Range (0,1)) = 0.1 | |
} | |
SubShader | |
{ |
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 UnityEditor; | |
using UnityEngine; | |
public class VisualiseMeshNormals : MonoBehaviour { | |
public enum MeshType { Filter, Collider } | |
public MeshType meshType = MeshType.Filter; | |
protected MeshFilter meshFilter; | |
protected MeshCollider meshCollider; |
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 UnityEngine; | |
using System; | |
public class Mathfx | |
{ | |
public static float Hermite(float start, float end, float value) | |
{ | |
return Mathf.Lerp(start, end, value * value * (3.0f - 2.0f * value)); | |
} | |
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
# Unity | |
*.unityproj | |
[Oo]bj/ | |
[Tt]emp/ | |
[Ll]ibrary/ | |
[Bb]uild/ | |
# OSX | |
.DS_Store* | |
._* |
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
'1': ['q', '2'], | |
'2': ['1', 'q', 'w', '3'], | |
'3': ['2', 'w', 'e', '4'], | |
'4': ['3', 'e', 'r', '5'], | |
'5': ['4', 'r', 't', '6'], | |
'6': ['5', 't', 'y', '7'], | |
'7': ['6', 'y', 'u', '8'], | |
'8': ['7', 'u', 'i', '9'], | |
'9': ['8', 'i', 'o', '0'], | |
'0': ['9', 'o', 'p'], |
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
/// | |
/// Simple pooling for Unity. | |
/// Author: Martin "quill18" Glaude (quill18@quill18.com) | |
/// Latest Version: https://gist.github.com/quill18/5a7cfffae68892621267 | |
/// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/) | |
/// UPDATES: | |
/// 2015-04-16: Changed Pool to use a Stack generic. | |
/// | |
/// Usage: | |
/// |
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; | |
using System.Collections.Generic; | |
using UnityEditor; | |
public class Build { | |
static string[] SCENES = FindEnabledEditorScenes(); | |
static void PerformBuild() { | |
GenericBuild( | |
SCENES, |
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
/* | |
Spotify "Save to Music" | |
Based on: http://superuser.com/a/879589 | |
Fires on Ctrl+Shift+L, but obviously you can change that to whatever you want. | |
*/ | |
^+l:: | |
spotify = ahk_class SpotifyMainWindow | |
IfWinExist, %spotify% | |
{ | |
;Store active window and mouse position. |
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
/* | |
Spotify "Save to Music" | |
Based on: http://superuser.com/a/879589 | |
Fires on Ctrl+Shift+L, but obviously you can change that to whatever you want. | |
*/ | |
^+l:: | |
spotify = ahk_class SpotifyMainWindow | |
IfWinExist, %spotify% | |
{ | |
;Store active window and mouse position. |
OlderNewer