mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 22:52:14 +00:00
Fixed static function #4992
This commit is contained in:
parent
ba4be029be
commit
24437485af
1 changed files with 12 additions and 6 deletions
|
@ -56,27 +56,33 @@ var CONST = {
|
||||||
* Get the Tilemap orientation from the given string.
|
* Get the Tilemap orientation from the given string.
|
||||||
*
|
*
|
||||||
* @name Phaser.Tilemaps.fromOrientationString
|
* @name Phaser.Tilemaps.fromOrientationString
|
||||||
* @const
|
|
||||||
* @type {function}
|
* @type {function}
|
||||||
* @since 3.50.0
|
* @since 3.50.0
|
||||||
|
*
|
||||||
|
* @param {string} [orientation] - The orientation type as a string.
|
||||||
|
*
|
||||||
|
* @return {Phaser.Types.Tilemaps.TilemapOrientationType} The Tilemap Orientation type.
|
||||||
*/
|
*/
|
||||||
fromOrientationString: function (orientation)
|
fromOrientationString: function (orientation)
|
||||||
{
|
{
|
||||||
var constor = CONST.ORTHOGONAL;
|
orientation = orientation.toLowerCase;
|
||||||
|
|
||||||
if (orientation === 'isometric')
|
if (orientation === 'isometric')
|
||||||
{
|
{
|
||||||
constor = CONST.ISOMETRIC;
|
return CONST.ISOMETRIC;
|
||||||
}
|
}
|
||||||
else if (orientation === 'staggered')
|
else if (orientation === 'staggered')
|
||||||
{
|
{
|
||||||
constor = CONST.STAGGERED;
|
return CONST.STAGGERED;
|
||||||
}
|
}
|
||||||
else if (orientation === 'hexagonal')
|
else if (orientation === 'hexagonal')
|
||||||
{
|
{
|
||||||
constor = CONST.HEXAGONAL;
|
return CONST.HEXAGONAL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return CONST.ORTHOGONAL;
|
||||||
}
|
}
|
||||||
return constor;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue