MotionOptions
public struct MotionOptions : OptionSet
An integer options set providing possible initialization options for a Moveable
object.
-
Declaration
Swift
public let rawValue: Int
-
Declaration
Swift
public init(rawValue: Int)
-
No options are specified.
Declaration
Swift
public static let None = MotionOptions(rawValue: 0)
-
Specifies that a motion should repeat.
Declaration
Swift
public static let Repeat = MotionOptions(rawValue: 1 << 0)
-
Specifies that a motion should reverse directions after moving in the forward direction.
Declaration
Swift
public static let Reverse = MotionOptions(rawValue: 1 << 1)
-
Specifies that a motion’s property (or parent, if property is not KVC-compliant) should be reset to its starting value on repeats or restarts.
Remark
Motion
andPhysicsMotion
are the only MotionMachine classes that currently accept this option.Declaration
Swift
public static let ResetStateOnRepeat = MotionOptions(rawValue: 1 << 2)