Class TileCheckRule
- Namespace
- MoonBark.GridPlacement.Godot.Placement.PlacementRules
- Assembly
- MoonBark.GridPlacement.Godot.dll
Abstract base class for tile check rules that use Godot physics queries. These rules validate whether a placement is physically valid at a position.
[GlobalClass]
[ScriptPath("res://addons/grid_placement/placement/placement_rules/TileCheckRule.cs")]
public abstract class TileCheckRule : PlacementRule, IDisposable
- Inheritance
-
GodotObjectRefCountedResourceTileCheckRule
- Implements
- Derived
- Inherited Members
-
Resource._GetRid()Resource._ResetState()Resource._SetupLocalToScene()Resource.GetRid()Resource.GetLocalScene()Resource.SetupLocalToScene()Resource.ResetState()Resource.IsBuiltIn()Resource.GenerateSceneUniqueId()Resource.EmitChanged()Resource.EmitSignalChanged()Resource.EmitSignalSetupLocalToSceneRequested()Resource.InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)Resource.HasGodotClassMethod(in godot_string_name)Resource.HasGodotClassSignal(in godot_string_name)Resource.ResourceLocalToSceneResource.ResourcePathResource.ResourceNameResource.ResourceSceneUniqueIdResource.ChangedResource.SetupLocalToSceneRequestedRefCounted.InitRef()RefCounted.Reference()RefCounted.Unreference()RefCounted.GetReferenceCount()GodotObject.NotificationPostinitializeGodotObject.NotificationPredeleteGodotObject.NotificationExtensionReloadedGodotObject.IsInstanceValid(GodotObject)GodotObject.WeakRef(GodotObject)GodotObject.Dispose()GodotObject.ToString()GodotObject.ToSignal(GodotObject, StringName)GodotObject._Get(StringName)GodotObject._GetPropertyList()GodotObject._IterGet(Variant)GodotObject._IterInit(Array)GodotObject._IterNext(Array)GodotObject._PropertyCanRevert(StringName)GodotObject._PropertyGetRevert(StringName)GodotObject._Set(StringName, Variant)GodotObject._ValidateProperty(Dictionary)GodotObject.Free()GodotObject.GetClass()GodotObject.Set(StringName, Variant)GodotObject.Get(StringName)GodotObject.SetIndexed(NodePath, Variant)GodotObject.GetIndexed(NodePath)GodotObject.GetPropertyList()GodotObject.GetMethodList()GodotObject.PropertyCanRevert(StringName)GodotObject.PropertyGetRevert(StringName)GodotObject.GetInstanceId()GodotObject.SetScript(Variant)GodotObject.GetScript()GodotObject.SetMeta(StringName, Variant)GodotObject.RemoveMeta(StringName)GodotObject.GetMeta(StringName, Variant)GodotObject.HasMeta(StringName)GodotObject.GetMetaList()GodotObject.HasUserSignal(StringName)GodotObject.RemoveUserSignal(StringName)GodotObject.EmitSignal(StringName, params Variant[])GodotObject.Call(StringName, params Variant[])GodotObject.CallDeferred(StringName, params Variant[])GodotObject.SetDeferred(StringName, Variant)GodotObject.Callv(StringName, Array)GodotObject.HasMethod(StringName)GodotObject.GetMethodArgumentCount(StringName)GodotObject.HasSignal(StringName)GodotObject.GetSignalList()GodotObject.GetSignalConnectionList(StringName)GodotObject.GetIncomingConnections()GodotObject.Disconnect(StringName, Callable)GodotObject.IsConnected(StringName, Callable)GodotObject.HasConnections(StringName)GodotObject.IsBlockingSignals()GodotObject.NotifyPropertyListChanged()GodotObject.CanTranslateMessages()GodotObject.Tr(StringName, StringName)GodotObject.GetTranslationDomain()GodotObject.SetTranslationDomain(StringName)GodotObject.IsQueuedForDeletion()GodotObject.CancelFree()GodotObject.EmitSignalScriptChanged()GodotObject.EmitSignalPropertyListChanged()GodotObject.NativeInstanceGodotObject.ScriptChangedGodotObject.PropertyListChanged
Properties
CheckType
The type of physics check to perform.
[Export(PropertyHint.None, "")]
public TileCheckType CheckType { get; set; }
Property Value
CollideWithAreas
Whether to collide with Area2D nodes.
[Export(PropertyHint.None, "")]
public bool CollideWithAreas { get; set; }
Property Value
CollideWithBodies
Whether to collide with PhysicsBody2D nodes.
[Export(PropertyHint.None, "")]
public bool CollideWithBodies { get; set; }
Property Value
PhysicsLayer
Physics layer mask for the collision check.
[Export(PropertyHint.None, "")]
public uint PhysicsLayer { get; set; }
Property Value
RaycastDirection
Direction for raycast checks (normalized Vector2).
[Export(PropertyHint.None, "")]
public Vector2 RaycastDirection { get; set; }
Property Value
- Vector2
RaycastDistance
Maximum distance for raycast checks.
[Export(PropertyHint.None, "")]
public float RaycastDistance { get; set; }
Property Value
ShapecastSize
Size of the shape for shapecast checks (Vector2 for 2D).
[Export(PropertyHint.None, "")]
public Vector2 ShapecastSize { get; set; }
Property Value
- Vector2
Methods
CheckPosition(Vector2, PhysicsDirectSpaceState2D)
Checks if the given world position passes this tile check rule.
public abstract bool CheckPosition(Vector2 worldPosition, PhysicsDirectSpaceState2D spaceState)
Parameters
worldPositionVector2The world position to check.
spaceStatePhysicsDirectSpaceState2DThe physics direct space state to query against.
Returns
- bool
True if the position passes this rule (placement is valid); false otherwise.