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