This file contains hidden or 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
namespace Example | |
{ | |
public class NonUnityObjectSingleton | |
{ | |
public static readonly NonUnityObjectSingleton Instance = new NonUnityObjectSingleton(); | |
// private contructor prevents anyone else from creating a second instance. | |
private NonUnityObjectSingleton() { } | |
} | |
This file contains hidden or 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
#!/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 $* |
This file contains hidden or 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
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]; | |
} |