PalacePal/Pal.Client/Floors/EphemeralLocation.cs

29 lines
677 B
C#
Raw Normal View History

2023-02-18 20:12:36 +00:00
using System;
2023-03-30 20:01:43 +00:00
namespace Pal.Client.Floors;
/// <summary>
/// This is a currently-visible marker.
/// </summary>
internal sealed class EphemeralLocation : MemoryLocation
2023-02-18 20:12:36 +00:00
{
2023-03-30 20:01:43 +00:00
public override bool Equals(object? obj) => obj is EphemeralLocation && base.Equals(obj);
2023-02-18 20:12:36 +00:00
2023-03-30 20:01:43 +00:00
public override int GetHashCode() => base.GetHashCode();
2023-02-18 20:12:36 +00:00
2023-03-30 20:01:43 +00:00
public static bool operator ==(EphemeralLocation? a, object? b)
{
return Equals(a, b);
}
2023-02-18 20:12:36 +00:00
2023-03-30 20:01:43 +00:00
public static bool operator !=(EphemeralLocation? a, object? b)
{
return !Equals(a, b);
}
2023-03-30 20:01:43 +00:00
public override string ToString()
{
return $"EphemeralLocation(Position={Position}, Type={Type})";
2023-02-18 20:12:36 +00:00
}
}