Refresh of repo required.
This commit is contained in:
parent
dafcc55437
commit
9311435007
47 changed files with 0 additions and 4421 deletions
|
@ -1,56 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace MudDesigner.MudEngine.GameObjects
|
||||
{
|
||||
public enum AvailableTravelDirections
|
||||
{
|
||||
None = 0,
|
||||
North,
|
||||
South,
|
||||
East,
|
||||
West,
|
||||
Up,
|
||||
Down,
|
||||
}
|
||||
|
||||
public static class TravelDirections
|
||||
{
|
||||
public static AvailableTravelDirections GetReverseDirection(AvailableTravelDirections Direction)
|
||||
{
|
||||
switch (Direction)
|
||||
{
|
||||
case AvailableTravelDirections.Down:
|
||||
return AvailableTravelDirections.Up;
|
||||
case AvailableTravelDirections.East:
|
||||
return AvailableTravelDirections.West;
|
||||
case AvailableTravelDirections.None:
|
||||
return AvailableTravelDirections.None;
|
||||
case AvailableTravelDirections.North:
|
||||
return AvailableTravelDirections.South;
|
||||
case AvailableTravelDirections.South:
|
||||
return AvailableTravelDirections.North;
|
||||
case AvailableTravelDirections.Up:
|
||||
return AvailableTravelDirections.Down;
|
||||
case AvailableTravelDirections.West:
|
||||
return AvailableTravelDirections.East;
|
||||
default:
|
||||
return AvailableTravelDirections.None;
|
||||
}
|
||||
}
|
||||
|
||||
public static AvailableTravelDirections GetTravelDirectionValue(string Direction)
|
||||
{
|
||||
Array values = Enum.GetValues(typeof(AvailableTravelDirections));
|
||||
|
||||
foreach (int value in values)
|
||||
{
|
||||
string displayName = Enum.GetName(typeof(AvailableTravelDirections), value);
|
||||
|
||||
if (displayName == Direction)
|
||||
return (AvailableTravelDirections)Enum.Parse(typeof(AvailableTravelDirections), displayName);
|
||||
}
|
||||
|
||||
return AvailableTravelDirections.None;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue