Skip to content

Instantly share code, notes, and snippets.

View GarthSmith's full-sized avatar

Garth Smith GarthSmith

View GitHub Profile
@GarthSmith
GarthSmith / Initialize.cs
Last active February 15, 2019 20:31
Unity Init
namespace Example
{
public class NonUnityObjectSingleton
{
public static readonly NonUnityObjectSingleton Instance = new NonUnityObjectSingleton();
// private contructor prevents anyone else from creating a second instance.
private NonUnityObjectSingleton() { }
}
@GarthSmith
GarthSmith / nuget.sh
Created July 19, 2017 05:13 — forked from andypiper/nuget.sh
nuget for OS X
#!/bin/sh
# add a simple 'nuget' command to Mac OS X under Mono
# get NuGet.exe binary from http://nuget.codeplex.com/releases/view/58939
# get Microsoft.Build.dll from a Windows .NET 4.0 installation
# copy to /usr/local/bin and Robert is your father's brother....
#
PATH=/usr/local/bin:$PATH
mono --runtime=v4.0 /usr/local/bin/NuGet.exe $*
private Fireball[] Fireballs;
private void Start()
{
Fireballs = GetComponentsInChildren<Fireball>(); // 18 length
Vector3[] directions = GetDirectionsIn18Directions(); // 18 length
for (int n = 0; n < Fireballs.Length; n++)
{
Fireballs[n].transform.forward = directions[n];
}