mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 05:03:37 +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.
|
||||
*
|
||||
* @name Phaser.Tilemaps.fromOrientationString
|
||||
* @const
|
||||
* @type {function}
|
||||
* @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)
|
||||
{
|
||||
var constor = CONST.ORTHOGONAL;
|
||||
orientation = orientation.toLowerCase;
|
||||
|
||||
if (orientation === 'isometric')
|
||||
{
|
||||
constor = CONST.ISOMETRIC;
|
||||
return CONST.ISOMETRIC;
|
||||
}
|
||||
else if (orientation === 'staggered')
|
||||
{
|
||||
constor = CONST.STAGGERED;
|
||||
return CONST.STAGGERED;
|
||||
}
|
||||
else if (orientation === 'hexagonal')
|
||||
{
|
||||
constor = CONST.HEXAGONAL;
|
||||
return CONST.HEXAGONAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
return CONST.ORTHOGONAL;
|
||||
}
|
||||
return constor;
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue