tracking player, refactoring api. not working

This commit is contained in:
Michele 2020-11-03 00:03:40 +00:00
parent c2045e74cf
commit d31d448182
6 changed files with 401 additions and 124 deletions

View file

@ -1,8 +1,11 @@
// using MonoGame.Extended;
using System.Collections.Generic;
using System.Collections;
using System.IO;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework;
using System.Linq;
namespace MyGame
{
public static class ExtensionMethods
@ -22,11 +25,14 @@ namespace MyGame
return result;
}
public static Point AbsPoint(this Point point)
{
return new Point(System.Math.Abs(point.X), System.Math.Abs(point.Y));
}
public static IEnumerable<string> Split(this string str, int chunkSize) => Enumerable.Range(0, str.Length / chunkSize)
.Select(i => str.Substring(i * chunkSize, chunkSize));
public static Point AbsPoint(this Point point)
{
return new Point(System.Math.Abs(point.X), System.Math.Abs(point.Y));
}
}
}