PlaceableSequence

AUTO-GENERATED FILE – DO NOT EDIT MANUALLY

This page documents the supported public API surface only. Private, internal, benchmark, test, and implementation-detail types are intentionally omitted.

Declaration

1
public class PlaceableSequence

Summary

Represents an ordered sequence of placeables, typically used as an upgrade path where each tier is a distinct PlaceableEntry.

Metadata

Namespace: GridPlacement.Core.Catalog

Source File: cs/Core/Catalog/PlaceableSequence.cs

Assembly: GridPlacement.Core

Type: class

Constructors

PlaceableSequence

1
2
3
4
5
public PlaceableSequence(
    string id,
    string category,
    IEnumerable<PlaceableEntry> tiers
)

Creates a new placeable sequence.

Parameters

NameDescription
idUnique identifier for this sequence.
categoryCategory for filtering.
tiersOrdered list of placeable tiers (must have at least one).

Properties

Id

1
public string Id { get; }

Unique identifier for this sequence.


Category

1
public string Category { get; }

Category used when grouping or filtering this sequence alongside other placeables in a catalog (for example, “buildings”).


Tiers

1
public IReadOnlyList<PlaceableEntry> Tiers { get; }

Ordered list of placeable tiers, from base to highest tier. The collection is read-only.


TierCount

1
public int TierCount { get; }

Number of tiers in this sequence.


FirstTier

1
public PlaceableEntry FirstTier { get; }

Gets the first tier (base level).


LastTier

1
public PlaceableEntry LastTier { get; }

Gets the last tier (max upgrade).


Methods

GetTier

1
public PlaceableEntry GetTier(int index)

Gets the tier at the specified index.

Parameters

NameDescription
indexZero-based tier index.

Returns

The placeable entry at that tier.


TryGetTier

1
2
3
4
public bool TryGetTier(
    int index,
    out PlaceableEntry? tier
)

Tries to get the tier at the specified index.

Parameters

NameDescription
indexZero-based tier index.
tierThe tier if found, null otherwise.

Returns

True if the tier exists, false otherwise.