Skip to content

Instantly share code, notes, and snippets.

@sethillgard
sethillgard / gist:4982341
Last active December 13, 2015 22:08
#silentkrakenblog Manager systems for unity3d, a new approach
[RequireComponent(typeof(GameManager))]
[RequireComponent(typeof(ScreenManager))]
[RequireComponent(typeof(AudioManager))]
[RequireComponent(typeof(MissionManager))]
public class Managers : MonoBehaviour
{
private static GameManager gameManager;
public static GameManager Game
{
get { return gameManager; }
@tornewuff
tornewuff / subl
Created January 16, 2013 00:28
Script to wrap Sublime Text 2 on Linux, handling proper background invocation and using rmate to edit remotely when not in an X session (the guess being that if there's no DISPLAY we are connected via ssh).
#!/bin/bash
if [ -z "$DISPLAY" ]; then
exec rmate "$@"
fi
for arg do
case $arg in
"-w" | "--wait") NEED_FOREGROUND=1;;
"-h" | "--help") NEED_FOREGROUND=1;;