(61d00a474) v0.9.7.1

This commit is contained in:
Regalis
2020-03-04 13:04:10 +01:00
parent 3c50efa5c9
commit 3c09ebe02f
5086 changed files with 786063 additions and 295871 deletions
@@ -0,0 +1,57 @@
using Microsoft.Xna.Framework;
using System.Collections.Generic;
namespace Barotrauma
{
class LocationConnection
{
public Biome Biome;
public float Difficulty;
public List<Vector2[]> CrackSegments;
public bool Passed;
public Level Level { get; set; }
public Vector2 CenterPos
{
get
{
return (Locations[0].MapPosition + Locations[1].MapPosition) / 2.0f;
}
}
public Location[] Locations { get; private set; }
public float Length
{
get;
private set;
}
public LocationConnection(Location location1, Location location2)
{
Locations = new Location[] { location1, location2 };
Length = Vector2.Distance(location1.MapPosition, location2.MapPosition);
}
public Location OtherLocation(Location location)
{
if (Locations[0] == location)
{
return Locations[1];
}
else if (Locations[1] == location)
{
return Locations[0];
}
else
{
return null;
}
}
}
}