@gamelearn/arcade-components 0.25.35 → 0.25.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -194,6 +194,11 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
196
|
}, [getCurrentVisible, lastLine === null || lastLine === void 0 ? void 0 : lastLine.slots, scene]);
|
|
197
|
+
var resetCameraView = (0, _react.useCallback)(function () {
|
|
198
|
+
messagePosition.current.child = null;
|
|
199
|
+
messagePosition.current.parent = null;
|
|
200
|
+
if (zoomInActor) animationStart.current = true;
|
|
201
|
+
}, [zoomInActor]);
|
|
197
202
|
var backLine = (0, _react.useCallback)(function () {
|
|
198
203
|
if (lastLine && !lastLine.decision) {
|
|
199
204
|
changeLine(line - 1);
|
|
@@ -206,26 +211,15 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
206
211
|
resetAnims(true);
|
|
207
212
|
lastSet.current = true;
|
|
208
213
|
setCurrentMessage({});
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
if (zoomInActor) {
|
|
212
|
-
animationStart.current = true;
|
|
213
|
-
} else {
|
|
214
|
-
camera.copy(defaultCamera.current);
|
|
215
|
-
}
|
|
216
|
-
|
|
214
|
+
resetCameraView();
|
|
217
215
|
setTimeout(function () {
|
|
218
216
|
emitEvent({
|
|
219
217
|
type: 'success'
|
|
220
218
|
});
|
|
221
|
-
|
|
219
|
+
camera.copy(defaultCamera.current);
|
|
220
|
+
}, currentLine.decision ? 0 : 1200);
|
|
222
221
|
}
|
|
223
|
-
}, [camera, currentLine.decision, emitEvent, line, lines.length, resetAnims,
|
|
224
|
-
var resetCameraView = (0, _react.useCallback)(function () {
|
|
225
|
-
messagePosition.current.child = null;
|
|
226
|
-
messagePosition.current.parent = null;
|
|
227
|
-
if (zoomInActor) animationStart.current = true;
|
|
228
|
-
}, [zoomInActor]); // Position bubble over talking character/and switch emotions
|
|
222
|
+
}, [camera, currentLine.decision, emitEvent, line, lines.length, resetAnims, resetCameraView]); // Position bubble over talking character/and switch emotions
|
|
229
223
|
|
|
230
224
|
(0, _react.useEffect)(function () {
|
|
231
225
|
setCurrentMessage({});
|
|
@@ -117,7 +117,7 @@ var LecturesComponent = function LecturesComponent(_ref) {
|
|
|
117
117
|
var formatTime = limit - time;
|
|
118
118
|
var minutes = Math.floor(formatTime / 60);
|
|
119
119
|
var seconds = formatTime % 60;
|
|
120
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
120
|
+
return visible ? /*#__PURE__*/_react.default.createElement("div", {
|
|
121
121
|
className: "".concat(viewed ? 'notes--results' : 'readings--container')
|
|
122
122
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
123
123
|
className: viewed ? 'notes--results__text' : 'readings'
|
|
@@ -131,7 +131,7 @@ var LecturesComponent = function LecturesComponent(_ref) {
|
|
|
131
131
|
minutes: minutes,
|
|
132
132
|
seconds: seconds,
|
|
133
133
|
btnText: translate('screens.continue')
|
|
134
|
-
}) : null));
|
|
134
|
+
}) : null)) : null;
|
|
135
135
|
};
|
|
136
136
|
|
|
137
137
|
LecturesComponent.defaultProps = {
|