Create Tween

Playable
Tanto lado del cliente como del usuario
Disponible en PC y móvil

Create interpolated motion, the specified attributes of the target entity will move smoothly according to the settings

Declaración

func CreateTween(target entity<Entity>, property Property, srcVal object, destVal object, style TweenStyle, curve BezierCurve, duration float, out var createdEntity entity<Tween>, autoPlay bool)
go

Parámetros

Entrada

Nombre Tipo Descripción
Target Entity Target Entity
Property Property The attribute ID that needs movement change
Source Value Object Attribute starting value
Destination Value Object Attribute end value
Style TweenStyle You can choose single, loop and reciprocating.
Loop means that after each movement is completed, the entity will move again from the starting value. Reciprocating means that after the movement from the starting value to the target value is completed, the entity will move from the target value to the starting value again, and then repeat the process
Curve BezierCurve Bezier curve control points
Duration (ms) Float The duration of a change, in milliseconds
Auto Play Bool Whether to automatically start playing after creation

Afuera

Nombre Tipo Descripción
Created Entity Tween Created interpolated motion entity