ValueAssistantGroup
@MainActor
public final class ValueAssistantGroup<TargetType> : ValueAssistant where TargetType : AnyObject
The ValueAssistantGroup class enables multiple ValueAssistant objects to be attached to a single motion class.
-
Declaration
Swift
@MainActor public var isAdditive: Bool { get set } -
Declaration
Swift
@MainActor public var additiveWeighting: Double { get set } -
Updates the
additivestate of all childValueAssistantobjects in this group.Declaration
Swift
@MainActor public func updateAdditive(isAdditive: Bool)Parameters
isAdditiveThe new
additivestate to assign. -
An array of
ValueAssistantobjects that this group manages.Declaration
Swift
@MainActor private(set) public var assistants: [any ValueAssistant<TargetType>] { get } -
Initializer.
Declaration
Swift
@MainActor public init(assistants: [any ValueAssistant<TargetType>]? = [])Parameters
assistantsAn optional array of
ValueAssistantobjects to which the ValueAssistantGroup should delegateValueAssistantmethod calls.
-
Adds a
ValueAssistantto the group.Note
The added assistant will be assigned the same values foradditiveandadditiveWeightingas this group’s values.Seealso
additive, additiveWeightingDeclaration
Swift
@MainActor public func add(_ assistant: any ValueAssistant<TargetType>)Parameters
assistantA
ValueAssistantobject.
-
Declaration
Swift
@MainActor public func generateProperties<StateType>(targetObject target: TargetType, state: MotionState<TargetType, StateType>) throws -> [PropertyData<TargetType>] -
Declaration
Swift
@MainActor public func update(properties: [PropertyData<TargetType> : Double], targetObject: TargetType) -
Declaration
Swift
@MainActor public func supports(_ object: Any) -> Bool -
Declaration
Swift
@MainActor public func acceptsKeypath(_ object: AnyObject) -> Bool
View on GitHub