Mutually_Assured_Destruction/buildings/building_block.cs
2023-06-11 12:54:09 -04:00

18 lines
387 B
C#

using Godot;
public partial class building_block : Node3D
{
[Export]
private RayCast3D _ground_ray;
[Export]
private RayCast3D _collision_ray;
public bool IsPlaceable
{
get
{
return _collision_ray.GetCollider() == null && _ground_ray.GetCollider() != null && _ground_ray.GetCollider().GetType() == typeof(GridMap);
}
}
}