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
from random import randrange | |
class Ship: | |
sea = "" | |
aliveRounds = 1 | |
fatigue = False | |
dead = False | |
def __init__(self, sea): |
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
{ | |
"id": 13953, | |
"description": "Sparmigiano 1", | |
"user": { | |
"id": 2461, | |
"name": "ggohierroy" | |
}, | |
"players": [ | |
{ | |
"id": 2461, |
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
{ | |
"status": "active", | |
"actions": [ | |
{ | |
"type": "bid", | |
"entity": "Player 1", | |
"entity_type": "player", | |
"id": 1, | |
"company": "OBC", | |
"price": 0 |
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 "Sprite.h" | |
@implementation Sprite | |
@synthesize textureInfo = _textureInfo; | |
@synthesize program = _program; | |
- (void)draw | |
{ | |
NSLog(@"Drawing a sprite"); | |
} |
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 <GLKit/GLKit.h> | |
#import "Entity.h" | |
#import "TextureCache.h" | |
#import "GLProgram.h" | |
#import "ProgramManager.h" | |
@interface Sprite : Entity | |
@property (strong, nonatomic) GLKTextureInfo *textureInfo; | |
@property (strong, nonatomic) GLProgram *program; |
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
///////////////////////////////////////////////////////////////////////////////////////////////////// | |
// Interface (.h) | |
#import <Foundation/Foundation.h> | |
#import <GLKit/GLKit.h> | |
@interface TextureCache : NSObject | |
+ (TextureCache*) sharedTextureCache; | |
- (GLKTextureInfo*)addImage:(NSString*)fileName; | |
@end |
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
///////////////////////////////////////////////////////////////////////////////////////////////////// | |
// Interface (.h) | |
#import "GLProgram.h" | |
@interface ProgramManager : NSObject | |
+ (ProgramManager*)sharedProgramManager; | |
- (GLProgram*)getDefaultProgram; | |
@end |
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
///////////////////////////////////////////////////////////////////////////////////////////////////// | |
// Interface (.h) | |
@interface GLProgram : NSObject | |
- (void)use; | |
- (id)initWithVertexShader:(NSString*)vertexShaderName fragmentShader:(NSString*)fragmentShaderName; | |
@end | |
///////////////////////////////////////////////////////////////////////////////////////////////////// | |
// Implementation (.m) |
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 "IntroScene.h" | |
@implementation IntroScene | |
- (id)init | |
{ | |
self = [super init]; | |
if(self) | |
{ | |
Sprite* sprite = [[Sprite alloc] init]; |
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 "Steve.h" | |
static Steve* _sharedDirector = nil; | |
@interface Steve() | |
@property (strong, nonatomic) EAGLContext *context; | |
@property (strong, nonatomic) Scene *nextScene; | |
@property (strong, nonatomic) Scene *currentScene; | |
@end |
NewerOlder