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
import UnityEngine | |
class Health(MonoBehaviour): | |
public health as single | |
def Damage(amount as single): | |
health -= amount | |
NotifyDeath() if health < 0f | |
def NotifyDeath(): |
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
import UnityEngine | |
import Finput | |
#import Input | |
class TankMovement(MonoBehaviour): | |
public wheels as GameObject | |
public speed = 100.0f | |
public breaking = 50.0f | |
wheelColliders as List of WheelCollider | |
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
using UnityEngine; | |
using Finput; | |
// using Input; | |
public class TankMovement : MonoBehaviour | |
{ | |
public GameObject wheels; | |
public float speed = 100.0f; | |
public float breaking = 50.0f; | |
float List<WheelCollider> wheelColliders; |
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
~/Projects/Jetpack$ MONO_PATH=/Applications/Unity/Unity.app/Contents/Frameworks/Managed nunit-console2 Library/ScriptAssemblies/*.dll | |
NUnit version 2.4.8 | |
Copyright (C) 2002-2007 Charlie Poole. | |
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov. | |
Copyright (C) 2000-2002 Philip Craig. | |
All Rights Reserved. | |
Runtime Environment - | |
OS Version: Unix 10.6.0.0 | |
CLR Version: 2.0.50727.1433 ( 2.10.1 (tarball Fri Feb 25 15:56:49 MST 2011) ) |
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
""" | |
doing expensive processing | |
1234 | |
1234 | |
""" | |
import Useful.Attributes from "Boo.Lang.Useful" | |
class OnceTest: | |
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
void SomeMethod() { | |
try { | |
var foo = DoSomethingThatMightBreak(); | |
} catch { | |
// handle | |
} | |
var foo = "asdf"; | |
} |
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
def GetSideOffset(normalized as Vector3, additionalOffset as single): | |
absX = Mathf.Abs(normalized.x) | |
absY = Mathf.Abs(normalized.y) | |
absZ = Mathf.Abs(normalized.z) | |
if absX > absY and absX > absZ: | |
if normalized.x > 0: | |
return Vector3.right * additionalOffset | |
else: | |
return Vector3.left * additionalOffset | |
elif absY > absZ and absY > absZ: |
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
public delegate void CreateThingHandler(Func<Thing, Thing> preCreate, Thing thing); | |
public class Thing | |
{ | |
public static event CreateThingHandler OnMadeThing; | |
public bool Valid { get; set;} | |
List<Thing> things = new List<thing>(); | |
public static Thing MakeThing(Func<Thing, Thing> func) | |
{ |
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
[user] | |
name = Logan Barnett | |
email = [email protected] | |
[color] | |
status = auto | |
branch = auto | |
diff = auto | |
[mergetool "diffmerge"] | |
cmd = /Applications/DiffMerge.app/Contents/MacOS/DiffMerge \ | |
--nosplash \ |
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 | |
# Shell script to install your public key on a remote machine | |
# Takes the remote machine name as an argument. | |
# Obviously, the remote machine must accept password authentication, | |
# or one of the other keys in your ssh-agent, for this to work. | |
ID_FILE="${HOME}/.ssh/id_rsa.pub" | |
if [ "-i" = "$1" ]; then |