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
Initializable = function(sender){ | |
var initialized = false; | |
sender.isInitialized = function(){ | |
return initialized; | |
}; | |
sender.setInitialized = function(){ | |
initialized = true; | |
}; |
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
/* | |
* A wiggley text thingy for jquery | |
*/ | |
var WiggleText = function(message){ | |
var el = $("<div></div>").addClass("wiggletext").css({position: 'absolute'}); | |
for(i=0;i<message.length;i++){ | |
$("<span>" + message.charAt(i) + "</span>").css({position: 'relative'}).appendTo(el); | |
} |
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
var Animal, Horse, Snake, sam, tom; | |
var __extends = function(child, parent) { | |
var ctor = function(){ }; | |
ctor.prototype = parent.prototype; | |
child.__superClass__ = parent.prototype; | |
child.prototype = new ctor(); | |
child.prototype.constructor = child; | |
}; | |
Animal = function() { }; | |
Animal.prototype.move = function(meters) { |
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
var Item = function(world, id){ | |
var self = this; | |
var position, scale, asset, | |
properties = {}; | |
this.say = function(message){ | |
$LOGGER.log("<b>Item</b>: " + message); | |
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
var Animal, Horse, Snake, sam, tom; | |
var __extends = function(child, parent) { | |
var ctor = function(){ }; | |
ctor.prototype = parent.prototype; | |
child.__superClass__ = parent.prototype; | |
child.prototype = new ctor(); | |
child.prototype.constructor = child; | |
}; | |
Animal = function() { | |
}; |
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
var Animal, Horse, Snake, sam, tom; | |
var __extends = function(child, parent) { | |
var ctor = function(){ }; | |
ctor.prototype = parent.prototype; | |
child.__superClass__ = parent.prototype; | |
child.prototype = new ctor(); | |
child.prototype.constructor = child; | |
}; | |
Animal = function() { | |
}; |
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
when World.Surface.CANVAS.FORE | |
g: context.createRadialGradient 0, 0, 0, 0, 0, 50 | |
g.addColorStop 0.4, "rgba(150, 183, 51, 1)" | |
g.addColorStop 0.9, "rgba(150, 183, 51, 0)" | |
context.fillStyle: g2 | |
context.beginPath() | |
context.arc 0, 0, 45, 0, Math.PI*2, true | |
context.closePath() | |
context.fill() |
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
Instantiate: (klass) -> | |
ctor = window[klass] | |
if ctor instanceof Function | |
`new ctor` | |
else | |
throw "Could not construct class of type " + klass |
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
redraw: => | |
for x in y | |
$('body').click => | |
@widgify(x) | |
Converts to this... The block inside the for loop isn't passed (this) as a context. |
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
#!/bin/sh | |
# | |
# Pipes the rake coffee:watch growly output to growl | |
# | |
while read; do | |
echo $REPLY | |
# echo $REPLY | growlnotify -a growlify -t $1; |
OlderNewer