Fan website of IMMORTAL: Gates of Pyre.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

39 lines
747 B

namespace Services.Immortal;
public class EntityDisplayService : IEntityDisplayService
{
private string displayType = "Detailed";
public List<string> DefaultChoices()
{
return new List<string> { "Detailed", "Plain" };
}
public void Subscribe(Action action)
{
OnChange += action;
}
public void Unsubscribe(Action action)
{
OnChange -= action;
}
public string GetDisplayType()
{
return displayType;
}
public void SetDisplayType(string displayType)
{
this.displayType = displayType;
NotifyDataChanged();
}
private event Action OnChange = null!;
private void NotifyDataChanged()
{
OnChange?.Invoke();
}
}