|
@@ -122,7 +122,7 @@ const game = {
|
|
} else {
|
|
} else {
|
|
self.create(); // Calls create()
|
|
self.create(); // Calls create()
|
|
game.render.all(); // After create() ends, renders media on canvas
|
|
game.render.all(); // After create() ends, renders media on canvas
|
|
- if (self?.restart) {
|
|
|
|
|
|
+ if (self && self.restart) {
|
|
// If needed, restart state
|
|
// If needed, restart state
|
|
game.state.start(game.state.name);
|
|
game.state.start(game.state.name);
|
|
} else {
|
|
} else {
|
|
@@ -510,9 +510,10 @@ const game = {
|
|
} else {
|
|
} else {
|
|
const med = {
|
|
const med = {
|
|
typeOfMedia: 'text',
|
|
typeOfMedia: 'text',
|
|
- name: style?.increaseLetterSpacing
|
|
|
|
- ? text.split('').join(String.fromCharCode(8202))
|
|
|
|
- : text,
|
|
|
|
|
|
+ name:
|
|
|
|
+ style && style.increaseLetterSpacing
|
|
|
|
+ ? text.split('').join(String.fromCharCode(8202))
|
|
|
|
+ : text,
|
|
|
|
|
|
x: x || game.add.default.x,
|
|
x: x || game.add.default.x,
|
|
y: y || game.add.default.y,
|
|
y: y || game.add.default.y,
|