Minor adjustments
parent
cd29060736
commit
6136346faa
|
@ -127,7 +127,7 @@ text = "0"
|
||||||
|
|
||||||
[node name="StreamContainer" type="Spatial" parent="."]
|
[node name="StreamContainer" type="Spatial" parent="."]
|
||||||
script = ExtResource( 4 )
|
script = ExtResource( 4 )
|
||||||
world_rect = Rect2( 0, 0, 25, 18 )
|
world_rect = Rect2( 0, 0, 25, 20 )
|
||||||
|
|
||||||
[node name="ActiveTiles" type="Spatial" parent="StreamContainer"]
|
[node name="ActiveTiles" type="Spatial" parent="StreamContainer"]
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,8 @@ mesh = SubResource( 6 )
|
||||||
material/0 = ExtResource( 2 )
|
material/0 = ExtResource( 2 )
|
||||||
|
|
||||||
[node name="Area" type="Area" parent="Mesh"]
|
[node name="Area" type="Area" parent="Mesh"]
|
||||||
|
monitoring = false
|
||||||
|
monitorable = false
|
||||||
|
|
||||||
[node name="CollisionShape" type="CollisionShape" parent="Mesh/Area"]
|
[node name="CollisionShape" type="CollisionShape" parent="Mesh/Area"]
|
||||||
transform = Transform( 1, 0, 0, 0, 10, 0, 0, 0, 1, 0, 0, 0 )
|
transform = Transform( 1, 0, 0, 0, 10, 0, 0, 0, 1, 0, 0, 0 )
|
||||||
|
|
|
@ -22,10 +22,8 @@ func _ready():
|
||||||
|
|
||||||
|
|
||||||
func is_hex_coord_in_rect (coord: Vector2):
|
func is_hex_coord_in_rect (coord: Vector2):
|
||||||
var has_point = offset_coord_rect.has_point(coord)
|
|
||||||
var rect_end = offset_coord_rect.end
|
var rect_end = offset_coord_rect.end
|
||||||
var manual = coord.x >= offset_coord_rect.position.x and coord.x < offset_coord_rect.end.x and coord.y >= offset_coord_rect.position.y and coord.y < offset_coord_rect.end.y
|
return coord.x >= offset_coord_rect.position.x and coord.x < offset_coord_rect.end.x and coord.y >= offset_coord_rect.position.y and coord.y < offset_coord_rect.end.y
|
||||||
return has_point || manual
|
|
||||||
|
|
||||||
|
|
||||||
func create_hextile3d_at (coord: Vector2) -> HexTile3D:
|
func create_hextile3d_at (coord: Vector2) -> HexTile3D:
|
||||||
|
|
Loading…
Reference in New Issue