Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12231

Phaser 3 Tween syntax breakdown for updating properties

$
0
0

I'm new to Javascript and Phaser and I came across the following code while working on a project in Codecademy

this.tweens.add({  targets: obj,  duration: 750,  x: '-= 300',});

I know that the tween is to make the target obj move 300px to its left, but why does the syntax x: '-= 300' work? Is this a syntax for Javascript or only for Phaser's tween?


Viewing all articles
Browse latest Browse all 12231

Trending Articles