mirror of
				https://github.com/MaddyThorson/StrawberryBF.git
				synced 2025-11-04 01:41:33 +08:00 
			
		
		
		
	Point is IHashable
This commit is contained in:
		@ -14,6 +14,18 @@ namespace Strawberry
 | 
			
		||||
		static public readonly String Root = "assets/";
 | 
			
		||||
		#endif
 | 
			
		||||
 | 
			
		||||
		static public String GetDir(String outStr, params String[] subDirectories)
 | 
			
		||||
		{
 | 
			
		||||
			outStr.Append(Root);
 | 
			
		||||
			for (int i = 0; i < subDirectories.Count; i++)
 | 
			
		||||
			{
 | 
			
		||||
				outStr.Append(subDirectories[i]);
 | 
			
		||||
				if (i < subDirectories.Count - 1)
 | 
			
		||||
					outStr.Append(Path.DirectorySeparatorChar);
 | 
			
		||||
			}
 | 
			
		||||
			return outStr;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		static public void LoadAll()
 | 
			
		||||
		{
 | 
			
		||||
			Textures = new Dictionary<String, Texture>();
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ using System;
 | 
			
		||||
 | 
			
		||||
namespace Strawberry
 | 
			
		||||
{
 | 
			
		||||
	public struct Point
 | 
			
		||||
	public struct Point : IHashable
 | 
			
		||||
	{
 | 
			
		||||
		static public readonly Point Right = .(1, 0);
 | 
			
		||||
		static public readonly Point Left = .(-1, 0);
 | 
			
		||||
@ -104,5 +104,10 @@ namespace Strawberry
 | 
			
		||||
		{
 | 
			
		||||
			return .(a.X * (int)f, a.Y);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public int GetHashCode()
 | 
			
		||||
		{
 | 
			
		||||
			return X + 9973 * Y;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user