A* pathfinding, autopilot, WIP radar rendering, proper location names, character skills shown in menus, got rid of PreviewCharacter, mantis

This commit is contained in:
Regalis
2015-07-14 21:09:00 +03:00
parent a2636133ca
commit 44b9a63c94
51 changed files with 1971 additions and 940 deletions
+13 -3
View File
@@ -6,12 +6,15 @@ using System.Text;
namespace Subsurface
{
class Location
{
string name;
Vector2 mapPosition;
LocationType type;
public string Name
{
get { return name; }
@@ -22,16 +25,23 @@ namespace Subsurface
get { return mapPosition; }
}
public Location(string name, Vector2 mapPosition)
public Location(Vector2 mapPosition)
{
this.name = name;
this.name = RandomName(LocationType.Random());
this.mapPosition = mapPosition;
}
public static Location CreateRandom(Vector2 position)
{
return new Location("Location " + Rand.Int(10000, false), position);
return new Location(position);
}
private string RandomName(LocationType type)
{
string name = ToolBox.GetRandomLine("Content/Map/locationNames.txt");
int nameFormatIndex = Rand.Int(type.NameFormats.Count);
return type.NameFormats[nameFormatIndex].Replace("[name]", name);
}
}
}