This file contains 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
%!PS | |
/Helvetica findfont 9 scalefont setfont | |
/printBeer { | |
dup | |
20 string cvs show | |
( bottle) show | |
1 ne | |
{ (s) show } if | |
( of beer) show |
This file contains 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
/Applications/Unity/Unity.app/Contents/Frameworks/MonoBleedingEdge/bin/mono /Applications/Unity/Unity.app/Contents/Frameworks/MonoBleedingEdge/lib/mono/2.0/xbuild.exe build.proj /target:"Dist" /p:Runtime="Mono" /p:Configuration="Debug 3.5" /p:Platform="Any CPU" |
This file contains 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
/* | |
each of your game states can inherit from ofBaseApp if you're just | |
overriding update and draw and the like. this is the simplest thing | |
you can do and that's the example included here. other states besides | |
MenuState can be implemented in the same way. | |
more generally and more powerfully, you could create a GameState class | |
that all of your states inherit from. there, you would define methods | |
to override like update and draw, but also methods to handle switching | |
between states that each state can override. this requires an understanding |
This file contains 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
pos = x:20, y:20 | |
setup = -> | |
createCanvas w:800, h:800 | |
# square animation | |
timeline -> pos.x += 1 >= width - 50 | |
timeline -> pos.y += 1 >= height - 50 | |
timeline -> pos.x -= 1 <= 20 | |
timeline -> pos.y -= 1 <= 20 |
This file contains 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
(ns PlainClojureShit | |
(:import | |
(UnityEngine Debug) | |
(UnityEditor EditorGUILayout))) | |
(def happy (atom true)) ;; Multiple instances of this component will SHARE this atom! They should each have their OWN atom! | |
(defn start [this] | |
(Debug/Log "PlainClojureShit is starting")) |
This file contains 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
function Update () { | |
if(Input.GetKeyDown("space")) { | |
GetComponent(WeirdGravity).gravity.y = 30; | |
} | |
} |
This file contains 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
int num = 2000; | |
int range = 6; | |
float[] ax = new float[num]; | |
float[] ay = new float[num]; | |
void setup() | |
{ |
This file contains 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
function namedArgs(fn) { | |
var names = fn.toString().match(/function.*\(([^\)]+)\)/)[1].split(','); | |
return eval("(function(args) {\ | |
return fn(" + names.map(function(n) { return "args[\"" + n.trim() + "\"]"}).join() + ");\ | |
})"); | |
} |
This file contains 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 Start () { | |
InvokeRepeating ("NewTarget", 3, 3); | |
} | |
void NewTarget() { | |
target = GameObject.FindGameObjectsWithTag ("Enemy").Where(go => go.transform.position.z > 5).Shuffle ().FirstOrDefault (); | |
} |
This file contains 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
(defn start [] | |
(invoke-repeating new-target 3 3)) | |
(defn new-target [] | |
(set! target (->> (unity/find :tag "Enemy") (filter #(> (.. % transform position z) 5)) (shuffle) (first))) |
OlderNewer