Class PlacementData
- Namespace
- MoonBark.GridPlacement.Core.Data.Placement
- Assembly
- MoonBark.GridPlacement.Core.dll
Core placement data without Godot dependencies. Contains all information needed for placement calculations.
public class PlacementData
- Inheritance
-
PlacementData
- Inherited Members
Properties
BuildingType
Building type/category.
public string BuildingType { get; set; }
Property Value
CanFlip
Whether the building can be flipped.
public bool CanFlip { get; set; }
Property Value
CanPlace
Whether the building can be placed.
public bool CanPlace { get; set; }
Property Value
CanRotate
Whether the building can be rotated.
public bool CanRotate { get; set; }
Property Value
DefaultTransparency
Default preview transparency.
public float DefaultTransparency { get; set; }
Property Value
Description
Description of the building.
public string Description { get; set; }
Property Value
Footprint
Footprint data for the building.
public FootprintData Footprint { get; set; }
Property Value
Id
Unique identifier for the placement.
public string Id { get; set; }
Property Value
InvalidColor
Default invalid placement color.
public CoreColor InvalidColor { get; set; }
Property Value
- CoreColor
Name
Human-readable name of the placement.
public string Name { get; set; }
Property Value
Requirements
Placement requirements.
public PlacementRequirements Requirements { get; set; }
Property Value
ResourceCost
Resource cost for placing the building.
public ResourceCost ResourceCost { get; set; }
Property Value
ValidColor
Default valid placement color.
public CoreColor ValidColor { get; set; }
Property Value
- CoreColor
Methods
GetOccupiedPositions(CoreVector2I, int, bool, bool)
Gets the occupied grid positions for this placement
public List<CoreVector2I> GetOccupiedPositions(CoreVector2I gridPosition, int rotation = 0, bool flipHorizontal = false, bool flipVertical = false)
Parameters
gridPositionCoreVector2IPlacement's grid position
rotationintRotation in degrees (0, 90, 180, 270)
flipHorizontalboolWhether to flip horizontally
flipVerticalboolWhether to flip vertically
Returns
- List<CoreVector2I>
List of occupied grid positions