Contents

Tabletop

A protocol for the table surface in your game.

Declaration

protocol Tabletop : Identifiable where Self.ID == EquipmentIdentifier

Overview

To create a TableSetup object that configures your game table, pass an object that conforms to either the Tabletop or EntityTabletop`` protocol to the TableSetupinitializer. Implement yourTabletopstructure to set the protocol properties, such as theshapeandid` properties.

struct Table: Tabletop {
    var shape = .rectangular(width: 100, height: 60, thickness: 5, in: .centimeters)
    var id = .table
}

To create a round table, use one of the TabletopShape round initializers.

To render the table surface using RealityKit, conform to the EntityTabletop protocol instead.

Topics

Creating a round or rectangular table

Displaying the equipment

See Also

Essentials