PropertyTweener
Interpolates an Object
’s property over time.
class PropertyTweener
PropertyTweener
is used to interpolate a property in an object. See tweenProperty(object:property:finalVal:duration:)
for more usage information.
Superclasses
class Tweener
Abstract class for all Tweeners used by
Tween
.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Type members
Instance members
func asRelative(
) -> PropertyTweener? When called, the final value will be used as a relative value instead.
func from(value: Variant
) -> PropertyTweener? Sets a custom initial value to the
PropertyTweener
.func fromCurrent(
) -> PropertyTweener? Makes the
PropertyTweener
use the current property value (i.e. at the time of creating thisPropertyTweener
) as a starting point. This is equivalent of usingfrom(value:)
with the current value. These two calls will do the same:func setDelay(Double
) -> PropertyTweener? Sets the time in seconds after which the
PropertyTweener
will start interpolating. By default there’s no delay.func setEase(Tween.EaseType
) -> PropertyTweener? Sets the type of used easing from
Tween.EaseType
. If not set, the default easing is used from theTween
that contains this Tweener.func setTrans(Tween.TransitionType
) -> PropertyTweener? Sets the type of used transition from
Tween.TransitionType
. If not set, the default transition is used from theTween
that contains this Tweener.