Skip to content

Commit f8d3dd9

Browse files
Lincoln-Absimone-lungarella
authored andcommitted
fix #87
- fix collision shape vertex
1 parent c7d89ee commit f8d3dd9

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

packed_scene/scene_2d/SliderArea.tscn

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ position = Vector2(454, 665)
2121
script = ExtResource("1_xjbxd")
2222
block_texture = ExtResource("3_e6fhw")
2323
block_shader = ExtResource("2_uw1fh")
24-
full_collision = PackedVector2Array(0, -128, 128, 0, 0, 128, -128, 0)
25-
half_collision = PackedVector2Array(0, -128, 0, 128, -128, 0)
24+
full_collision = PackedVector2Array(0, -110, 110, 0, 0, 110, -110, 0)
25+
half_collision = PackedVector2Array(-5, -120, -5, 120, -120, 0)
2626

2727
[node name="Body" type="Sprite2D" parent="."]
2828
position = Vector2(64, 0)
@@ -58,7 +58,7 @@ collision_mask = 2
5858

5959
[node name="CollisionShape" type="CollisionPolygon2D" parent="Handle"]
6060
unique_name_in_owner = true
61-
polygon = PackedVector2Array(0, -120, 120, 0, 0, 120, -120, 0)
61+
polygon = PackedVector2Array(0, -110, 110, 0, 0, 110, -110, 0)
6262

6363
[node name="Ray" type="RayCast2D" parent="."]
6464
unique_name_in_owner = true

project.godot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ config_version=5
1111
[application]
1212

1313
config/name="Sum Zero"
14-
config/version="0.7.0"
14+
config/version="0.7.1"
1515
run/main_scene="res://packed_scene/scene_2d/LevelManager.tscn"
1616
config/features=PackedStringArray("4.3", "Forward Plus")
1717
boot_splash/bg_color=Color(0.25098, 0.184314, 0.105882, 1)

scripts/scene_2d/slider_area.gd

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ func reset() -> void:
6464

6565

6666
func release_handle() -> void:
67-
_is_scaling = false
6867
_apply_scaling(_current_scale)
6968
area_outline.material.set_shader_parameter(Literals.Parameters.IS_SELECTED, false)
7069

@@ -76,7 +75,6 @@ func release_handle() -> void:
7675
if cell.get_cell_value() != _last_affected_cells.get(cell):
7776
_alter_grid()
7877
break
79-
8078
_check_intersection()
8179

8280

@@ -90,8 +88,8 @@ func _check_intersection() -> void:
9088
for other_handle in handle.get_overlapping_areas():
9189
var other_area: SliderArea = other_handle.get_parent()
9290
if other_area != null:
93-
set_handle_collision.call_deferred(true)
94-
other_area.set_handle_collision.call_deferred(true)
91+
set_handle_collision(true)
92+
other_area.set_handle_collision(true)
9593

9694

9795
func _alter_grid() -> void:
@@ -106,7 +104,8 @@ func _process(_delta: float) -> void:
106104
if _is_scaling:
107105
if _is_manually_controlled:
108106
if Input.is_action_just_released(Literals.Inputs.LEFT_CLICK):
109-
release_handle()
107+
_is_scaling = false
108+
release_handle.call_deferred()
110109
return
111110

112111
var drag_direction: Vector2

scripts/user_interface/main_menu.gd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ const BUILDER_UI = preload("res://packed_scene/user_interface/BuilderUI.tscn")
77
const GAME_UI = preload("res://packed_scene/user_interface/GameUI.tscn")
88
const LEVEL_UI = preload("res://packed_scene/user_interface/LevelUI.tscn")
99

10-
@onready var version_label: Label = %VersionLabel
11-
1210
var _playable_level: LevelData
1311

12+
@onready var version_label: Label = %VersionLabel
13+
1414

1515
func _ready():
1616
version_label.text = ProjectSettings.get("application/config/version")

0 commit comments

Comments
 (0)