... <- Viewable <- Stamp <- Animation <- BehaviorAnimation <- Animal |
|
|
AboutToShow DragTrack Idle IsFalling Swallow Tap |
|
Behavior HorizontalVelocity |
| 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 | |
| Animal: | behaviorSpeeds: | IntegerList |
| behaviorPeriods: | IntegerList | |
| animalPatience: | Unsigned |
instance Animal 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; behaviorSpeeds: nilObject; behaviorPeriods: nilObject; animalPatience: 0; end instance;
Define Class Animal; inherits from BehaviorAnimation; field behaviorSpeeds: IntegerList; // default speed for each image set (dot list) field behaviorPeriods: IntegerList; // time basis for each behavior (dot list: base, random) field animalPatience: Unsigned; // period of behavior overrides AboutToShow; overrides DragTrack; // pinch up before Inherited; fall down after overrides Idle; overrides Tap; overrides Swallow; overrides SetBehavior; overrides SetHorizontalVelocity; // keep orientation in sync with direction of velocity operation IsFalling(): Boolean, intrinsic; end class;