Replace hacky target stringification with structured serialization.
[enjoyable.git] / Target.h
1 //
2 // Target.h
3 // Enjoy
4 //
5 // Created by Sam McCall on 5/05/09.
6 // Copyright 2009 University of Otago. All rights reserved.
7 //
8
9 @class JoystickController;
10
11 @interface Target : NSObject
12
13 @property (assign) float magnitude;
14 @property (assign) BOOL running;
15 @property (readonly) BOOL isContinuous;
16
17 - (void)trigger;
18 - (void)untrigger;
19 - (BOOL)update:(JoystickController *)jc;
20
21 - (NSDictionary *)serialize;
22 + (Target *)targetDeserialize:(NSDictionary *)serialization
23 withConfigs:(NSArray *)configs;
24 + (NSString *)serializationCode;
25
26 @end