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
info: Welcome to Nodejitsu trahdivad | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command start | |
info: Starting app genesis | |
error: Error running command start | |
error: Nodejitsu Error (500): Internal Server Error | |
error: There was an error while attempting to deploy your application. | |
error: | |
error: NPM Install failed | |
error: NPM failed to install dependencies |
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
11 | |
11 | |
11 | |
11 | |
11 | |
11 | |
11 | |
11 | |
11 | |
11 |
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
exports.authenticator = (req, res, next) -> | |
playerId = req?.query?.playerId | |
if playerId? then return next error(400, 'player id required') | |
req.playerId = playerId | |
next() |
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
mongoose = require 'mongoose' | |
Schema = mongoose.Schema | |
playerSchema = new Schema | |
gameCenterID: { type: String, required: true, unique: true } | |
module.exports = mongoose.model 'Player', playerSchema |
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
mocha = require 'mocha' | |
should = require 'should' | |
database = require '../database' | |
Player = require '../app/player' | |
describe 'Player', => | |
before => | |
database.connect() | |
beforeEach => | |
@player = new Player |
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
@interface FUReadonlyVector2 : NSObject | |
@property (nonatomic, readonly) GLKVector2 vectorValue; | |
@end | |
@implementation FUReadonlyVector2 | |
@synthesize vectorValue = _vectorValue; | |
@end |
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
Davids-iMac:~ david$ rvm install macruby-nightly | |
Retrieving the latest nightly macruby build... | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 21.4M 100 21.4M 0 0 626k 0 0:00:35 0:00:35 --:--:-- 662k | |
Password: | |
Davids-iMac:~ david$ rvm list | |
rvm rubies |
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)updateProjection | |
{ | |
CGSize viewSize = [[[self director] view] bounds].size; | |
GLKMatrix4 projectionMatrix = GLKMatrix4MakeOrtho(0, viewSize.width, viewSize.height, 0, 0, FLT_MAX); | |
GLKBaseEffect* effect = [self effect]; | |
[[effect transform] setProjectionMatrix:projectionMatrix]; | |
[effect prepareToDraw]; | |
} |
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)drawSpritesWithEffect:(GLKBaseEffect*)effect | |
{ | |
glBindVertexArrayOES([self vertexArray]); | |
GLKEffectPropertyTexture* textureProperty = [effect texture2d0]; | |
for (FUSpriteBatch* batch in [[self spriteBatches] allValues]) | |
{ | |
FUTexture* texture = [batch texture]; | |
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)fillVertexBuffer | |
{ | |
static const GLKVector2 kT0 = { 0, 0 }; | |
static const GLKVector2 kT1 = { 0, 1 }; | |
static const GLKVector2 kT2 = { 1, 0 }; | |
static const GLKVector2 kT3 = { 1, 1 }; | |
glBindBuffer(GL_ARRAY_BUFFER, [self vertexBuffer]); | |
FUVertex* vertices = glMapBufferOES(GL_ARRAY_BUFFER, GL_WRITE_ONLY_OES); | |
NSUInteger vertexIndex = 0; |