1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-06-01 04:43:37 +02:00
This commit is contained in:
Ellpeck 2019-12-27 23:10:57 +01:00
parent 39af38f3d8
commit 7e887031de

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using Microsoft.Xna.Framework;
using MonoGame.Extended;
@ -25,12 +26,12 @@ namespace MLEM.Extended.Tiled {
}
public static float GetFloat(this TiledMapProperties properties, string key) {
float.TryParse(properties.Get(key), out var val);
float.TryParse(properties.Get(key), NumberStyles.Number, NumberFormatInfo.InvariantInfo, out var val);
return val;
}
public static int GetInt(this TiledMapProperties properties, string key) {
int.TryParse(properties.Get(key), out var val);
int.TryParse(properties.Get(key), NumberStyles.Number, NumberFormatInfo.InvariantInfo, out var val);
return val;
}