Merge pull request #1134 from thecodingmachine/fixEmoteScene
FIX: trying to start a emote after a scene is desotryed should not crash the game
This commit is contained in:
commit
473a32b57f
1 changed files with 3 additions and 3 deletions
|
@ -261,7 +261,7 @@ export abstract class Character extends Container {
|
||||||
}
|
}
|
||||||
|
|
||||||
private createStartTransition(scalingFactor: number, emoteY: number) {
|
private createStartTransition(scalingFactor: number, emoteY: number) {
|
||||||
this.emoteTween = this.scene.tweens.add({
|
this.emoteTween = this.scene?.tweens.add({
|
||||||
targets: this.emote,
|
targets: this.emote,
|
||||||
props: {
|
props: {
|
||||||
scale: scalingFactor,
|
scale: scalingFactor,
|
||||||
|
@ -277,7 +277,7 @@ export abstract class Character extends Container {
|
||||||
}
|
}
|
||||||
|
|
||||||
private startPulseTransition(emoteY: number, scalingFactor: number) {
|
private startPulseTransition(emoteY: number, scalingFactor: number) {
|
||||||
this.emoteTween = this.scene.tweens.add({
|
this.emoteTween = this.scene?.tweens.add({
|
||||||
targets: this.emote,
|
targets: this.emote,
|
||||||
props: {
|
props: {
|
||||||
y: emoteY * 1.3,
|
y: emoteY * 1.3,
|
||||||
|
@ -294,7 +294,7 @@ export abstract class Character extends Container {
|
||||||
}
|
}
|
||||||
|
|
||||||
private startExitTransition(emoteY: number) {
|
private startExitTransition(emoteY: number) {
|
||||||
this.emoteTween = this.scene.tweens.add({
|
this.emoteTween = this.scene?.tweens.add({
|
||||||
targets: this.emote,
|
targets: this.emote,
|
||||||
props: {
|
props: {
|
||||||
alpha: 0,
|
alpha: 0,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue