Skip to content

Instantly share code, notes, and snippets.

View AndySum's full-sized avatar

AndySum

View GitHub Profile
//put into two monobehaviours in unity if you want to run it, and put AwakeChild on a gameobject.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AwakeBase : MonoBehaviour {
protected bool setup = false;
Transform thisWillBeNullInChild;
@AndySum
AndySum / PoolTest.cs
Created January 3, 2017 05:53
Pool benchmarking for Unity Asset Store
using UnityEngine;
using System.Collections;
using PathologicalGames;
public class PoolTest : MonoBehaviour {
[SerializeField] SpawnPool pathpool;
[SerializeField] GameObject sourcePrefab;
int spawnno = 5000;
@AndySum
AndySum / .vimrc
Last active December 22, 2015 06:59
my .vimrc
" Use spaces instead of tabs
set expandtab
"show line numbers
set nu
:highlight LineNr ctermfg=grey
"Be smart when using tabs
set smarttab
@AndySum
AndySum / gist:6421240
Last active December 22, 2015 04:59
This is a fragment of some Python code within a function. I can't understand why it changes the value at key (5,4) and (5,5). When I try this isolated example in a normal compiler it works. how come I get this output?!?
node = (5,4)
direction = "South"
print "moves is",moves
print "i'm going to add",direction,"at",node
moves[node].append(direction)
print "moves is",moves
sys.exit("fuck this")
#Output
'''