PlacementSession

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 PlacementSession

Summary

Session state for placement operations.

This class manages the state of an active placement session, including the selected placeable, current rotation, and targeting information. It is intentionally kept separate from any Godot dependencies.

Metadata

Namespace: GridPlacement.Core.Sessions

Source File: cs/Core/Sessions/PlacementSession.cs

Assembly: GridPlacement.Core

Type: class

Properties

ItemId

1
public string ItemId { get; }

Gets the ID of the currently selected item.


SelectedResource

1
public Placeable? SelectedResource { get; }

Gets the currently selected placeable resource.


CurrentRotation

1
public int CurrentRotation { get; set; }

Gets or sets the current rotation (0-3, representing 0°, 90°, 180°, 270°).


LastSnapshot

1
public TargetingSnapshot2D? LastSnapshot { get; set; }

Gets or sets the last targeting snapshot received.


IsActive

1
public bool IsActive { get; }

Gets whether the session is currently active.


HasValidPlaceable

1
public bool HasValidPlaceable { get; }

Gets a value indicating whether the session has a valid placeable selected.


Methods

Start

1
2
3
4
public void Start(
    string itemId,
    Placeable resource
)

Starts a new placement session with the specified item and resource.

Parameters

NameDescription
itemIdThe ID of the item to place.
resourceThe placeable resource.

Reset

1
public void Reset()

Resets the session to an inactive state.


RotateClockwise

1
public void RotateClockwise()

Rotates the placement by 90 degrees clockwise.


Clone

1
public PlacementSession Clone()

Creates a copy of the current session state.

Returns

A new PlacementSession with the same state.