MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / initiator

Method initiator

src/main/java/fieldbox/boxes/TimeSlider.java:240–252  ·  view source on GitHub ↗

builds the initiator object for this "begin" call. This can be used to get at the object that caused this "animation" to begin. @param b

(Box b, double t)

Source from the content-addressed store, hash-verified

238
239
240 /**
241 * builds the initiator object for this "begin" call. This can be used to get at the object that caused this "animation" to begin.
242 *
243 * @param b
244 */
245 public Map<String, Object> initiator(Box b, double t) {
246 fieldlinker.AsMap init = Initiators.get(b, () -> {
247 Double mapped = currentMapping.get(b);
248 if (mapped==null)
249 {
250 //this happens when a box is overrun
251 // t is the time when it was initiated not the current time
252 return currentMappingAtTime;
253 }
254 return mapped.floatValue();
255 }, () -> this.properties.get(Box.frame).y);

Callers 3

onMethod · 0.95
beginBoxMethod · 0.95
skipForwardMethod · 0.95

Calls 3

getMethod · 0.95
getMethod · 0.65
asMap_setMethod · 0.65

Tested by

no test coverage detected