diff options
author | Roman Gräf <romangraef@gmail.com> | 2020-04-21 01:40:51 +0200 |
---|---|---|
committer | Roman Gräf <romangraef@gmail.com> | 2020-04-21 01:40:51 +0200 |
commit | c0e428912118390663814d8d85a9a1e10d138dcf (patch) | |
tree | f5388f0cdb2066332ab169473c0ff78059d67416 /lawsuit | |
parent | ac8c93b5cfa7b5c409dac0a4d39f2f9221cfc536 (diff) | |
download | LDJam46-c0e428912118390663814d8d85a9a1e10d138dcf.tar.gz LDJam46-c0e428912118390663814d8d85a9a1e10d138dcf.tar.bz2 LDJam46-c0e428912118390663814d8d85a9a1e10d138dcf.zip |
endings
Diffstat (limited to 'lawsuit')
-rw-r--r-- | lawsuit/lawsuit.gd | 4 | ||||
-rw-r--r-- | lawsuit/miles.gd | 3 | ||||
-rw-r--r-- | lawsuit/miles.tscn | 1 | ||||
-rw-r--r-- | lawsuit/wright.gd | 4 | ||||
-rw-r--r-- | lawsuit/wright.tscn | 1 |
5 files changed, 10 insertions, 3 deletions
diff --git a/lawsuit/lawsuit.gd b/lawsuit/lawsuit.gd index 3cf596b..e616db7 100644 --- a/lawsuit/lawsuit.gd +++ b/lawsuit/lawsuit.gd @@ -6,9 +6,9 @@ onready var wright = preload("res://lawsuit/wright.tscn") func get_cost(): var x = 1 for value in SaveState.upgrades.values(): - x *= value + x *= value + 1 for value in SaveState.buildings.values(): - x *= value + x *= value + 1 return x func _ready(): diff --git a/lawsuit/miles.gd b/lawsuit/miles.gd index 7ea8213..b55b389 100644 --- a/lawsuit/miles.gd +++ b/lawsuit/miles.gd @@ -5,5 +5,8 @@ func _physics_process(delta): if position.x < 0: get_parent().lose() +func queue_free(): + print('p') + func _on_Area2D_area_shape_entered(area_id, area, area_shape, self_shape): queue_free() diff --git a/lawsuit/miles.tscn b/lawsuit/miles.tscn index 1d8175e..39f37d1 100644 --- a/lawsuit/miles.tscn +++ b/lawsuit/miles.tscn @@ -14,6 +14,7 @@ scale = Vector2( -1, 1 ) texture = ExtResource( 1 ) [node name="Area2D" type="Area2D" parent="."] +collision_mask = 2 [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] shape = SubResource( 1 ) diff --git a/lawsuit/wright.gd b/lawsuit/wright.gd index 42a53ce..a577d33 100644 --- a/lawsuit/wright.gd +++ b/lawsuit/wright.gd @@ -6,7 +6,9 @@ func _physics_process(delta): if position.x > 1024: get_parent().win() - +func queue_free(): + print('p') + func _on_Area2D_area_shape_entered(area_id, area, area_shape, self_shape): queue_free() var objection = blueprint.instance() diff --git a/lawsuit/wright.tscn b/lawsuit/wright.tscn index f753cb6..b54f0d1 100644 --- a/lawsuit/wright.tscn +++ b/lawsuit/wright.tscn @@ -13,6 +13,7 @@ script = ExtResource( 2 ) texture = ExtResource( 1 ) [node name="Area2D" type="Area2D" parent="."] +collision_layer = 2 [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] position = Vector2( -3.6832, 0 ) |