Forked Enjoy, mouse movement
[enjoyable.git] / SubAction.m
diff --git a/SubAction.m b/SubAction.m
new file mode 100644 (file)
index 0000000..cfca78b
--- /dev/null
@@ -0,0 +1,25 @@
+//
+//  SubAction.m
+//  Enjoy
+//
+//  Created by Sam McCall on 5/05/09.
+//
+
+@implementation SubAction
+
+@synthesize base, name, index, active;
+
+-(id) initWithIndex:(int)newIndex name: (NSString*)newName base: (JSAction*)newBase {
+       if(self = [super init]) {
+               [self setName: newName];
+               [self setBase: newBase];
+               [self setIndex: newIndex];
+       }
+       return self;
+}
+
+-(NSString*) stringify {
+       return [[NSString alloc] initWithFormat: @"%@~%d", [base stringify], index];
+}
+
+@end