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
#region File Description | |
//----------------------------------------------------------------------------- | |
// Base UI entity. Every widget inherit from this class. | |
// The base entity implement the following key functionality: | |
// 1. Drawing basic stuff like tiled textures with frames etc. | |
// 2. Positioning and calculating destination rect. | |
// 3. Basic events. | |
// 4. Visibility / Disabled / Locked modes. | |
// 5. Managing child entities. | |
// |
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
class Plant : MonoBehaviour { | |
Sprite sprite; | |
float growTime; | |
AudioClip sfx; | |
void Start() { | |
StartCoroutine(WaitForSeconds(growTime)); | |
} | |
IEnumerator WaitForSeconds Grow(float duration) { |
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. |
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
/// | |
/// 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
'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
# 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
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)); | |
} | |
NewerOlder