X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=JSAction.m;h=1cdbeb23e4f0e5b32fe4052cbd25d3a9a3bb1353;hp=a0fab80fde6461ebadd721b28f87cda7647d76f7;hb=0238d141f06420e1a73eccd14ca73a7e29ad2a69;hpb=530009447c5bbd360ac5023979cffc6d32a28df3 diff --git a/JSAction.m b/JSAction.m index a0fab80..1cdbeb2 100644 --- a/JSAction.m +++ b/JSAction.m @@ -5,23 +5,32 @@ // Created by Sam McCall on 4/05/09. // +#import "JSAction.h" + @implementation JSAction -@synthesize usage, cookie, index, subActions, base, name; +- (id)initWithName:(NSString *)newName base:(id )newBase { + if ((self = [super init])) { + self.name = newName; + self.base = newBase; + } + return self; +} --(id) findSubActionForValue: (IOHIDValueRef) value { - return NULL; +- (id)findSubActionForValue:(IOHIDValueRef)value { + return NULL; } --(NSString*) stringify { - return [[NSString alloc] initWithFormat: @"%@~%d",[base stringify],(int)cookie]; +- (NSString *)uid { + return [NSString stringWithFormat:@"%@~%@", [_base uid], _name]; } --(void) notifyEvent: (IOHIDValueRef) value { - [self doesNotRecognizeSelector:_cmd]; + +- (void)notifyEvent:(IOHIDValueRef)value { + [self doesNotRecognizeSelector:_cmd]; } --(BOOL) active { - [self doesNotRecognizeSelector:_cmd]; - return NO; + +- (float)magnitude { + return 0.f; } @end