18 lines
387 B
C#
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);
|
|
}
|
|
}
|
|
} |