Skip to main content

RespawnSystemSettings

A class in Root.Township, ATT.Respawn.

Global settings for respawn shrines: per-shrine data by GUID, tick rates, beacon sizes, subscriber marks, glyph colours and sounds. Get it with RespawnSystemSettings.Instance.

Constructors​

MemberWhat it is
RespawnSystemSettings()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

15 private and internal fields
MemberWhat it is
private Color activeGlyphColorGlyph colour when the player is subscribed to the shrine.
private float fuelConsumptionTickRateInSecondsHow often shrine fuel is burned down.
private Color inactiveGlyphColorGlyph colour when the player isn't subscribed.
private bool isUpdatingMarksOnPlayerJoinAndLeaveWhether subscriber marks refresh when players join or leave.
private PooledObjectDefinition localPlayerSubscriberMarkPooled mark shown for the local player on a shrine.
private static readonly Logger loggerClass logger.
private float maximumBeaconRadiusLargest beacon radius.
private float minimumBeaconRadiusSmallest beacon radius.
private float minimumBeaconScreenWidthSmallest on-screen width a beacon is drawn at.
private float modelUpdateTickRateInSecondsHow often the respawn model is checked for changes to sync.
private PooledObjectDefinition remotePlayerSubscriberMarkPooled mark shown for other players on a shrine.
private List<RespawnShrineData> respawnShrineSettingsData for every respawn shrine, including the global one.
private SoundEffectSet shrineDeactivationSfxSound for a shrine running out or being turned off.
private SoundEffectSet shrineSubscribeSfxSound played when a player subscribes to a shrine.
private float subscriberMarkDistanceFromCentreHow far subscriber marks sit from the shrine centre.

Properties​

MemberWhat it is
Color ActiveGlyphColor { get; }Glyph colour on an active shrine.
float FuelConsumptionTickRateInSeconds { get; }How often shrine fuel is consumed, in seconds.
Color InactiveGlyphColor { get; }Glyph colour on an inactive shrine.
bool IsUpdatingMarksOnPlayerJoinAndLeave { get; }Whether subscriber marks are refreshed when players join or leave.
IRespawnShrineSettings this[Guid shrineId] { get; }Indexer: the settings for the shrine with this GUID. Throws if there's none.
PooledObjectDefinition LocalPlayerSubscriberMarkPrefab { get; }Pooled mark shown on a shrine for the local player's subscription.
float MaxBeaconRadius { get; }Largest radius of a shrine's beacon.
float MinBeaconRadius { get; }Smallest radius of a shrine's beacon.
float MinBeaconScreenWidth { get; }Smallest width a beacon may take on screen.
float ModelUpdateTickRateInSeconds { get; }How often shrine models update, in seconds.
PooledObjectDefinition RemotePlayerSubscriberMarkPrefab { get; }Pooled mark shown on a shrine for other players' subscriptions.
SoundEffectSet ShrineDeactivationSfx { get; }Sound played when a shrine deactivates.
SoundEffectSet ShrineSubscribeSfx { get; }Sound played when a player subscribes to a shrine.
float SubscriberMarkDistanceFromCentre { get; }How far from the shrine's centre subscriber marks are placed.

Methods​

MemberWhat it is
IEnumerator<IRespawnShrineSettings> GetEnumerator()Goes through every shrine's settings.
IRespawnShrineSettings GetShrineSettings(Guid shrineId)The settings for the shrine with this GUID. Throws if there's none.
2 private and internal methods
MemberWhat it is
private IEnumerator System.Collections.IEnumerable.GetEnumerator()Goes through every shrine's settings.
private void OnEnable()Logs errors for duplicate shrine IDs and for a missing global shrine.