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
class CSVRow | |
constructor: (bucket) -> | |
@day = moment(bucket.time).format('L') | |
@time = moment(bucket.time).format('LT') | |
@totalAmount = "$#{bucket.totalAmount}" | |
@averageAmount = "$#{bucket.averageAmount}" | |
@transactions = bucket.transactions | |
$scope.generateCSV = -> | |
$scope.csvArray = [] |
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 targetX = sprite.x + 50; | |
game.add.tween(sprite).to({x: targetX}, 250, Phaser.Easing.Linear.None).start() |
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
torpedoApp.config(function($provide) { | |
$provide.decorator('$modal', function($delegate,$rootScope) { | |
var openFn = $delegate.open; | |
$delegate.open = function() { | |
console.debug('open!'); | |
var regged = false; | |
var args = [].slice.call(arguments); | |
var modalInstance = openFn.apply(null, args); | |
modalInstance.opened.then(function(status) { | |
console.debug('open status:', status); |
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() { | |
'use strict'; | |
function Menu() {} | |
var map, ground,layer, player, background, jumpButton, copTimer, enemyGroup, playerCollisionGroup, groundCollisionGroup; | |
Menu.prototype = { | |
create: function() { | |
game.physics.startSystem(Phaser.Physics.P2JS); | |
game.physics.p2.setImpactEvents(true); | |
game.physics.p2.gravity.y = 500; |
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
'use strict'; | |
var Block = function(x, y, size, color ) { | |
this.size = size; | |
this.color = color; | |
this.bmd = game.add.bitmapData(this.size, this.size); | |
this.createTexture(); | |
Phaser.Sprite.call(this, game, x, y, this.bmd); |
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
'use strict'; | |
var nameCounter = 0; | |
var Pipe = function(game, x, y, frame) { | |
Phaser.Sprite.call(this, game, x, y, 'pipe', frame); | |
this.anchor.setTo(0.5, 0.5); | |
this.game.physics.arcade.enableBody(this); | |
this.body.allowGravity = false; | |
this.body.immovable = true; | |
this.name = 'pipe-' + nameCounter; |
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 sprite = game.add.sprite(x, y, 'spriteSheet'); | |
sprite.animations.add('idle', [3]); | |
var spriteAnimation = sprite.animations.add('jump', [0,1,2,3,2,1]); | |
spriteAnimation.onComplete.add(animationStopped, this); | |
sprite.play('jump'); | |
function animationStopped() { | |
sprite.play('idle') |
OlderNewer