MCPcopy
hub / github.com/4ian/GDevelop / checkProgress

Function checkProgress

Extensions/TweenBehavior/tests/LegacyLayoutTween.spec.js:23–35  ·  view source on GitHub ↗
(steps, getValueFunctions)

Source from the content-addressed store, hash-verified

21 const camera = gdjs.evtTools.camera;
22
23 const checkProgress = (steps, getValueFunctions) => {
24 if (!Array.isArray(getValueFunctions)) {
25 getValueFunctions = [getValueFunctions];
26 }
27 for (let i = 0; i < steps; i++) {
28 const oldValues = getValueFunctions.map((getValue) => getValue());
29 layout.renderAndStep(1000 / 60);
30
31 for (let index = 0; index < oldValues.length; index++) {
32 expect(getValueFunctions[index]()).not.to.be(oldValues[index]);
33 }
34 }
35 };
36
37 it('can tween a scene variable', () => {
38 const variable = layout.getVariables().get('MyVariable');

Callers 1

Calls 3

renderAndStepMethod · 0.80
getValueFunction · 0.50
mapMethod · 0.45

Tested by

no test coverage detected