Skip to main content

MouldRestrictor

A class in Root.Township, Alta.Pages.

Server: a position restrictor for moulds that keeps only one mould of each type; registering a second one destroys the older one.

Constructors​

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

Fields​

1 private and internal field
MemberWhat it is
private Dictionary<MouldDefinition, Pickup> mouldDefinitionsThe registered pickup for each mould type.

Methods​

MemberWhat it is
override void Deregister(Pickup pickup)Removes the pickup from the restrictor and forgets its mould type.
override void Register(Pickup pickup)Server: for moulds that use the restrictor, destroys any older mould of the same type, then registers the pickup.