TweenTransformFollow
Tween subclass for real-time target following.
| Type | Name | Interface Description |
|---|---|---|
| Variables | followTarget: Transform | null | • Function: Transform or ScreenTransform to follow (NOT a SceneObject). Get via |
| Variables | startNumber: number | • Function: Start number value. Used for 2D Rotation only. Only used when |
| Variables | startVector2: Vector2f | • Function: Start Vector2 value. Used for 2D targets (Position, Scale). Only used when |
| Variables | startVector3: Vector3f | • Function: Start Vector3 value. Used for 3D targets. Only used when |
| Variables | targetType: TweenTargetType | • Function: Current animation target type. |
| Functions | constructor() | |
| Functions | pause(): void | • Function: Pauses the tween animation for the follow target transform. |
| Functions | resume(): void | • Function: Resumes the tween animation for the follow target transform. |
| Functions | start(): void | • Function: Start tween animation from initial state. |
| Functions | stop(): void | • Function: Stop the tween animation and keep the current state. |
Examples
constructor()
let obj = new APJS.TweenTransformFollow();
Use Case
@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use TweenTransformFollow here
}
onUpdate(deltaTime: number) {
}
}