[operations] [attributes] [fields] [template] [definition]
[implementation] [documentation]
To use the search tool you need to use a browser which supports JAVA (c)

[next] [prev] [superclass] [next peer] [prev peer] [subclass] [index] [hierarchy]

Animation

inherits from Stamp

Object <- Viewable <- Stamp <- Animation



Operations

Get list of all operations

AboutToHide
Arrived
CanAcceptCoupon
ChangedContainers
Idle
MadeContact
MatchImage
MatchText
OpeningTinkerWindow
SetVelocity
Tap
UnionThickness
Velocity


Attributes

Get list of all attributes

CanBounceHorizontally
CanBounceVertically
CanFlipHorizontally
CanFlipVertically
CanRotate
CanTouch
CanTurnLeft
CanTurnRight
CycleDelay
FrameDelay
HorizontalSpeed
HorizontalVelocity
HorizontallyFlipped
InMotion
OneShot
Orientation
Orientation
Rotated
VerticalSpeed
VerticalVelocity
VerticallyFlipped


Fields

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


Instance template

instance Animation 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;
end instance;

Class definition

Define Class Animation;
    inherits from Stamp;

    field lastFrameMilliseconds: Unsigned;
    field lastDrawMilliseconds: Unsigned;

    field frameDelay: Unsigned, getter, setter;
    field cycleDelay: Unsigned, getter, setter;
    field horizontalVelocity: Micron, getter, setter;
    field verticalVelocity: Micron, getter, setter;

    field inMotion: Boolean, getter, setter;                
        // moving right now?                                    
    field rotated: Boolean, getter;                         
        // current rotation state                   
    field horizontallyFlipped: Boolean, getter;             
        // current horizontal flip state                        
    field verticallyFlipped: Boolean, getter;               
        // current vertical flip state                      

    field canBounceHorizontally: Boolean, getter, setter;   
        // bounce at left and right instead of wrap 
    field canBounceVertically: Boolean, getter, setter;     
        // bounce at top and bottom instead of wrap 
    field canFlipHorizontally: Boolean, getter, setter;     
        // flip at each horiz bounce                
    field canFlipVertically: Boolean, getter, setter;       
        // flip at each vert bounce                 

    field canTurnRight: Boolean, getter, setter;            
        // turn right when hit any wall             
    field canTurnLeft: Boolean, getter, setter;             
        // turn left when hit any wall              
    field canRotate: Boolean, getter, setter;               
        // rotate image when turn left or right     
    field oneShot: Boolean, getter, setter;                 
        // dispose instead of bounce                

    field canTouch: Boolean, getter, setter;                
        // generate touches                         
    field dragAlong: Boolean;                               
        // drags along the corridor with it         
    field dontJump: Boolean;                                
        // if set, don't jump when tapped           
    field soundTrack: Boolean;                              
        // if set, play sound continously           
    
    overrides AboutToHide, Arrived;

    attribute CycleDelay: Unsigned, safe, common;
    attribute FrameDelay: Unsigned, safe, common;
    attribute InMotion: Boolean, safe, common;
    
    attribute CanBounceHorizontally: Boolean, safe, common;
    attribute CanBounceVertically: Boolean, safe, common;
    attribute CanFlipHorizontally: Boolean, safe, common;
    attribute CanFlipVertically: Boolean, safe, common;

    overrides Orientation, SetOrientation;
    attribute CanTurnRight: Boolean, safe, common;
    attribute CanTurnLeft: Boolean, safe, common;
    attribute CanRotate: Boolean, safe, common;
    attribute OneShot: Boolean;

    attribute CanTouch: Boolean, safe, common;

    attribute HorizontalSpeed: Micron, safe, common;
    attribute VerticalSpeed: Micron, safe, common;
    attribute HorizontalVelocity: Micron, safe, common;
    attribute VerticalVelocity: Micron, safe, common;
    operation Velocity(var velocity: Dot);
        // stores horizontal velocity in velocity.h and vertical
        // velocity in velocity.v
    operation SetVelocity(velocity: Dot); 

    attribute Rotated: Boolean, safe, common;
    attribute HorizontallyFlipped: Boolean, safe, common;
    attribute VerticallyFlipped: Boolean, safe, common;

    operation MadeContact(velocity: Dot; hitFlags: Unsigned);
    
    overrides CanAcceptCoupon, ChangedContainers;
    overrides Idle;
    overrides MatchImage;
    overrides MatchText;
        // returns true if name matches text, even if ShowLabel is false

    overrides OpeningTinkerWindow;
    overrides Tap;
    
    intrinsic UnionThickness(image: Image; orientation: UnsignedShort; var thickness: Box);

end class;