mirror of
https://github.com/wassname/phaser-plugin-isometric.git
synced 2026-09-09 11:28:50 +08:00
isometric type bugfix
This commit is contained in:
+5
-2
@@ -41,11 +41,14 @@
|
||||
*
|
||||
* @constructor
|
||||
* @param {Phaser.Game} game The current game instance.
|
||||
* @param {number} isometricType - the isometric projection anglye to use.
|
||||
*/
|
||||
Phaser.Plugin.Isometric = function (game, parent) {
|
||||
Phaser.Plugin.Isometric = function (game, parent, isometricType) {
|
||||
|
||||
isometricType = isometricType || Phaser.Plugin.Isometric.CLASSIC
|
||||
|
||||
Phaser.Plugin.call(this, game, parent);
|
||||
this.projector = new Phaser.Plugin.Isometric.Projector(this.game, Phaser.Plugin.Isometric.CLASSIC);
|
||||
this.projector = new Phaser.Plugin.Isometric.Projector(this.game, isometricType);
|
||||
// Add an instance of Isometric.Projector to game.iso if it doesn't exist already
|
||||
this.game.iso = this.game.iso || this.projector;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user