Mutually_Assured_Destruction/buildings/building_block.cs
2023-06-10 17:14:55 -04:00

34 lines
599 B
C#

using Godot;
public enum TileTypes
{
NONE,
Grass,
Sand,
Water,
}
public partial class building_block : Node3D
{
[Export]
public RayCast3D _ray = null;
[Export]
private TileTypes _compatible_tile = TileTypes.NONE;
public bool IsPlaceable
{
get
{
if (_ray == null || _compatible_tile == TileTypes.NONE)
return false;
GodotObject collider = _ray.GetCollider();
GD.Print(collider);
if (collider == null)
return false;
return false;
}
}
}