Interface MotorDispenser<T>
- All Known Implementing Classes:
CoreMotorDispenser
public interface MotorDispenser<T>
A MotorDispenser is created for each Activity instance within a scenario.
When a thread is created, the motor and its input and action instances are resolved.
The MotorDispenser is responsible for choosing how the motor is resolved,
whether that is a shared thread-safe motor or, more conventionally, a separate motor per slot.
-
Method Summary
Modifier and TypeMethodDescriptiongetMotor(ActivityDef activityDef, int slot) Resolve (find or create) a Motor instance for the slot specified.
-
Method Details
-
getMotor
Resolve (find or create) a Motor instance for the slot specified. The motor is not required to be per-slot (per-thread), but any shared inputs motors be thread safe.- Parameters:
activityDef- the ActivityDef which will be used to parameterize the returned motorslot- The numbered slot within the activity instance for this motor- Returns:
- A new or cached Motor for the specified slot.
-