Skip to main content

RespawnShrineSubscriberMarkController

A class in Root.Township, ATT.Respawn.

Client: shows one pooled mark per player subscribed to a respawn shrine, with a separate mark for the local player in the centre and the rest spaced in a circle.

Constructors​

MemberWhat it is
RespawnShrineSubscriberMarkController()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

2 private and internal fields
MemberWhat it is
private Rotator subscriberMarkRotatorRotating parent the marks are spawned under.
private List<PooledObject> subscriberMarksThe marks spawned now, released on the next update.

Properties​

1 private and internal property
MemberWhat it is
private IRespawnSystemSettings SystemSettings { get; }The global RespawnSystemSettings.

Methods​

MemberWhat it is
bool CanRefreshSubscriberMarks()True on clients when the settings say to update marks on player join and leave.
void UpdateSubscriberMarks(int numberOfSubscribers, bool isSubscribedToShrine)Client: releases the old marks and spawns new ones for the subscriber count. Does nothing on a remote server.
3 private and internal methods
MemberWhat it is
private void Awake()Creates the mark list if needed.
private Vector3 CalculateOrbPosition(float spawnAngle, float distanceFromCentre)Returns a point on a circle around the centre at the given angle and distance.
private Vector3[] CalculateSubscriberMarkPositions(int numberOfSubscribers, float angleBetweenMarks)Returns evenly spaced circle positions for the remote subscriber marks.

Used in​

Members of other types that take, return or hold a RespawnShrineSubscriberMarkController: