Skip to content

Instantly share code, notes, and snippets.

#import "SXSwitch.h"
@implementation SXSwitch
@synthesize on;
@synthesize onGraphic;
@synthesize offGraphic;
- (id)init{
self = [super init];
on = YES;
#import "SXSlider.h"
@implementation SXSlider
@synthesize handle;
@synthesize track;
@synthesize value;
@synthesize min;
@synthesize max;
@synthesize percentage;
#import "SXJoypad.h"
@implementation SXJoypad
@synthesize centerPoint;
@synthesize verticalDirection;
@synthesize horizontalDirection;
@synthesize projection;
@synthesize angle;
@synthesize projectionModifier;
@pixelrevision
pixelrevision / SXPointSpriteGroup.m
Created April 10, 2011 07:09
SXPointSpriteGroup.h
#import "SXPointSpriteGroup.h"
@implementation SXPointSpriteGroup
@synthesize texture;
- (id)initWithTexture:(SPTexture*)t andNumSprites:(int)amount{
self = [super init];
numPointSprites = amount;
self.texture = t;
[self reset];
@pixelrevision
pixelrevision / Example usage
Created April 1, 2011 21:31
Will check the time of method execution
- (void)someMethod{
StartTimeLog
// do some stuff
EndTimeLog
}
@pixelrevision
pixelrevision / SXCompiledTileMap.h
Created March 31, 2011 17:52
A tilemap setup for the sparrow framework
#import <Foundation/Foundation.h>
#import "Sparrow.h"
#import "SPCompiledSprite.h"
#import "SXTilemap.h"
#define SX_COMPILED_TILEMAP_RENDER_COMPLETE_EVENT @"renderComplete"
@interface SXCompiledTileMap : SXTilemap {
int quadrantsX;
int quadrantsY;
@pixelrevision
pixelrevision / SXFPSMeter
Created March 30, 2011 04:30
Quick and dirty frames per second meter for sparrow
#import <Foundation/Foundation.h>
#import "Sparrow.h"
@interface SXFPSMeter : SPTextField{
}
- (void)update:(SPEnterFrameEvent*)event;
@end