Mutually_Assured_Destruction/buildings/building_block.cs

18 lines
387 B
C#
Raw Permalink Normal View History

2023-06-10 17:14:55 -04:00
using Godot;
2023-06-10 17:14:55 -04:00
public partial class building_block : Node3D
{
[Export]
private RayCast3D _ground_ray;
2023-06-10 17:14:55 -04:00
[Export]
private RayCast3D _collision_ray;
2023-06-10 17:14:55 -04:00
public bool IsPlaceable
{
get
{
return _collision_ray.GetCollider() == null && _ground_ray.GetCollider() != null && _ground_ray.GetCollider().GetType() == typeof(GridMap);
2023-06-10 17:14:55 -04:00
}
}
}