Object <- Viewable <- Stamp <- Animation <- BehaviorAnimation |
|
|
MatchImage |
|
Behavior |
| Field | Type | |
|---|---|---|
| Viewable: | superview: | Viewable |
| relativeOrigin: | Dot | |
| contentSize: | Dot | |
| viewFlags: | Flags | |
| labelStyle: | TextStyle | |
| color: | Unsigned | |
| altColor: | Unsigned | |
| shadow: | Shadow | |
| sound: | Playable | |
| Stamp: | image: | Image |
| Animation: | lastFrameMilliseconds: | Unsigned |
| lastDrawMilliseconds: | Unsigned | |
| frameDelay: | Unsigned | |
| cycleDelay: | Unsigned | |
| horizontalVelocity: | Micron | |
| verticalVelocity: | Micron | |
| inMotion: | Boolean | |
| rotated: | Boolean | |
| horizontallyFlipped: | Boolean | |
| verticallyFlipped: | Boolean | |
| canBounceHorizontally: | Boolean | |
| canBounceVertically: | Boolean | |
| canFlipHorizontally: | Boolean | |
| canFlipVertically: | Boolean | |
| canTurnRight: | Boolean | |
| canTurnLeft: | Boolean | |
| canRotate: | Boolean | |
| oneShot: | Boolean | |
| canTouch: | Boolean | |
| dragAlong: | Boolean | |
| dontJump: | Boolean | |
| soundTrack: | Boolean | |
| BehaviorAnimation: | behavior: | Unsigned |
| behaviorImages: | ObjectList | |
| behaviorDelays: | IntegerList |
instance BehaviorAnimation tag; relativeOrigin: <0.0,0.0>; contentSize: <0.0,0.0>; viewFlags: 0x00000000; labelStyle: nilObject; color: 0; altColor: 0; shadow: nilObject; sound: nilObject; image: nilObject; lastFrameMilliseconds: 0; lastDrawMilliseconds: 0; frameDelay: 0; cycleDelay: 0; horizontalVelocity: <0.0>; verticalVelocity: <0.0>; inMotion: false; rotated: false; horizontallyFlipped: false; verticallyFlipped: false; canBounceHorizontally: false; canBounceVertically: false; canFlipHorizontally: false; canFlipVertically: false; canTurnRight: false; canTurnLeft: false; canRotate: false; oneShot: false; canTouch: false; dragAlong: false; dontJump: false; soundTrack: false; behavior: 0; behaviorImages: nilObject; behaviorDelays: nilObject; end instance;
Define Class BehaviorAnimation; inherits from Animation; field behavior: Unsigned, getter; // current behavior state field behaviorImages: ObjectList; // image sets for each behavior field behaviorDelays: IntegerList; // frame delay for each image set attribute Behavior: Unsigned; overrides MatchImage; // matches image against all images in behavior image list end class;